/*
 * style.css — the web app's stylesheet: the desktop app's at commit 8983833
 * (`ui/desktop/src/style.css`), with the update notice's rules removed, because
 * the web app has no update notice. Comments below that cite desktop
 * measurements or `src/main.ts` describe the desktop window; the rules they
 * explain are unchanged here.
 */
/*
 * style.css — the marks and colours the terminal already uses.
 *
 * The palette and the tone names come from `commands/window.ts` and
 * `fleet-render.ts`, so a team that reads amber in the terminal reads amber
 * here. The five tones are the ones `window-view.ts` returns: ok, warn, bad,
 * info, dim. Nothing here invents a sixth.
 *
 * THE LAYOUT CONTRACT. `product/mx-agent-prd.md:585` states that a team is
 * legible without scrolling. The page is therefore a fixed shell rather than a
 * document: the body never scrolls, the header and the banners take the height
 * they need up to a stated cap, and the team grid is given every pixel that is
 * left. The grid divides that height between its rows, so five teams in three
 * columns are two rows that both fit, whatever the banners say. A region whose
 * content exceeds its share scrolls inside itself. Nothing is hidden, clipped
 * or dropped: every value, every problem line and every failed source stays on
 * the page and stays reachable.
 *
 * SINCE V11 (issue #149) a card draws `goal` and `last` first (`renderer.ts`
 * states why), so the two fields that answer the hardest questions are the two
 * rows above every card's fold. A project the window cannot read takes one
 * line rather than two, and a section without cards no longer shrinks, so its
 * line can no longer overlap the next one.
 *
 * CONTRAST. `--dim2` carries the labels, the notes, the footer and the age,
 * which are 10px to 11px and not bold, so WCAG AA asks 4.5:1 rather than the
 * 3:1 large text exception. #7a8490 measures 4.95:1 on the card `--panel`,
 * 5.10:1 on the page `--bg`, 4.83:1 on the page header, 4.57:1 on the card's
 * top strip `--head` and 4.73:1 on the attention strip. The previous #58626c
 * measured 3.03:1 on the card and failed. `test/renderer.test.mjs` recomputes
 * these from this file, so a value that drops below 4.5:1 fails the test run.
 *
 * That puts `--dim2` one step below `--dim`, whose only user is `.empty`. The
 * two now read as one colour. Raising `--dim` was not part of the accessibility
 * finding and is left for whoever next changes the empty state.
 *
 * V19: THE V2 TOKENS, LIGHT AND DARK (roadmap row 13, issue #1087 phase 1).
 * The colour set is the prototype's (`ui/prototype/v2/index.html`, the two
 * `:root` blocks), copied value for value. The light set is the default and
 * the dark set overrides the same names under `:root[data-theme="dark"]`, so
 * the layout cannot differ between themes. The names the v17 rules use
 * (`--bg`, `--panel`, `--head`, `--dim2`, `--white`) are kept, and each is set
 * in both blocks to a literal prototype value, not to `var()`, so the contrast
 * tests can read them: `--bg` is the prototype's `--page`, `--panel` its
 * `--card`, `--head` its `--soft`, `--dim2` its `--dim`, and `--white`, the
 * v17 name for the strongest text, its `--text`. `test/renderer.test.mjs`
 * measures the light set and `test/shell.test.mjs` the dark one.
 */
:root {
  color-scheme: light;
  --page:#f5f6fa; --card:#ffffff; --soft:#f8f9fc; --row-hover:#fafbfe;
  --line:#e7e9ef; --line2:#d9dde6; --line3:#c4c9d6;
  --text:#1d2433; --text2:#4b5468; --dim:#636c80; --faint:#a7aebd;
  --acc:#5b4fe0; --acc-hover:#4a3fd0; --acc-text:#4a3fd0; --on-acc:#ffffff;
  --acc-tint:#eeecfd; --acc-soft:#f6f5ff; --acc-line:#d6d1fa; --logo1:#6d5ff0; --logo2:#4a3fd0;
  --ok:#1a7f45; --ok-bg:#e6f6ec; --ok-line:#bfe3cc;
  --warn:#965500; --warn-bg:#fff3df; --warn-line:#f3d7a6; --warn-ink:#6b4100;
  --bad:#c42e2a; --bad-bg:#fdecec; --bad-soft:#fffafa; --bad-line:#f1c4c2; --badge:#c9302c; --on-badge:#ffffff;
  --info:#2457c5; --info-bg:#e8effd; --info-line:#d3e0fa; --info-ink:#22396b; --info-k:#4c6798;
  --off:#5a6575; --off-bg:#eef0f3;
  --ch-ok:#2fa865; --ch-bad:#d9534f; --ch-warn:#e0a030; --ch-off:#b3bac7;
  --scrim:rgba(22,26,40,.38);
  --shadow:0 1px 2px rgba(20,24,40,.04), 0 1px 8px rgba(20,24,40,.04); --dlg-shadow:0 20px 60px rgba(20,24,40,.25);
  --r:14px; --r-sm:10px; --side:248px;
  --bg:#f5f6fa; --panel:#ffffff; --head:#f8f9fc; --dim2:#636c80; --white:#1d2433;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:#0d0f14; --card:#161921; --soft:#1c2029; --row-hover:#1a1e27;
  --line:#262b36; --line2:#323846; --line3:#454d5e;
  --text:#e6e9f0; --text2:#bcc3d0; --dim:#959eaf; --faint:#5b6374;
  --acc:#6457ec; --acc-hover:#5244dc; --acc-text:#aea5ff; --on-acc:#ffffff;
  --acc-tint:#272350; --acc-soft:#1c1a36; --acc-line:#3d3778; --logo1:#7b6ef5; --logo2:#5a4ce0;
  --ok:#5cc994; --ok-bg:#13291e; --ok-line:#22503a;
  --warn:#eab456; --warn-bg:#2d2312; --warn-line:#5a4320; --warn-ink:#f3d6a0;
  --bad:#f27b77; --bad-bg:#331819; --bad-soft:#1f1415; --bad-line:#5e2c2d; --badge:#c9302c; --on-badge:#ffffff;
  --info:#82abff; --info-bg:#152039; --info-line:#28395f; --info-ink:#cad9fb; --info-k:#98afdc;
  --off:#a9b1bf; --off-bg:#242934;
  --ch-ok:#3fbf7f; --ch-bad:#ec6a66; --ch-warn:#e8b04b; --ch-off:#5a6278;
  --scrim:rgba(0,0,0,.6);
  --shadow:0 1px 2px rgba(0,0,0,.35); --dlg-shadow:0 20px 60px rgba(0,0,0,.6);
  --bg:#0d0f14; --panel:#161921; --head:#1c2029; --dim2:#959eaf; --white:#e6e9f0;
}

* { box-sizing: border-box; }

/*
 * A bounded region states that it holds more in two ways: a thin visible
 * scrollbar, and the cut marker at the foot of this file, which fades the last
 * drawn line into the region's background and marks it with an ellipsis. The
 * scrollbar alone was the whole cue until 2026-08-24, and issue #149 records
 * what it cost.
 */
.banner, .rows, .foot, .val, main { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

html { height: 100%; }

body {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  user-select: text;
}
button, input, select, textarea { font: inherit; color: inherit; }

/*
 * THE TOP BAR KEEPS V17'S HEADER, IN THE V2 FRAME (v19). It is the prototype's
 * `.top` moved right of the side nav, holding the crumbs where the prototype
 * holds them. Two things are not ported, and both are deliberate: the 62px
 * height, which the prototype spends on 36px controls this window does not
 * have yet (search, project picker, bell, New team), and the sans face. The
 * update notice beside the crumbs is measured at eight widths in six states by
 * `test/header-geometry.test.mjs`, against the monospace face and a 44px bar,
 * so the bar keeps both rather than re-measuring every threshold in this
 * iteration.
 */
header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px; height: 44px;
  background: var(--panel); border-bottom: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: 12.5px;
  line-height: 1.5;
}
/*
 * A NARROW WINDOW SPENDS LESS OF ITSELF ON SPACING.
 *
 * The header's six items take 36px of padding and five 14px gaps, 106px of a
 * 460px window that draws nothing. Below the breakpoint that goes to 20px and
 * 10px, which returns 36px to the items themselves. Measured on 2026-08-27 by
 * `npm run measure:header`, that is the difference between the Check control
 * being drawn whole at the declared minimum of 460x320 (`src/main.ts:342-343`)
 * and being cut off the end of the line: with 14px spacing the header draws its
 * everyday state whole from 470px, and with 10px from 440px.
 *
 * 660px, which is wider than any state needs, rather than the width where the
 * spacing starts to bite. A breakpoint at the biting width would draw the
 * Update button at 619px, drop it at 661px and bring it back at 656px, so
 * widening the window would take a control away. Here the states become whole
 * at 440px, 560px and 620px and stay whole. Above 660px the header is exactly
 * what it was.
 */
@media (max-width: 660px) {
  header { gap: 10px; padding: 0 10px; }
}
/*
 * THE HEADER'S OWN ITEMS DO NOT WRAP, AND THE UPDATE NOTICE YIELDS FIRST.
 *
 * The header is a 44px row, so an item that wraps to two lines is an item that
 * is clipped. Measured over the DevTools Protocol at the window's declared
 * minimum of 460x320 on 2026-08-27, with the permanent update notice in place:
 * `.brand` drew 37.5px and `#age` drew 49.5px, both past the 44px they have.
 * With the notice taken out they drew 18.75px and 16.5px. The notice is what
 * squeezed them, so the notice is what gives way: these six refuse to wrap and
 * refuse to shrink, and `.update` is the one header item that yields.
 *
 * `.badge` is in that list as of 2026-08-27. It held neither declaration while
 * every other header item held both, so the rule the header depends on had one
 * element it did not cover. No overlap was produced from it: STALE is one word,
 * so its min-content width is its drawn width and flexbox cannot shrink it
 * below that. It is written down because a two-word badge added later would
 * wrap inside a 44px row, and because a layout rule with one silent exception
 * is a rule the next reader cannot trust.
 */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: var(--text); white-space: nowrap; }
.slug { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; white-space: nowrap; }
.grow { flex-grow: 1; }
.age { font-size: 11px; color: var(--dim2); white-space: nowrap; }
.age.stale { color: var(--warn); }
.badge {
  font-size: 10px; letter-spacing: .14em; color: var(--warn);
  border: 1px solid var(--warn-line); background: var(--warn-bg); padding: 1px 6px;
  flex: 0 0 auto; white-space: nowrap;
}

.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-bad { color: var(--bad); }
.tone-info { color: var(--info); }
.tone-dim { color: var(--dim2); }

/*
 * A problem line is whatever the source wrote, and several of them are many
 * lines of recovery instructions. Preserving the newlines keeps that readable
 * rather than collapsing it into one paragraph.
 *
 * The height cap is five lines of the banner's own 11.5px text plus its
 * padding. One source wrote a coordination failure that wrapped to about ten
 * lines and took about 230px of the 800px window before a single card started,
 * which pushed two of five teams off the screen (measured over the DevTools
 * Protocol at 1180x800, 2026-08-24). The first line of a failure is always
 * visible, the rest scrolls here, and the length of one string can no longer
 * cost the fleet its space.
 */
.banner {
  flex: 0 0 auto;
  max-height: calc(7.5em + 20px);
  overflow-y: auto;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; white-space: pre-wrap;
  container-type: scroll-state;
}
.banner.bad { background: var(--bad-bg); color: var(--bad); border-bottom-color: var(--bad-line); }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-bottom-color: var(--warn-line); }
/* The snapshot line (static snapshot, 2026-11-08): a fact, not a fault. Stale, it takes `.warn`. */
.banner.note { background: var(--head); color: var(--text2); }

/*
 * The grid takes the height the header and the banners left, and divides it
 * between its rows. `minmax(220px, 1fr)` is the row track: 1fr gives each row
 * an equal share of that height, and the 220px floor stops a fleet with many
 * rows from squeezing every card down to a stub. A fleet past that floor
 * scrolls here rather than losing anything.
 */
/*
 * `main` holds one section per project, stacked, and each section holds the
 * grid of team cards that `main` used to hold directly. The grid moved down one
 * level rather than changing: a single project therefore lays out exactly as it
 * did before there could be several, which is what `npm run measure` checks.
 */
main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 26px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
/*
 * V19: `main` IS THE PAGE AREA, `#teams` IS THE CARD BOARD. Until v19 the card
 * board was `main` itself. It is now `#teams` inside the Fleet page, and it
 * keeps every rule `main` gave it: it takes the height the page leaves, and it
 * scrolls inside itself, so the "next project below" line still reads its
 * bottom edge. `[hidden]` needs its own rule because `display: flex` outranks
 * the browser's, the trap `.update:not([hidden])` records.
 */
.board { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.board[hidden] { display: none; }

/*
 * THE SPACING IS TIGHTER THAN IT WAS, AND THE HEIGHT IT RETURNS IS MEASURED
 * (v11, issue #149). With `goal` and `last` drawn first, a card shows both
 * whole only if its field rows have room for about 11 lines. At 1180x773, with
 * the three failed projects on this machine on one line, the field rows had
 * 192px and needed 231px for the two longest pairs (`npm run measure`,
 * 2026-10-14). These gaps and paddings returned that height:
 * `main` 18px to 12px top and bottom and its gap 14px to 10px, a section's
 * gap 10px to 6px, the card grid's gap 14px to 10px, and inside each card
 * the top strip, the field rows and the footer 10px, 10px and 8px to 6px,
 * 6px and 5px.
 */

/*
 * THE HEIGHT HAS TO REACH THE GRID. `main` used to be the grid itself, so its
 * height went straight to `grid-auto-rows: minmax(220px, 1fr)` and the rows
 * divided what was left of the window. With a section in between, both links
 * have to pass the height on or the grid sizes to its content and the cards run
 * off the bottom: written without these, `npm run measure` reported 2 cards past
 * the viewport and a lowest bottom of 921.75 against a 800px window.
 *
 * `min-height: 0` on both, because a flex item's default minimum is its content
 * and that is what stops it shrinking to its share.
 *
 * THIS IS A CONVENTION AND NOT A STRUCTURE, WHICH IS THE RISK. Every element
 * between `main` and `.cards` has to carry both lines by hand. Adding a third
 * level, a wrapper around `.proj` or a scroll container inside it, breaks the
 * contract again unless that level carries them too. The test below cannot see
 * it: it asserts the declarations on selectors that exist, and a selector that
 * does not exist yet cannot be checked. `npm run measure` is what catches it,
 * and only if somebody runs it. If you are adding a level here, give it
 * `flex: 1 1 auto; min-height: 0` and add it to that test.
 *
 * ONE EXCEPTION, WITH SEVERAL PROJECTS (v13, issue #657). Shrunk to share
 * `main`, a section is shorter than its cards, whose rows keep a 220px floor,
 * and the next section starts where the shrunk one ends. The next project's
 * heading and banner then drew over the previous project's cards: 8 elements
 * overlapping, the largest by 109.5px, measured on registry C at c3b31f9. The
 * rule after the v11 one below stops a section that holds cards shrinking
 * when there are several projects, and makes it at least as tall as `main`'s
 * visible area, so its grid still divides one window's height. `main` then
 * scrolls to reach later projects. One project keeps this rule unchanged.
 */
.proj { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; }

/*
 * A SECTION WITH NO CARDS TAKES ITS OWN HEIGHT AND NO MORE (v11). A project
 * that could not be read, or that holds no teams, has no grid to pass height
 * to. Given the share above, `min-height: 0` let the grid's sections squeeze
 * it below its text, and three failed projects drew their lines over each
 * other on this machine on 2026-10-14. `:has()` keys the rule on what the
 * section holds, so the renderer adds no class for it.
 */
.proj:not(:has(> .cards)) { flex: 0 0 auto; }

/*
 * A SECTION WITH CARDS, WHEN THERE ARE SEVERAL PROJECTS, TAKES ITS OWN HEIGHT
 * AND AT LEAST ONE WINDOW (v13, issue #657). `.proj-head` is the key because
 * `renderer.ts` draws a section heading exactly when the view holds more than
 * one project, so this follows the renderer's own decision and it adds no
 * class. `:has(> .cards)` leaves a section with no teams at its one line.
 * `main >` leaves the failed projects inside `.proj-run` to the rules below.
 * `min-height: 100%` resolves against `main`'s content box, which has a
 * definite height from the body's column. No element matches both this rule
 * and any other rule that overrides `.proj`, so neither specificity nor source
 * order decides a section's `flex`.
 */
.board > .proj:has(> .proj-head):has(> .cards) { flex: 0 0 auto; min-height: 100%; }

/*
 * Consecutive projects with no reading share one wrapping row (`renderer.ts`
 * states why), about three to a line at the default window. One that is
 * opened takes the whole line so its sentence can wrap.
 */
.proj-run { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.proj-run > .proj { flex: 1 1 320px; min-width: 0; }
.proj-run > .proj:has(.open) { flex-basis: 100%; }

.cards {
  flex: 1 1 auto; min-height: 0;
  display: grid; gap: 10px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-auto-rows: minmax(220px, 1fr);
}

/*
 * The project's own line. `--dim2` on the page background measures 5.10:1, the
 * figure the file header records for that pairing, and the name is `--white` on
 * the same background.
 */
.proj-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.proj-name {
  color: var(--white); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .16em;
}
.proj-bad { color: var(--bad); font-size: 11px; }
/* The cross before a failed project's name: the mark that does not rely on colour. */
.proj-fail { color: var(--bad); font-size: 11px; }

/*
 * A FAILED PROJECT IS ONE LINE (v11). Its failure sentence names a path and
 * wrapped to two lines, 3 times over, above the team grid. The name and the
 * start of the sentence ("Could not take a reading") always draw; the rest is
 * cut at the window's edge, the expand control after it shows while it is
 * cut, and pressing it wraps the whole sentence. The tooltip holds it too.
 */
.proj-head:has(> .proj-bad) { flex-wrap: nowrap; }
.proj-head:has(> .proj-bad) > * { flex: 0 0 auto; }
.proj-head > .proj-bad { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; }
.proj-head.open { flex-wrap: wrap; }
.proj-head.open > .proj-bad { white-space: normal; flex-basis: 100%; }

/*
 * The root, drawn beside the name only when another known project shares that
 * name. `--dim2` on the page background measures 5.10:1, the figure the file
 * header records for that pairing.
 */
.proj-root { color: var(--dim2); font-size: 11px; }

/*
 * The card takes its content's height and stops at its row's share of the
 * window. Its header and its footer keep their space, and the field rows take
 * what is left and scroll when the values are long, so the team name, the mark
 * and the failure lines stay on screen for every team at once.
 */
.head {
  display: flex; flex-direction: column;
  min-height: 0; max-height: 100%;
  border: 1px solid var(--line); background: var(--panel);
}
.head, .need { border-radius: 10px; }
.head .top, .need > .top { border-radius: 9px 9px 0 0; }
.head.attn { border-color: var(--bad-line); }
.head .top {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 13px; background: var(--head); border-bottom: 1px solid var(--line2);
}
.head.attn .top { background: var(--bad-bg); border-bottom-color: var(--bad-line); }
.mark { font-size: 13px; }
.name { color: var(--white); font-weight: 600; font-size: 13.5px; }
/*
 * A RETIRED OR DORMANT TEAM (v14). `.badge` alone is amber and `.prob` is red,
 * and neither colour is true of a team that is not meant to be working. `--dim2`
 * on the card's top strip `--head` is the pair `test/renderer.test.mjs` measures.
 * No `display` on any of the three, so `[hidden]` keeps winning.
 */
.badge.off { color: var(--dim2); border-color: var(--line2); background: none; }
.head.off .name { color: var(--dim2); }
.head.off .prob { color: var(--dim2); }

.rows {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 6px 13px; display: flex; flex-direction: column; gap: 5px;
  container-type: scroll-state;
}
/*
 * A field area that scrolls is in the Tab order (`renderer.ts`,
 * `followScrollers`). Its ring is the one the browser draws on a focused
 * value, `outline: auto`, so the two scrolling regions read the same.
 */
.rows:focus-visible { outline: auto; }

/*
 * The row gap is 2px and the column gap 10px. A row has a second grid row only
 * when its expand control is drawn, and 2px keeps the control against the
 * value it opens rather than halfway to the next field.
 */
.row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 10px; align-items: baseline; }
.lbl { color: var(--dim2); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
/*
 * A field value is one line for most fields and several for a team whose goal
 * is a sentence. Every value is bounded and the rest of a longer one scrolls
 * inside its own box, so one value cannot take the space the other six fields
 * need. Two lines is the default, and `last` gets four. Both numbers were
 * measured, and the second one overturned what the first draft of this change
 * assumed.
 *
 * WHAT EACH FIELD WANTS. Over the DevTools Protocol at the app's own 1180x800
 * (`src/main.ts:105-106`), against the five teams on this machine on
 * 2026-08-24, each value's `scrollHeight` states the lines it wants:
 *
 *   goal  1 3 7 5 6      last  3 3 4 4 4      on    1 1 4 1 2
 *   for   1 1 1 1 1      waits 1 1 1 1 1      today 1 1 1 1 1     session 1 1 1 1 1
 *
 * So `for`, `waits`, `today` and `session` want one line each. Lowering their
 * cap frees nothing: a cap bounds a value, it does not reserve space for one,
 * and a value that wants one line takes one line at any cap. Their two lines
 * also hold the notes, and `waits` wanted three lines in a later run when a
 * team recorded a longer decision. They keep the default.
 *
 * WHERE THE ROOM COMES FROM, AND WHY `goal` DOES NOT GET IT. The room for a
 * longer value is the depth the card scrolls, so a taller value pushes the
 * rows under it out of view. `goal` is the first row and `last` is the fifth,
 * so every line given to `goal` is a line taken from `last`. One run, eight
 * caps, five teams, 35 field rows. Readable means the row is in view and its
 * value is whole, with no scrolling anywhere:
 *
 *   goal:last     2:2   2:3   2:4   2:5   3:3   3:4   4:4
 *   last readable   0     2     4     4     2     3     2   of 5
 *   goal readable   1     1     1     1     2     2     2   of 5
 *   rows in view   33    29    27    27    27    25    24   of 35
 *   values whole   24    26    29    29    27    30    30   of 35
 *
 * 2:4 is the choice. It reads `last` whole and in view for 4 of the 5 teams
 * against 0 today, 5 gains nothing over 4, and every cap that widens `goal`
 * costs `last` more than it gains `goal`. Four lines is also what the
 * generator's own limit asks for: `fleet-data.ts:218` caps a value at 120
 * characters, and this column drew 37.8 characters a line in the same
 * measurement, so 3.2 lines holds the longest value a source can produce and
 * the fourth line holds a note under it. The two fields are not equal: a goal
 * the head cannot finish is written in the team's catalog definition, which is
 * a file that changes rarely, and a finding is only in the leader-state memory
 * of the iteration that wrote it (`docs/legibility-plan.md:19` records that
 * the finding has no other source). The 6 rows that leave the view are
 * `today` and `session` at the foot of the card, and the card now states that
 * it holds more.
 */
.val {
  overflow-wrap: anywhere;
  max-height: 2lh;
  overflow-y: auto;
  container-type: scroll-state;
}
/*
 * SINCE V11 `goal` AND `last` ARE DRAWN FIRST (`renderer.ts`), AND THE CAPS
 * STAY 2:4. With the two drawn first, a line given to `goal` moves `last`
 * down by one line and pushes one of the other five below the fold. Window-
 * relative, at 1180x773 with this machine's three failed projects,
 * `npm run measure -- --sweep` on 2026-10-14. The sweep does not print the
 * other five; that row is the same sweep from an uncommitted copy of the
 * script that adds the line `windowOtherReadable` already holds:
 *
 *   goal:last              2:4    3:4    4:4    5:4    6:4    7:4
 *   goal in the window     1/6    2/6    2/6    2/6    4/6    6/6
 *   last in the window     6/6    6/6    6/6    6/6    6/6    6/6
 *   other five             14/30  10/30  8/30   5/30   3/30   3/30
 *
 * No cap holds most goals whole and the other five at their 14/30 before
 * count together. The lead held the other five, because they include
 * `waits`, which answers "what is it stuck on". `goal` keeps the default two
 * lines, a cut goal gets the expand control, and a per-team detail view is
 * the follow-up for reading a whole goal at a glance.
 */
.row[data-field="last"] .val { max-height: 4lh; }
/*
 * AN `on` VALUE WITH A NOTE GETS FOUR LINES (v16). Since v16 an empty `on`
 * carries a note naming why, one value line plus one or two note lines, and
 * at the default two lines the note was cut and the expand control covered
 * it: 38px of box for 56px of content at 1180x773 (ui-tester, PR #996). Only
 * a row whose value holds a note gets the room, so an `on` that states an
 * iteration keeps the default and the fold the table above measured does not
 * move for a healthy team. Specificity (0,3,0), the same as the open rule
 * below, which comes later and so still lifts the cap.
 */
[data-field="on"]:has(.note) .val { max-height: 4lh; }
.row.open .val { max-height: none; }

/*
 * THE EXPAND CONTROL. A real button, drawn after a region its bound cuts, and
 * hidden while the region is whole. `renderer.ts` decides which, from the
 * region's own scroll size. The look is the header's Check button. Its
 * focus ring is 2px of `--info`, which measures 5.69:1 on the card `--panel`
 * (`contrast()` in `test/style.mjs`), above the 3:1 WCAG 2.1 asks of a focus
 * indicator. It is at least 24x24px, the target size WCAG 2.2 asks (2.5.8).
 *
 * IN A FIELD ROW IT TAKES NO LINE (v11). It is drawn over the bottom-right
 * corner of the value it opens, where the cut text ends and the cut marker's
 * fade is, so a row is the same height with the button as without it. On its
 * own line, the buttons on five cut goals pushed one more of the other five
 * fields below each card's fold: 10 of 30 read in the window against 14 of 30
 * with no button (`npm run measure`, 1180x773, 2026-10-14). The button is
 * the value's next sibling in the DOM and is drawn at the end of the value's
 * text, so the eye and the Tab key reach the two in the same order. Its
 * background is the card's own, opaque, so the text under it does not show
 * through. `grid-column: 2` makes the value's column its containing block.
 * An open value has no cap, and its button takes its own line under it.
 *
 * No `display` here: the browser's `[hidden] { display: none }` has to keep
 * winning, which is the trap `.update:not([hidden])` records.
 */
.more {
  grid-column: 2; justify-self: start;
  font: inherit; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  line-height: 20px; min-height: 24px; min-width: 24px;
  color: var(--info); background: var(--info-bg); border: 1px solid var(--info-line);
  padding: 1px 8px; cursor: pointer;
}
.row > .more { position: absolute; right: 0; bottom: 0; z-index: 1; background: var(--panel); }
.row.open > .more { position: static; }
.more:hover { color: var(--text); border-color: var(--info); }
.more:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.note { color: var(--dim2); font-size: 11px; }

/*
 * The footer names the memory the state was read from and every source that
 * did not answer, so it keeps its space rather than being pushed out by long
 * field values. Four lines of its own 11px text plus its padding, and a longer
 * list scrolls inside it.
 */
.foot {
  flex: 0 0 auto;
  max-height: calc(6em + 10px);
  overflow-y: auto;
  border-top: 1px solid var(--line); padding: 5px 13px; font-size: 11px; color: var(--dim2);
  container-type: scroll-state;
}
.prob { color: var(--bad); white-space: pre-wrap; }
.empty { flex: 0 0 auto; padding: 40px 18px; color: var(--dim); }

/*
 * THE SCREEN-LEVEL EMPTY STATE IS CENTRED, because a window with no projects is
 * the one screen where the operator has nothing else to look at, and this
 * sentence was at the foot of it. Measured at 1180x800 on 2026-08-28 before
 * this rule: `#empty` drew from y=701.25 to y=800, a 98.75px band under
 * 657.25px of nothing. The product owner reported the placement and the wording
 * together ("It just tells me this at the bottom") and only the wording changed.
 *
 * `main` is the cause, not `#empty`. `main` is `flex: 1 1 auto` and stays in
 * the body's column with no children, so it takes every pixel above `#empty`,
 * which follows it in normal flow (`src/index.html:53,61`). A `main` with
 * nothing in it therefore claims no space, and `#empty` takes the room instead.
 * `:empty` is exact here: `renderEnvelope` clears the element with
 * `teams.textContent = ''`, which removes text nodes as well as elements.
 *
 * `:not([hidden])` is load-bearing rather than decoration. A bare
 * `display: flex` on `#empty` would outrank the browser's
 * `[hidden] { display: none }` and draw the empty state across a window that
 * has a fleet in it, which is the trap `.update` above already records.
 *
 * `safe center` centres the sentence until centring would push it out of the
 * top of a window too short to hold it, and falls back to the start edge at
 * that point. A browser that does not know the keyword drops the declaration
 * and draws the sentence at the top, which is the same direction and not the
 * bottom.
 *
 * `.empty` inside a project section is a different message ("No teams in this
 * project.") and keeps the class rule above: these two selectors name the
 * screen-level element by id and do not reach it.
 */
main:empty { flex: 0 0 auto; padding: 0; }
.board:empty { flex: 0 0 auto; }

#empty:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column;
  justify-content: safe center;
  text-align: center;
}

/*
 * THE DETAIL PANEL'S OPENER (v12). Each card's team name is a button that
 * opens that team's panel. This rule takes the browser's button look off it,
 * so it draws as the name did and the card's header is the same height with
 * the button as with the span it replaced: `.name` still sets the colour, the
 * size and the weight, and these set back what a button changes. Its focus
 * ring is the expand control's, 2px of `--info`, which measures 5.25:1 on the
 * card's top strip `--head` (`contrast()` in `test/style.mjs`), above the 3:1
 * WCAG 2.1 asks of a focus indicator. No `display`, so `[hidden]` keeps
 * winning.
 */
.top > button.name {
  font-family: inherit; line-height: inherit; letter-spacing: inherit;
  background: none; border: 0; padding: 0; margin: 0;
  text-align: left; cursor: pointer;
}
.top > button.name:hover { text-decoration: underline; }
.top > button.name:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

/*
 * THE DETAIL PANEL (v12). One team's whole head, drawn over the card grid
 * inside the window, so a goal the card cuts at two lines reads whole without
 * opening a session or a file.
 *
 * STACKING. `position: fixed` and `z-index: 10`. The highest `z-index` inside
 * `#teams` is the `1` on `.row > .more`, and the only `position: sticky` rule
 * is the cut marker below, which declares no `z-index`. Both paint under 10.
 * The wide shadow dims the page behind the panel, which is inert while it is
 * open (`renderer.ts`, `setBackground`).
 *
 * NO LINE CAP. A panel value has no `max-height` and no scroller of its own,
 * which is the point of the panel. The panel itself stops 12px above the
 * window's foot and scrolls past that, which a payload with today's eight
 * fields does not reach at 1180x773. The panel's classes are its own, so no
 * card rule, cap or cut marker reaches into it, and `npm run measure` counts
 * no panel row as a card row.
 *
 * CONTRAST. Text and labels use the card's own pairs, which the file header
 * records: `--dim2` on `--panel` 4.95:1 and on `--head` 4.57:1. The close
 * button is the Check button's `--info` on #0d1620, 5.51:1.
 */
.detail {
  position: fixed; z-index: 10;
  top: 56px; left: calc(var(--side) + 18px); right: 18px; margin: 0 auto;
  max-width: 820px; max-height: calc(100% - 68px); border-radius: var(--r-sm);
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line2) transparent;
  background: var(--panel); border: 1px solid var(--line2);
  box-shadow: 0 0 0 100vmax var(--scrim), var(--dlg-shadow);
}
.detail-top {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; background: var(--head); border-bottom: 1px solid var(--line2);
}
.detail-name { margin: 0; color: var(--white); font-weight: 600; font-size: 13.5px; line-height: inherit; }
/*
 * THE MARK NOTE WRAPS AND THE CLOSE BUTTON KEEPS ITS WIDTH (v16). A long mark
 * note took its room from the close button: at 360px it was 29px wide for 45px
 * of label, and the label ran past its border and gave the panel a horizontal
 * scrollbar, 324px of content in 322px (ui-tester, PR #996). The note yields
 * instead: it may shrink and break inside a word, and the button never shrinks.
 * The rule names `.mark-note` alone. Written for every `.note` in the row, it
 * also reached the display name, which then broke letter by letter at 360px,
 * `Ep / si / lon / n` in a 15px column (ui-tester re-check, PR #996).
 */
.detail-top > .mark-note { min-width: 0; overflow-wrap: anywhere; }
.detail-name:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.detail-close {
  margin-left: auto;
  font: inherit; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  line-height: 20px; min-height: 24px; min-width: 24px;
  color: var(--info); background: var(--info-bg); border: 1px solid var(--info-line);
  padding: 1px 8px; cursor: pointer;
  flex-shrink: 0;
}
.detail-close:hover { color: var(--text); border-color: var(--info); }
.detail-close:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.detail-rows { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.detail-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 10px; align-items: baseline; }
.detail-val { overflow-wrap: anywhere; }
.detail-foot { border-top: 1px solid var(--line); padding: 6px 14px; font-size: 11px; color: var(--dim2); }

/*
 * NEXT PROJECT BELOW (v13, issue #657). With several projects `main` scrolls,
 * and this line under it names the first project whose heading is below
 * `main`'s visible bottom. Pressing it scrolls that project to the top. It is
 * a direct child of the body, not a flex item of `main` and not generated
 * content, so it takes nothing from `main`'s scroll height. With one project
 * it is `hidden` and takes no space.
 *
 * No `display` here: the browser's `[hidden] { display: none }` has to keep
 * winning, which is the trap `.update:not([hidden])` records. With nothing
 * below, `.none` hides it with `visibility`, which keeps its line, so the
 * window does not change height and lay out again as the operator scrolls,
 * and takes it out of the Tab order and the accessibility tree.
 *
 * CONTRAST. `--dim2` on the page `--bg` measures 5.10:1, the figure the file
 * header records, and the focus ring is the opener's 2px of `--info`.
 */
.below {
  flex: 0 0 auto;
  margin: 0; padding: 4px 18px 6px;
  font: inherit; font-size: 11px; letter-spacing: .06em; text-align: left;
  color: var(--dim2); background: none; border: 0; border-top: 1px solid var(--line);
  cursor: pointer;
}
.below:hover { color: var(--white); }
.below:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.below.none { visibility: hidden; }
.below-mark { margin-right: 8px; }

/*
 * THE LIVE REGION (v12). Empty, it is a zero-height line under the header and
 * costs the cards nothing. When the open team leaves the view it states so in
 * one line until the next redraw, 30 seconds later. `--dim2` on the header's
 * #11151a measures 4.83:1, the figure the file header records.
 */
.live { flex: 0 0 auto; }
.live:not(:empty) {
  padding: 6px 18px; font-size: 11.5px;
  color: var(--dim2); background: var(--panel); border-bottom: 1px solid var(--line);
}

/*
 * THE V2 FRAME (v19, roadmap row 13, issue #1087 phase 1). Ported from
 * `ui/prototype/v2/index.html`, the "frame" and "narrow: icon rail" blocks:
 * a 248px side nav and a column holding the top bar, the banners and the page.
 * Below 1100px the side nav becomes a 70px rail of icons, whose labels stay
 * in the accessibility tree, as the prototype's do.
 *
 * `#app` is one direct child of the body, so an open detail panel makes all of
 * it inert, and the live region above it is not inside it.
 */
.app { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side {
  background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 18px 14px 14px; gap: 14px; min-height: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line2) transparent;
}
.logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--logo1), var(--logo2)); display: grid; place-items: center; color: var(--on-acc); flex: 0 0 auto; }
.logo svg { width: 20px; height: 20px; stroke: var(--on-acc); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-t { display: flex; flex-direction: column; line-height: 1.2; }
.brand-t b { font-size: 15px; }
.brand-t span { font-size: 11.5px; color: var(--dim2); }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/*
 * THE SIDE NAV. Group headings, then one button per page. The pinned projects
 * are their own group (`#pins`), rebuilt when the pins change. The selected
 * entry carries `aria-current="page"`, the accent tint, and a 3px bar on its
 * start edge, so it is marked by more than colour (the v17 rule from ui-tester
 * Should Fix 1, PR #1035, kept in the new shape). Every button is at least
 * 24x24px, the target size WCAG 2.2 asks (2.5.8).
 *
 * CONTRAST. Entries are `--text2`, the selected one `--acc-text` on
 * `--acc-tint`, and an entry for a page not built yet `--dim2` on `--panel`.
 * `test/shell.test.mjs` measures these pairs in both themes.
 */
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-h { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; color: var(--dim2); text-transform: uppercase; padding: 12px 10px 4px; }
.nav-b {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 34px; padding: 7px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--text2); text-align: left; font-weight: 500; cursor: pointer; position: relative;
}
.nav-b:hover { background: var(--head); color: var(--text); }
.nav-b[aria-current="page"] { background: var(--acc-tint); color: var(--acc-text); box-shadow: inset 3px 0 0 var(--acc); }
.nav-b.unbuilt { color: var(--dim2); }
.nav-b.unbuilt[aria-current="page"] { color: var(--acc-text); }
.nav-b:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.nav-b .lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-b .grow { flex: 1; }
.nav-b.add { color: var(--dim2); flex-wrap: wrap; row-gap: 2px; }
/* New project's second line, `waits for the Azure runner`, under its label. */
.nav-b .nav-note { flex-basis: 100%; padding-left: 29px; font-size: 10.5px; font-weight: 400; color: var(--dim2); }
.nav-pins { display: flex; flex-direction: column; gap: 2px; }
.nav-empty { font-size: 12px; color: var(--dim2); padding: 4px 10px 6px; }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--badge); color: var(--on-badge); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; flex: 0 0 auto; }
.count.unknown { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
/*
 * `display: inline-grid` above outranks the browser's `[hidden]` rule, so an
 * empty count the script hides drew as a red dot on every nav entry. Found by
 * the first headless screenshot of the web app (v19, 2026-11-08); the desktop
 * stylesheet at 8983833 has the same rule and was never screenshotted.
 */
.count[hidden] { display: none; }
.pav { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 9.5px; font-weight: 650; background: var(--acc-tint); color: var(--acc-text); flex: 0 0 auto; position: relative; }
.pdot { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--panel); }
.d-ok { background: var(--ch-ok); } .d-bad { background: var(--ch-bad); } .d-warn { background: var(--ch-warn); } .d-off { background: var(--ch-off); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.theme-b .moon { display: none; }
:root[data-theme="dark"] .theme-b .moon { display: block; }
:root[data-theme="dark"] .theme-b .sun { display: none; }

/*
 * The crumbs: the project the bar reads from, then the page. They do not
 * shrink, like the v17 header items they hold (`.slug` was one), so the update
 * notice stays the one thing that gives way when the window is narrow. The page
 * name is capped instead, and is hidden below 760px with the separator.
 */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--dim2); white-space: nowrap; flex: 0 0 auto; }
.crumbs b { color: var(--text); font-weight: 600; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--faint); }

/*
 * A PAGE. One `<section class="page">` per route, all but one hidden. The
 * prototype's `.page`, `.ph` and `.strip`. Fleet is `.page.fill`: it takes the
 * whole page area and its team view scrolls inside itself, so the card board
 * keeps the bounded layout v11 to v17 measured.
 */
.page { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 1480px; margin: 0 auto; flex: 0 0 auto; }
.page[hidden] { display: none; }
.page.fill { flex: 1 1 0; min-height: 0; }
.page-head { display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto; }
.ph { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ph .t { flex: 1; min-width: 220px; }
.ph h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph h1:focus { outline: none; }
.ph p { margin: 4px 0 0; color: var(--dim2); }
.strip {
  display: block; padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-ink); font-size: 12.5px;
}
.strip > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.strip > summary::-webkit-details-marker { display: none; }
.strip > summary .st { flex: 1; min-width: 0; }
.strip > summary .more-k { color: var(--info-k); font-weight: 600; white-space: nowrap; }
.strip svg.i { width: 16px; height: 16px; color: var(--info); }
.sdl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 2px 24px; }
.sdl dt { color: var(--info-k); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding-top: 2px; }
.sdl dd { margin: 0; overflow-wrap: anywhere; }

/* Cards, tabs and buttons, from the prototype. */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-b { padding: 14px 18px 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: 0 0 auto; }
.tab { border: 0; background: none; padding: 8px 10px; min-height: 24px; color: var(--text2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: var(--acc-text); border-bottom-color: var(--acc); }
.tab:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-weight: 550; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--head); }
.btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.null { color: var(--dim2); font-style: italic; }
.unread { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r-sm); background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.placeholder { padding: 40px 24px; text-align: center; color: var(--dim2); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.placeholder b { color: var(--text); font-size: 15px; }
.placeholder code, .card code { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 12px; background: var(--head); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }

/*
 * THE NEW PROJECT PAGE (v20 slice A, row 5). Only the signed-in server's
 * client draws it; the snapshot client's New project page is the placeholder
 * above. The rules are the prototype's (`ui/prototype/v2/index.html`, "New
 * project page and the setup checklist", the stepper, `.kv`, `.field`,
 * `.inp`, `.pill`, `.card-h` and `.btn.primary`), with the v17 names
 * `--panel` for its `--card` and `--head` for its `--soft`. Added: the
 * stand-in banner `.np-standin`, the alert with Retry `.np-alert`, and the
 * visibility pair `.np-vis`.
 */
.stepper { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stp { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim2); font-weight: 550; }
.stp i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11.5px; border: 1px solid var(--line2); background: var(--panel); }
.stp.on { color: var(--acc-text); }
.stp.on i { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.stp.done i { background: var(--acc-tint); border-color: var(--acc-tint); color: var(--acc-text); }
.stp-line { width: 26px; height: 1px; background: var(--line2); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-h h2 { margin: 0; font-size: 15px; font-weight: 650; flex: 1; min-width: 120px; }
.card-h .sub { color: var(--dim2); font-size: 12.5px; font-weight: 400; margin-left: 6px; }
.np-card { max-width: 860px; }
.npf { display: flex; flex-direction: column; gap: 8px; }
.npacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 14px; }
.kv .k { color: var(--dim2); font-size: 12.5px; }
.kv > span { overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text2); }
.inp { height: 34px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); padding: 0 9px; min-width: 140px; color: var(--text); font: inherit; }
.inp:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
/*
 * An invalid name. The border is --bad, not --bad-line: --bad-line on --panel
 * is 1.57:1 in both themes, under the 3:1 a control's state needs (WCAG
 * 1.4.11), and --bad is 5.57:1 light and 6.59:1 dark (test 11). The error line has both `hint` and
 * `tone-bad`, and `.hint` comes after `.tone-bad`, so at equal weight it drew
 * the error grey. `.hint.tone-bad` outweighs both.
 */
.inp[aria-invalid="true"] { border-color: var(--bad); }
.hint { margin: 0; color: var(--dim2); font-size: 12px; }
.hint.tone-bad { color: var(--bad); }
.mono { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.btn.primary:hover { background: var(--acc-hover); border-color: var(--acc-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.np-vis .btn[aria-pressed="true"] { border-color: var(--acc-line); background: var(--acc-soft); color: var(--acc-text); }
.np-vis { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 20px; }
.pill.plain { color: var(--text2); background: var(--head); }
.p-ok { color: var(--ok); background: var(--ok-bg); }
.p-warn { color: var(--warn); background: var(--warn-bg); }
.p-bad { color: var(--bad); background: var(--bad-bg); }
.p-info { color: var(--info); background: var(--info-bg); }
.np-tag { margin-left: 8px; }
.np-public { margin: 0; font-size: 12.5px; font-weight: 600; }
.np-standin {
  margin: 0; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 12.5px;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
}
.np-alert {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: var(--r-sm);
  background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad); font-weight: 600; font-size: 12.5px;
}
.np-alert[hidden] { display: none; }
.redone { display: flex; flex-direction: column; gap: 6px; }
.redone ul { margin: 0; padding-left: 18px; }
/* R8 phase 0.5, ui-tester UI-1 (PR #1354): a path wraps anywhere, so no path overflows the card at 320 px. */
.redone li { overflow-wrap: anywhere; }
/* UI-2 and UI-3: the file list is a closed <details>; its summary names it and states the count. */
.redone summary { cursor: pointer; }
.redone details ul { margin-top: 6px; }
.chk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chk li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.chk li.failed { border-color: var(--bad-line); background: var(--bad-soft); }
.chk .gl { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line2); color: var(--dim2); }
.chk li.passed .gl { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.chk li.failed .gl { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.chk li.could-not-run .gl { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.chk li.running .gl { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.chk .ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chk .ct span { color: var(--text2); font-size: 12.5px; overflow-wrap: anywhere; }
/* v27c: the disabled Push files control under the pushed row's message. */
.np-push { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
@media (max-width: 1100px) { .chk li { grid-template-columns: 24px minmax(0, 1fr); } .chk li > .pill { grid-column: 2; justify-self: start; } }

/*
 * THE FLEET TABLE AND THE PROJECTS TABLE. The prototype's `.ftbl` and `.ptbl`:
 * one row per team, grouped by project, each cell one line cut with an
 * ellipsis and whole on its tooltip. The table card scrolls inside itself, and
 * its header row stays at the top while it does.
 */
.ftbl { flex: 0 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ftbl[hidden] { display: none; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: middle; padding: 8px 9px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim2); font-weight: 600; white-space: nowrap; background: var(--head); position: sticky; top: 0; z-index: 1; }
.ftbl table { table-layout: fixed; }
.ftbl td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
tbody tr:hover td { background: var(--row-hover); }
tr.frow.attn td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.grp td { background: var(--head); font-weight: 650; font-size: 12.5px; color: var(--text2); padding: 7px 10px; }
tr.grp td .tone-dim { font-weight: 500; }
tbody tr.grp:hover td { background: var(--head); }
.ft-name { border: 0; background: none; padding: 0; min-height: 24px; font-weight: 600; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; cursor: pointer; }
.ft-name:hover { color: var(--acc-text); text-decoration: underline; }
.ft-name:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.ft-mark { margin-right: 6px; }
.pinb { border: 0; background: none; padding: 4px; min-width: 28px; min-height: 28px; border-radius: 6px; color: var(--dim2); display: inline-grid; place-items: center; cursor: pointer; }
.pinb:hover { background: var(--head); color: var(--text); }
.pinb[aria-pressed="true"] { color: var(--acc-text); }
.pinb[aria-pressed="true"] svg.i { fill: currentColor; }
.pinb:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.ptbl .pnm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ptbl .pr-root { font-size: 11.5px; color: var(--dim2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; }
.ptbl td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-note { padding: 10px 18px 14px; font-size: 12.5px; color: var(--dim2); }

/* Below 1100px the side nav is a rail of icons, as in the prototype. */
@media (max-width: 1100px) {
  :root { --side: 70px; }
  .side { padding: 16px 10px; align-items: center; }
  .brand { padding: 0; }
  .brand-t, .nav-h, .side .lt, .side .nav-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-h { padding: 0; }
  .nav { width: 100%; gap: 4px; }
  .nav-sep { display: block; height: 1px; background: var(--line); margin: 6px 8px; }
  .nav-b { justify-content: center; padding: 10px 0; }
  .nav-b .count { position: absolute; top: 2px; right: 4px; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  .nav-empty { display: none; }
  main { padding: 16px 16px 20px; }
}
.nav-sep { display: none; }
@media (max-width: 760px) {
  .crumbs .hide-s { display: none; }
}

/* `--dim2` on the page `--bg`. */
.place-note { margin: 0; color: var(--dim2); font-size: 11px; }
/*
 * The unread-teams line above Needs you (red-team condition 1, PR #1035), in
 * the warn tone the board uses for an unreadable team. `--warn` on `--bg`
 * measures 7.96:1 (`contrast()` in `test/style.mjs`).
 */
.place-note.needs-unread { color: var(--warn); }

/*
 * A NEEDS YOU ENTRY (v17). The card's own vocabulary: its top strip with the
 * mark and the name that opens the panel, then `for` and `waits` as card rows,
 * with the same two-line cap and the same expand control. Its background is
 * `--panel`, so the labels and notes keep the 4.95:1 the file header records.
 */
.need-proj { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.need-proj > .proj-bad { overflow-wrap: anywhere; }
.need { flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel); }
.need > .top {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 13px; background: var(--head); border-bottom: 1px solid var(--line2);
}
.need-rows { padding: 6px 13px; display: flex; flex-direction: column; gap: 5px; }

/*
 * THE CUT MARKER. A bounded region that holds more than it draws says so.
 *
 * Four regions on this page cap their height and scroll: a field value, a
 * card's field rows, a banner and a card's footer. Before this, the only cue
 * that one of them held more was its 12px scrollbar, and issue #149 records
 * what that costs: bootstrap's goal ended "framework creates work on the" in
 * the evidence screenshot for iteration v1, and a sentence that stops
 * mid-clause above a thin scroll track reads as a finished sentence. A red
 * team and a tester both raised it against v1.
 *
 * The marker is a fade into the region's own background with a small triangle
 * at the cut. It is drawn only while the region can still scroll down: each
 * region is a `scroll-state` container, so the marker states the region's
 * actual state rather than a guess. Scroll to the end and it stops, which is
 * what tells the reader they have reached the end.
 *
 * The triangle rather than an ellipsis: `fleet-data.ts:218-220` shortens a
 * finding, an iteration and a decision to 120 characters and writes an
 * ellipsis at the cut, so a value can hold one of its own. Two marks that mean
 * different things have to look different. An ellipsis in the text means the
 * generator shortened the string, and the whole string is not on this machine;
 * the triangle means this box holds more of the string it was given.
 *
 * It takes no space. The marker is in flow, and its height and, inside the
 * flex column of `.rows`, the gap above it, are taken back by a negative
 * margin, so a region's `scrollHeight` is the same with the marker drawn as
 * without it. The negative `bottom` holds it against each region's padded
 * edge rather than that many pixels above it.
 *
 * The triangle is generated content with empty alternative text, so it is a
 * mark for the eye and not a character in the value. Nothing here changes what
 * `textContent` holds: every region still holds its whole string, and reaches
 * the rest of it by scrolling.
 *
 * `main` is not in this list. It is a flex column, so a generated child would
 * become a flex item of its own and add `main`'s 10px gap to its scroll
 * height. The fleet-level region keeps the scrollbar it had, and with several
 * projects the "next project below" line under `main` states what it holds.
 */
.val::after, .rows::after, .banner::after, .foot::after {
  content: '\25be' / '';
  display: none;
  position: sticky;
  height: 1lh;
  margin-top: -1lh;
  text-align: right;
  color: var(--dim2);
  pointer-events: none;
}
.val::after { bottom: 0; }
.rows::after { bottom: -6px; margin-top: calc(-1lh - 5px); }
.banner::after { bottom: -10px; }
.foot::after { bottom: -5px; }

.val::after, .rows::after, .foot::after {
  background: linear-gradient(to bottom, transparent, var(--panel) 65%);
}
.banner.bad::after { background: linear-gradient(to bottom, transparent, var(--bad-bg) 65%); }
.banner.warn::after { background: linear-gradient(to bottom, transparent, var(--warn-bg) 65%); }

@container scroll-state(scrollable: bottom) {
  .val::after, .rows::after, .banner::after, .foot::after { display: block; }
}
/*
 * signin-screen.css: Screen A and the identity button (design
 * `docs/create-project-design.md`, revision 5a, R5.5; first built for
 * revision 4.2, R4.5 and R41.4). Renamed from `standin-signin.css` in phase 2.
 * In the server target only: `scripts/build.mjs --target server` appends this file
 * to the server client's `style.css`, so the snapshot site's stylesheet stays
 * byte-identical to its reviewed build. The card, field, pill, alert and
 * stand-in banner reuse the New project page's rules above.
 */
.signin { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; background: var(--bg); }
.signin[hidden] { display: none; }
/*
 * Screen A hides `#app` with the `hidden` attribute (signin-screen.ts), and
 * `.app { display: grid }` in style.css outranks the browser's `[hidden]`
 * rule, the trap `.count[hidden]` and `.board[hidden]` record there. Without
 * this rule the app stayed drawn under Screen A: its 21 controls took Tab and
 * reached screen readers, and Enter on the first one went to #/fleet
 * (KI-SURFACE-WEB-HIDDEN-APP-FOCUSABLE, ui-tester SC-6, 2026-11-21). It is
 * here rather than beside `.app` because only the server client hides `#app`,
 * and style.css is the snapshot site's reviewed file.
 */
.app[hidden] { display: none; }
.signin-card { width: 100%; max-width: 480px; }
.idwrap { position: relative; margin-left: 10px; flex: 0 1 auto; min-width: 0; max-width: 320px; }
.idwrap[hidden] { display: none; }
/*
 * A long email truncates (KI-SURFACE-WEB-IDENTITY-LABEL-TRUNCATED); the
 * button's title and aria-label hold the whole email. The holder shrinks in
 * the top bar's flex row (min-width 0) and the button fills at most the
 * holder, so at 390 px and 320 px the email ellipsizes and the bar does not
 * overflow (ui-tester Should Fix, review of 624713e4).
 */
.idbtn { max-width: 100%; display: inline-flex; align-items: center; white-space: nowrap; overflow: hidden; }
@media (max-width: 420px) { .idwrap { margin-left: 4px; max-width: 45vw; } }
.idmail { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/*
 * THE ACCOUNT STAYS READABLE ON A PHONE (KI-SURFACE-PHONE-ACCOUNT-CHIP-CLIPPED).
 * Measured in headless Chrome 149 on 2026-11-29: at 390x844 the email had
 * 31 px ("po@" and an ellipsis); at 320x640 it had 0 px and the button ran
 * 29 px past the viewport. The slug, STALE badge and age refuse to shrink
 * (style.css, "THE HEADER'S OWN ITEMS DO NOT WRAP"), so the chip got what
 * they left. Here the chip takes back the empty `.grow` spacer's 10 px gap
 * (the crumbs' auto margin does the spacer's work), its 4 px margin and
 * 12 px of padding: 57 px of email at 390 px ("po@exa..."). At 380 px and
 * below that is still not enough, so the header's age gives way: the
 * snapshot line under the header states the same age on every page
 * (`snapshotLine()` and `withSnapshotClock()` in app.ts).
 */
/*
 * `>` keeps this to the bar's own spacer. `.topbar .grow` also hid the failed
 * sign-out alert's message, a `span.grow` inside `.idmenu`, which the
 * identity holder puts in the top bar: at 390 px the alert showed only Retry
 * (ui-tester on #1671, comment 7256653521).
 */
@media (max-width: 420px) {
  .topbar > .grow { display: none; }
  .topbar .crumbs { margin-right: auto; }
  .idwrap { margin-left: 0; }
  .idbtn { padding: 0 8px; }
}
@media (max-width: 380px) { .topbar .age { display: none; } }
/*
 * A LONG PROJECT SLUG TRUNCATES, THE ACCOUNT BUTTON KEEPS ITS WIDTH
 * (KI-SURFACE-PHONE-LONG-SLUG-SQUEEZE). Measured in headless Chrome 149 on
 * 2026-11-29 with the 24-character slug "customer-portal-staging-": the slug
 * drew 196 px and refused to shrink, so the button fell to 18 px (no email)
 * and the page ran to 364 px at 320 and 360, 454 to 461 px at 390 and 420,
 * and 486 to 493 px at 421 and 480. Below 760 px the crumbs hold only the
 * slug (`.hide-s` hides the page name), so here they shrink, 99 times faster
 * than the account button, and the slug ellipsizes. They keep 66 px, just
 * over the 65.5 px "MX-AGENT" draws at the phone's 12 px: a slug that short
 * is never cut, a longer one is cut to that room, and the button keeps what
 * it had beside MX-AGENT. It gives way only after that, never below 24 px
 * (WCAG 2.2, 2.5.8). The desktop rule in style.css ("THE HEADER'S OWN ITEMS
 * DO NOT WRAP") is unchanged: this file reaches the server client only.
 */
@media (max-width: 760px) {
  .topbar .crumbs { flex: 0 99 auto; min-width: 66px; }
  .topbar .slug { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .idwrap { min-width: 24px; }
}
/* The menu's first line, the whole email. A long one wraps inside the menu. */
.idwho { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); color: var(--dim2); font-size: 12.5px; overflow-wrap: anywhere; }
/* Under it, the whole project slug the top bar cuts on a phone (KI-SURFACE-PHONE-SLUG-NO-REVEAL). */
.idproj { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); color: var(--dim2); font-size: 12.5px; overflow-wrap: anywhere; }
.idmenu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; display: flex; flex-direction: column; gap: 4px;
  padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow);
}
.idmenu[hidden] { display: none; }
/*
 * A PENDING SIGN-OUT LOOKS BUSY (ui-tester on #1693, comment 7257927716): the
 * account menu's Sign out and Retry, and Settings' Sign out, carry
 * `aria-busy="true"` while the request is pending (signin-screen.ts,
 * `markSignOutBusy`). Grey text, with the progress cursor. No size, spacing
 * or font property changes, so the text stays at its size and the phone
 * layout does not move.
 *
 * READABLE WHILE BUSY (KI-SURFACE-SIGNOUT-BUSY-LOW-CONTRAST). Opacity 0.6 on
 * the whole button measured 2.88:1 for the menu's Sign out against white
 * (ui-tester on #1693, comment 7259333457). `--dim2` is a colour, not a
 * blend: #636c80 on the light `--panel` #ffffff and #959eaf on the dark
 * #161921, both over 4.5:1 (`test/signin-screen.test.mjs` measures them).
 * The selectors outrank every `.nav-b` and `.btn` colour rule, `.nav-b:hover`
 * included, so a hovered busy entry stays grey (red-team finding 6 on #1698).
 * `.btn.primary` is left out on purpose: `--dim2` on `--acc` measures 1.1:1
 * light and 1.89:1 dark, and no sign-out control is a primary button.
 */
button.nav-b[aria-busy="true"], button.btn:not(.primary)[aria-busy="true"] { color: var(--dim2); cursor: progress; }
/*
 * THE SIGN-OUT STATUS LINE (KI-SURFACE-SIGNOUT-FAIL-HIDDEN-BEHIND-INERT). A
 * sign-out that fails while the detail panel makes the top bar inert says so
 * here, outside the top bar, above the panel's `z-index: 10`. Empty, it draws
 * nothing, as `.live` does. The alert's pair, `--bad` on `--bad-bg`, at the
 * alert's 12.5 px; it wraps on a phone.
 *
 * IT COVERS NO CONTROL (ui-tester Must Fix on #1698, 7259906369; its Should
 * Fix at 320 px, 7260200202; and its Must Fix and Should Fix on #1701,
 * 7260507043). A line laid over the page covered the rail's theme button at
 * 390 px, then the Fleet table's "open bootstrap" button at 320 px. A band in
 * the body's column under `#app` covered nothing in `#app`, but it shrank the
 * rail, so at 1280x800 the theme button left the rail's visible area, and it
 * still lay over an open detail panel's last line at 320 px.
 *
 * Now it is a band at the bottom of the content column only, from the rail's
 * edge (`--side`) to the right edge: the rail keeps its whole height. Its
 * height, `--so-h`, is measured in signin-screen.ts (`measureStatus`), since
 * it wraps. While it shows, `.main` reserves that height at its bottom, so
 * the page area ends where the band begins, and the open detail panel's
 * `max-height` gives it up too, so the panel's scrolled end stays above it.
 * Both reserves key on `body.so-shown`, which `setStatus` sets while the line
 * holds text (red-team finding 3 on #1701), so they need no `:has`.
 * `z-index` draws it over the panel's scrim. It takes no pointer events.
 */
.so-status:empty { display: none; }
.so-status:not(:empty) {
  position: fixed; z-index: 11; left: var(--side); right: 0; bottom: 0;
  pointer-events: none;
  padding: 8px 18px; background: var(--bad-bg); border-top: 1px solid var(--bad-line);
  color: var(--bad); font-weight: 600; font-size: 12.5px; overflow-wrap: anywhere;
}
body.so-shown .main { padding-bottom: var(--so-h, 0px); }
body.so-shown > .detail { max-height: calc(100% - 68px - var(--so-h, 0px)); }
/*
 * settings-page.css: the Settings page (design `docs/create-project-design.md`,
 * revision 4.2, R4.6, phase 2). In the server target only:
 * `scripts/build.mjs --target server` appends this file to the server
 * client's `style.css` after `signin-screen.css`, so the snapshot site's
 * stylesheet stays byte-identical to its reviewed build. Cards, fields,
 * pills, the alert and the stand-in banner reuse the New project page's rules.
 */
.set-body { display: flex; flex-direction: column; gap: 14px; }
.set-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.set-tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--dim2); padding: 0 8px 6px 0; }
.set-tbl td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.set-tbl td .btn + .btn { margin-left: 6px; }
.set-tbl .inp { width: 100%; min-width: 0; }
.set-default[aria-pressed="true"] { border-color: var(--acc-line); background: var(--acc-soft); color: var(--acc-text); }
.set-empty { margin: 0; }
/* R6a: the token expiry date stays on one line at 320 px. */
.set-date { white-space: nowrap; }
/*
 * pipeline-page.css: the Pipeline page (design `docs/create-project-design.md`,
 * R7a.9). In the server target only: `scripts/build.mjs --target server`
 * appends this file to the server client's `style.css` after
 * `settings-page.css`, so the snapshot site's stylesheet is unchanged.
 * Class names are prototype v2's (`pstrip`, `pchip`, `pboard`, `pcol`,
 * `pitem`). Colours are the stylesheet's theme variables only, so light and
 * dark both follow `:root` and `:root[data-theme="dark"]`.
 */
.pl-body { display: flex; flex-direction: column; gap: 14px; }
.pl-projects { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-project[aria-pressed="true"] { border-color: var(--acc-line); background: var(--acc-soft); color: var(--acc-text); }
.pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pl-repo { font-weight: 650; color: var(--acc-text); overflow-wrap: anywhere; }
.pl-refresh { margin-left: auto; }
.hint.tone-warn { color: var(--warn); }
.pl-more { font-size: 12px; }

.hdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.hdot.d-ok { background: var(--ch-ok); }
.hdot.d-warn { background: var(--ch-warn); }
.hdot.d-bad { background: var(--ch-bad); }
.hdot.d-off { background: var(--ch-off); }

.pstrip { display: flex; align-items: stretch; gap: 4px; }
.pchip { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--head); color: var(--text); }
.pchip .hdot { margin-top: 5px; }
.pchip b { display: block; font-size: 13.5px; }
.pchip span span { display: block; color: var(--text2); font-size: 12.5px; }
.pchip.t-bad { border-color: var(--bad-line); background: var(--bad-soft); }
.parrow { display: grid; place-items: center; color: var(--dim2); }

.pboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pcol { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pcol-h { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.pcol-h h3 { margin: 0; font-size: 14px; font-weight: 650; }
.pcol-h .pc-n { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--head); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text2); }
.pcol-h .pc-at { flex-basis: 100%; color: var(--dim2); font-size: 12px; }
.pcol-s { color: var(--dim2); font-size: 12px; margin-top: -4px; }
.pcol-b { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pcol .lbl.sec { margin-top: 4px; }
.pitem { display: flex; flex-direction: column; gap: 5px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); min-width: 0; }
.pi-t { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.pi-t a, .pl-head a, .rmini a { color: var(--acc-text); }
.pi-m { color: var(--text2); font-size: 12px; overflow-wrap: anywhere; }
.pitem .chip { display: inline-block; margin: 0 4px 2px 0; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 11.5px; color: var(--text2); }
.rmini { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px; border: 1px dashed var(--line2); border-radius: 10px; overflow-wrap: anywhere; font-size: 12.5px; }

/* R7a.9: at 760 px and below the board is one column and the strip wraps, so nothing scrolls sideways at 390 px. */
@media (max-width: 760px) {
  .pboard { grid-template-columns: minmax(0, 1fr); }
  .pstrip { flex-wrap: wrap; }
  .pchip { flex: 1 1 140px; }
  .parrow { display: none; }
  /* No text under 12 px on a phone (KI-SURFACE-STYLE-10PX-LABELS): the column's section labels and an issue's label chips. */
  .pcol .lbl.sec, .pitem .chip { font-size: 12px; }
}
/*
 * projects-page.css: the Your projects page (v28 slice B, refs #1584). In the
 * server target only: `scripts/build.mjs --target server` appends this file
 * to the server client's `style.css` after `pipeline-page.css`, so the
 * snapshot site's stylesheet is unchanged. Colours are theme variables only.
 *
 * ui-tester on #1595 (comment 7231698714): at 390 px the six-column table
 * was 520 px wide in a 320 px scroll area, with no cue that two columns were
 * off screen, and names wrapped every 3 to 5 characters. At 760 px and below
 * each row is a block, and each cell draws its column head (`data-label`)
 * beside its value, so nothing is off screen and nothing scrolls sideways.
 * It reaches a phone only because the server client's `index.html` sets the
 * viewport (`scripts/build.mjs`; red-team P1 on #1605).
 */
.pj-tbl .pj-name { font-weight: 600; }

@media (max-width: 760px) {
  .pj-tbl, .pj-tbl tr, .pj-tbl td { display: block; width: auto; }
  /* Hidden from sight, not from screen readers, which keep the column heads (red-team P3 on #1605). */
  .pj-tbl tr.pj-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pj-tbl tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .pj-tbl td { border-top: 0; padding: 2px 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  .pj-tbl td::before { content: attr(data-label); color: var(--dim2); font-size: 12px; font-weight: 600; }
}

/*
 * ui-tester on #1595: links and the Review step's file-list summary drew the
 * browser's 1px ring. They take the 2px accent ring the buttons use
 * (`.btn:focus-visible` in `style.css`), in the server client only.
 */
a:focus-visible, summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/*
 * Red-team V2 on #1605: form fields inherit the body's 13.5px, and iOS zooms
 * the page into any field under 16px. On a narrow screen they take 16px.
 */
@media (max-width: 760px) {
  .inp { font-size: 16px; }
}
/*
 * audit-page.css: the Audit page (roadmap row 21). In the server target only:
 * `scripts/build.mjs --target server` appends this file to the server
 * client's `style.css` before `fleet-page.css`, which stays last (its
 * test), so the snapshot site's
 * stylesheet is unchanged. Colours are theme variables only; no text is
 * smaller than 12px.
 *
 * At 760 px and below each row is a block and each cell draws its column head
 * (`data-label`) beside its value, as Your projects does (`projects-page.css`),
 * so a phone never scrolls sideways.
 */
.au-tbl td { vertical-align: top; }
.au-v { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.au-line { overflow-wrap: anywhere; }
.au-sub, .au-reason { font-size: 12px; color: var(--dim2); }
.au-reason.tone-warn { color: var(--warn); }
.au-sub.tone-warn { color: var(--warn); }
.au-date { white-space: nowrap; }
.au-link { font-weight: 600; color: var(--acc-text); }
/* A code stays on one line at desktop widths, so it never breaks inside a word (ui-tester note on #1703); on a phone it wraps. */
.au-code { overflow-wrap: normal; word-break: normal; white-space: nowrap; }
/* The page head's strip labels and the table heads are 10.5px in style.css; 12px here (ui-tester SF2 on #1703). */
#p-audit .sdl dt, .au-tbl th { font-size: 12px; }
.au-card { display: flex; flex-direction: column; gap: 10px; }
.au-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.au-filter { min-width: 0; max-width: 100%; }
/* The Project select fits the screen: capped, and a long name ends in an ellipsis (ui-tester SF1 on #1703). */
.au-filter .inp { min-width: 0; width: 280px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-count { margin-left: auto; font-size: 12.5px; }

@media (max-width: 760px) {
  .au-tbl, .au-tbl tr, .au-tbl td { display: block; width: auto; }
  /* Hidden from sight, not from screen readers, which keep the column heads. */
  .au-tbl tr.au-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .au-tbl tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .au-tbl td { border-top: 0; padding: 2px 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  .au-tbl td::before { content: attr(data-label); color: var(--dim2); font-size: 12px; font-weight: 600; }
  .au-date { white-space: normal; }
  .au-count { margin-left: 0; }
  .au-filter { flex: 1 1 100%; }
  .au-filter .inp { width: 100%; }
  .au-code { white-space: normal; overflow-wrap: anywhere; }
}
/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}

.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}



/* Derived from vs/base/browser/ui/scrollbar/media/scrollbar.css */

/* xterm.js customization: Override xterm's cursor style */
.xterm .xterm-scrollable-element > .scrollbar {
    cursor: default;
}

/* Arrows */
.xterm .xterm-scrollable-element > .scrollbar > .scra {
	cursor: pointer;
	font-size: 11px !important;
}

.xterm .xterm-scrollable-element > .visible {
	opacity: 1;

	/* Background rule added for IE9 - to allow clicks on dom node */
	background:rgba(0,0,0,0);

	transition: opacity 100ms linear;
	/* In front of peek view */
	z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
	opacity: 0;
	pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
	transition: opacity 800ms linear;
}

/* Scrollable Content Inset Shadow */
.xterm .xterm-scrollable-element > .shadow {
	position: absolute;
	display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
	display: block;
	top: 0;
	left: 3px;
	height: 3px;
	width: 100%;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
	display: block;
	top: 3px;
	left: 0;
	height: 100%;
	width: 3px;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
	display: block;
	top: 0;
	left: 0;
	height: 3px;
	width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
/*
 * environment-page.css: the Environment page (refs #1584), a cloud
 * environment's terminal. In the server target only: `scripts/build.mjs
 * --target server` appends xterm.js's own `css/xterm.css`, then this file,
 * to the server client's `style.css`, before `fleet-page.css`. The strip,
 * pane and footer follow the prototype's team terminal
 * (`ui/prototype/v2/index.html`, `.tstrip`, `.tpane`, `.tfoot`). The
 * terminal colours are the prototype's, which it uses in both themes.
 */
:root { --term-bg:#0f1218; --term-fg:#d5dae3; --term-dim:#7f8898; --term-bar:#232a36; --term-line:#2a303c; --term-acc:#9d94ff; --term-warn:#eab456; }
/* ui-tester 1 on #1725: the footer text is #a3abb9 on #232a36, 6.24:1 (the prototype's --term-dim was 4.04:1), in both themes. */
:root { --term-foot:#a3abb9; }
/* The Running badge's text is #156b3a on --ok-bg #e6f6ec, 5.87:1 in the light theme (the shared --ok is 4.50:1); dark keeps --ok, 7.51:1. */
.env-view { --env-ok:#156b3a; }
:root[data-theme="dark"] .env-view { --env-ok:var(--ok); }
.env-view .pill.p-ok { color: var(--env-ok); }
.env-view .tpane[hidden] { display: none; }
.env-body { display: flex; flex-direction: column; gap: 12px; }
.env-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.env-card h2 { margin: 0; font-size: 15px; }
.env-open { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.env-open input { font: inherit; padding: 6px 8px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: var(--text); }
.env-view { display: flex; flex-direction: column; gap: 10px; }
.tstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.tstrip .path { font-size: 12.5px; color: var(--text2); overflow-wrap: anywhere; min-width: 0; }
.tstrip .grow { flex: 1; }
.tstrip.ctl { background: var(--warn-bg); border-color: var(--warn); color: var(--warn-ink); }
.tstrip.ctl .path { color: var(--warn-ink); }
/* ui-tester Should Fix on #1750: the shared .pill does not wrap, so a badge with an explanation was clipped by 35 to 193 px at 390 and 320 px. In the strip it wraps, never wider than the strip. */
.tstrip .pill { white-space: normal; overflow-wrap: anywhere; max-width: 100%; min-width: 0; border-radius: 12px; }
.env-since { font-size: 12.5px; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--off-bg); color: var(--off); white-space: nowrap; }
.tstrip.ctl .mode { background: var(--warn); color: var(--panel); }
.env-line { margin: 0; min-height: 1.4em; }
.tpane { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; border: 1px solid var(--term-line); background: var(--term-bg); box-shadow: var(--shadow); }
.env-term { height: calc(100vh - 320px); min-height: 360px; padding: 8px 10px; background: var(--term-bg); }
.env-term:focus-within { box-shadow: inset 0 0 0 2px var(--term-acc); }
.tstrip.ctl ~ .tpane .env-term:focus-within { box-shadow: inset 0 0 0 2px var(--term-warn); }
.tfoot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 12px; background: var(--term-bar); color: var(--term-foot); font-size: 12px; }
.tfoot .grow { flex: 1; }
/*
 * fleet-page.css: the Fleet page on a phone (refs #1584). In the server
 * target only: `scripts/build.mjs --target server` appends this file to the
 * server client's `style.css` after `projects-page.css`, so the snapshot
 * site's stylesheet is unchanged. Colours are theme variables only. From
 * 761 to 1023 px nothing here applies, so that layout is the snapshot's; from
 * 1024 px up only the Fleet table's status and team columns change (the last
 * block in this file).
 *
 * ui-tester after #1605: the server client's `index.html` sets the viewport,
 * so a phone lays the Fleet page out at its own width. At 390 px the Table
 * tab squeezed nine columns into about 3 characters each ("STA TEA PRO",
 * cells "v...", "p...") and the whole value was only on a hover tooltip; the
 * Cards tab's grid kept a 340px minimum column inside about 288px, so goal,
 * finding, and the SHOW ALL button ran past the right edge.
 *
 * THE TABLE. At 760 px and below each team row is a block, and each cell
 * draws a label beside its whole value, as `projects-page.css` does for Your
 * projects. A field cell's label is its `data-field`, the generator's own
 * field name, which is the label the Cards tab draws beside the same value
 * (`.lbl`). The first three cells hold no field, so they take the words of
 * their column heads. Values wrap rather than cut, so no value needs a
 * hover.
 *
 * FOLLOW-UPS FROM #1621 (ui-tester and red-team at 5cf9c567). A label is
 * 12 px, not 10 px. The table card and the Fleet page take their content's
 * height, so the page scrolls as one and a phone shows several team rows,
 * not one row inside a 400 px box. A card's team name is a 44 px touch
 * target. The All projects table (`.ptbl`) stacks the same way, each cell
 * drawing its `data-label`. The tables' ARIA roles are set in `app.ts`
 * (red-team M3), so the block layout keeps their table semantics.
 *
 * LABELS NEVER WRAP (ui-tester on #1644, comment 7248862042). At 390 px the
 * 76 px label column broke "worktree" into "WORKTRE / E" in every team row.
 * A label is one line (`white-space: nowrap`), and its column is
 * `minmax(100px, max-content)`. 100 px fits every label these tables draw
 * at 12 px uppercase with .13em tracking: the longest, "listed from", is
 * 98.0 px and "worktree" 79.9 px in headless Chrome 149 with DejaVu Sans,
 * the widest fallback `system-ui` reaches here. A label the generator adds
 * later that is wider widens its own row's label column rather than
 * wrapping or running over its value. The cards use the same column.
 */
@media (max-width: 760px) {
  .ftbl:not(.ptbl) table, .ftbl:not(.ptbl) tbody, .ftbl:not(.ptbl) tr, .ftbl:not(.ptbl) td { display: block; width: auto; }
  .ftbl:not(.ptbl) colgroup { display: none; }
  /* Hidden from sight, not from screen readers, which keep the column heads (red-team P3 on #1605). */
  .ftbl:not(.ptbl) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ftbl:not(.ptbl) td { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
  .ftbl:not(.ptbl) tr.frow { border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .ftbl:not(.ptbl) tr.frow.attn { box-shadow: inset 3px 0 0 var(--bad); }
  .ftbl:not(.ptbl) tr.frow.attn td:first-child { box-shadow: none; }
  .ftbl:not(.ptbl) tr.frow td { border-bottom: 0; padding: 2px 0; display: grid; grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); gap: 8px; align-items: baseline; }
  /* The status cell holds two spans, the mark and its `for` text: the mark takes its own width, the text the rest. */
  .ftbl:not(.ptbl) tr.frow td.ft-status { grid-template-columns: minmax(100px, max-content) max-content minmax(0, 1fr); }
  .ftbl:not(.ptbl) tr.frow td.ft-status .ft-mark { margin-right: 0; }
  .ftbl:not(.ptbl) tr.frow td::before { color: var(--dim2); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
  .ftbl:not(.ptbl) tr.frow td:nth-child(1)::before { content: 'status'; }
  .ftbl:not(.ptbl) tr.frow td:nth-child(2)::before { content: 'team'; }
  .ftbl:not(.ptbl) tr.frow td:nth-child(3)::before { content: 'project'; }
  .ftbl:not(.ptbl) tr.frow td[data-field]::before { content: attr(data-field); }
  .ftbl:not(.ptbl) .ft-name { white-space: normal; overflow-wrap: anywhere; text-align: left; }
  /*
   * The note under the table says long text is cut to one line and to hover
   * a cell. Neither is true here, so it is not drawn. Its words are in
   * `app.ts`, which the snapshot site shares, so they stay unchanged.
   */
  #fleet-table > .tbl-note { display: none; }
  /*
   * ONE SCROLLER. On a desktop the table card scrolls inside the page and its
   * head row stays at the top. Here the head is clipped, and under the fixed
   * header the card was a 396 to 432 px box showing about one team row. The
   * card and, while the table is shown, the Fleet page take their content's
   * height, so `main` is the one scroller. The Cards tab keeps `#teams` as
   * its scroller, because the next-project-below line reads its bottom edge.
   */
  .ftbl:not(.ptbl) { flex: 0 0 auto; overflow: visible; }
  #p-fleet:has(> #fleet-table:not([hidden])) { flex: 0 0 auto; }

  /*
   * THE CARDS. One column the width of the page, so a card is never wider
   * than the screen and its values, notes and expand control stay in view.
   * Values already wrap (`.val`, `overflow-wrap: anywhere`).
   */
  .cards { grid-template-columns: minmax(0, 1fr); }
  .head .top { flex-wrap: wrap; min-width: 0; }
  /*
   * A card's labels are 12 px and one line, so the label column is the
   * table's `minmax(100px, max-content)` (LABELS NEVER WRAP, above). The
   * team name opens the detail panel; it is 44 px tall, the touch target
   * WCAG 2.5.5 names, and the strip drops its 6 px top and bottom padding so
   * it grows by 12 px rather than 24 px.
   */
  #teams .lbl { font-size: 12px; white-space: nowrap; }
  #teams .row { grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); }
  #teams .head .top { padding-top: 0; padding-bottom: 0; }
  #teams .top > button.name { min-height: 44px; }

  /*
   * THE ALL PROJECTS TABLE. Six columns at a fixed layout cut every value to
   * a few characters at 390 px. Each project row is a block, and each cell
   * draws its column head (`data-label`, set in `app.ts`) beside its whole
   * value. The note under it stays: it is true here too.
   */
  .ftbl.ptbl table, .ftbl.ptbl tbody, .ftbl.ptbl tr, .ftbl.ptbl td { display: block; width: auto; }
  .ftbl.ptbl colgroup { display: none; }
  .ftbl.ptbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ftbl.ptbl td { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
  .ftbl.ptbl tr.frow { border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .ftbl.ptbl tr.frow.attn { box-shadow: inset 3px 0 0 var(--bad); }
  .ftbl.ptbl tr.frow.attn td:first-child { box-shadow: none; }
  .ftbl.ptbl tr.frow td { border-bottom: 0; padding: 2px 0; display: grid; grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); gap: 8px; align-items: center; }
  .ftbl.ptbl tr.frow td[data-label]::before { content: attr(data-label); color: var(--dim2); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
  .ftbl.ptbl .pnm { flex-wrap: wrap; }
  .ftbl.ptbl .pr-root { white-space: normal; overflow-wrap: anywhere; }
  .ftbl.ptbl .ft-name { white-space: normal; overflow-wrap: anywhere; text-align: left; }

  /*
   * NO TEXT UNDER 12 PX ON A PHONE (KI-SURFACE-STYLE-10PX-LABELS). Measured
   * in headless Chrome 149 at 390x844 on 2026-11-29 over Fleet (Table,
   * Cards, the detail panel), Needs you, All projects and Pipeline: these
   * shell, Fleet and All projects selectors drew text at 9.5 to 11.5 px.
   * The 10 px rules came in with 7013d97e (#1107) with no recorded
   * decision, and prototype v2 uses no 10 px. Each is 12 px here; desktop
   * keeps its sizes. Pipeline's own two are in `pipeline-page.css`.
   *
   * The header's slug, age and STALE badge, the snapshot banner, the
   * Details strip's terms, card and panel notes and footers, the show-all
   * and close buttons, and the Needs you and panel field labels. Those
   * labels take the cards' one-line, 100 px label column (LABELS NEVER
   * WRAP, above): at 12 px the panel's 56 px column ran "WORKTREE" into its
   * value.
   */
  .slug, .age, .badge, .banner, .sdl dt, .note, .foot, .detail-foot, .more, .detail-close, .place-note { font-size: 12px; }
  /*
   * At 12 px the header's slug, badge and age took 20 px more of the 44 px
   * row, all of it from the account chip (65 px to 45 px at 390 px, "po@..."
   * to "p..."). Tighter tracking on the slug and badge and 4 px badge
   * padding give back 16 px: the chip is 61 px.
   */
  .topbar .slug { letter-spacing: .08em; }
  .topbar .badge { letter-spacing: .06em; padding: 1px 4px; }
  #p-needs .lbl, .detail-row > .lbl { font-size: 12px; white-space: nowrap; }
  #p-needs .row, .detail-row { grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); }
  /* All projects: the root path under a project name, and its team count. */
  .ftbl.ptbl .pr-root, .ftbl td .count { font-size: 12px; }
  /*
   * The side rail's count dot and project initials, measured at 390 px. A
   * 12 px digit's line box is 14 px tall, so the dot is 18 px, not 17 px,
   * and "1" or "99" sits inside it with 2 px above and below (8.4 px and
   * 16.7 px wide in an 18 px and a 24.7 px pill). The initials scale with
   * their text, 22 px at 9.5 px to 28 px at 12 px: at 26 px the corners of
   * "MW" (25.2 px wide) fell outside the circle; at 28 px "WW" (26.5 px)
   * stays inside.
   */
  .nav-b .count { font-size: 12px; min-width: 18px; height: 18px; border-radius: 9px; }
  .pav { font-size: 12px; width: 28px; height: 28px; }
  /*
   * The New project stepper's numbers and check marks (ui-tester on #1654,
   * comment 7250022459): 11.5 px in `style.css`. At 390x844 in headless
   * Chrome 149 the 22 px circle holds a 12 px "1" to "4" (8.4 px wide) and
   * "✓" (10.1 px) with 6 px or more on each side, 3.3 px above and 4.7 px
   * below, and nothing overflows it.
   */
  .stp i { font-size: 12px; }
  /*
   * THE PANEL'S CLOSE BUTTON STAYS IN THE PANEL (ui-tester Should Fix 2 on
   * #1701, 7260507043). At 320 px the panel is 214 px wide, and its top row's
   * mark, name, display name and Close ran past it: Close drew at 275 to 340
   * px, past the panel's 302 px edge and the viewport. The row wraps instead,
   * and Close, which never shrinks, keeps its `margin-left: auto` at the end
   * of whichever line it takes. Nothing in the row is cut.
   */
  .detail-top { flex-wrap: wrap; }
}

/*
 * STATUS AND TEAM ARE WHOLE ON A DESKTOP (KI-SURFACE-WEB-TABLE-TRUNCATION-1180,
 * ui-tester against the live snapshot, 2026-11-10). On a desktop the Fleet
 * table keeps `style.css`'s fixed layout, which gives every column the same
 * width and cuts each cell to one line. At 1180 px in headless Chrome 149
 * that was a 98 px status cell, so all 7 status cells of a 7-team reading
 * were cut ("5m · bl..."), and 3 team names ("coordination-service",
 * "team-builder", "customer-portal") in an 80 px button. These two columns
 * are the ones a row is read by, so they take a wider share and wrap at
 * word boundaries rather than cutting; text stays 13 px. Every other column
 * keeps its one cut line and its tooltip, so the note under the table is
 * still true of them. The table card already scrolls inside itself, so
 * nothing here can widen the page. The All projects table (`.ptbl`) and the
 * snapshot site are unchanged.
 *
 * FROM 1024 PX, NOT 761 PX (ui-tester Should Fix 1 and 2 on #1702, comment
 * 7261088629). At 761 and 900 px the 13% team column broke names inside a
 * word ("bootstra|p", "coordina|tion-service"), and the 67% left for the other
 * columns cut them to 2 to 5 characters ("Waiting for" among them). 1024 to
 * 1440 px is the range the known-issue row names; below 1024 px the table is
 * main's, one cut line per cell. In that range no name breaks inside a word
 * in headless Chrome 149 (measured at 1024, 1180 and 1440 px).
 */
@media (min-width: 1024px) {
  .ftbl:not(.ptbl) col.c-status { width: 20%; }
  .ftbl:not(.ptbl) col.c-team { width: 13%; }
  .ftbl:not(.ptbl) td.ft-status, .ftbl:not(.ptbl) td:has(> .ft-name) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
  .ftbl:not(.ptbl) .ft-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
}
