/* Wantable brand for the debug-agent console.
 *
 * Ported from docs/design/console-prototype.html, which is where this was
 * argued about first. Tokens are copied from identity.wantable.com's :root,
 * not invented. Both apps serve this file: `src/app.py` and
 * `qmetry_sweep/web.py` mount the same `src/static` directory.
 *
 * Two rules this file exists to hold, both of which a page can break by
 * accident:
 *
 * 1. STATE IS NEVER HUE ALONE, and the red/green pair is not used at all.
 *    Every state is a stripe or bar PLUS a glyph PLUS a word. The palette this
 *    replaces told success from failure with a green against a red, which is
 *    precisely the pair the person who reads these pages cannot separate.
 *    (The old values are not quoted here on purpose: a hex in a comment trips
 *    the scanner that enforces this, and prose should not fail a build.)
 *
 *    Green survives in this palette as CHROME -- eyebrows, headings, the rail
 *    accent -- and that is only safe because there is no red anywhere for it
 *    to pair with. If a red is ever added, the greens have to go with it.
 *
 * 2. BOTH THEMES ARE DEFINED AT THE TOKEN LEVEL. Every colour gets its first
 *    definition on bare `:root`; the dark blocks only redefine tokens. A
 *    component rule that hardcodes a colour works in one theme and fails
 *    silently in the other.
 *
 * Fonts: the design calls for Montserrat and Playfair Display. The deployed
 * CSP is `default-src 'self'`, so a Google Fonts link is blocked in
 * production and would fail back to the fallbacks below WITHOUT ERRORING --
 * the page just quietly looks wrong. Until those faces are self-hosted under
 * src/static/fonts/, the stacks below are what actually renders. Changing
 * that is two lines, here.
 */

/* Layout: fixed rail of the ten real pages, one working pane beside it.
   Every page: summary band, then detail. State = stripe + glyph + word. */
:root{
  --ink:#1E1E1E; --navy:#425563; --green:#57695B; --mint:#BEE5C8;
  --line:#E8E7E3; --yellow:#F5C842; --blue:#62B5E5;
  --bg:#F7F2E8; --surface:#FFFFFF; --sunk:#FBF9F4; --rail:#1E1E1E; --rail-fg:#EFECE4;
  --font-sans:'Montserrat',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-fig:'Playfair Display',Georgia,serif;
  --font-mono:ui-monospace,SFMono-Regular,'SF Mono',Menlo,monospace;
  --shadow:0 4px 20px rgba(30,30,30,.06);
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --ink:#F3F1EC; --navy:#A9B7C1; --green:#9BB3A1; --line:#343B41;
  --bg:#191C1F; --surface:#23272B; --sunk:#1F2225; --rail:#121416; --rail-fg:#EFECE4;
  --shadow:0 4px 20px rgba(0,0,0,.35); color-scheme:dark;
}}
:root[data-theme="dark"]{
  --ink:#F3F1EC; --navy:#A9B7C1; --green:#9BB3A1; --line:#343B41;
  --bg:#191C1F; --surface:#23272B; --sunk:#1F2225; --rail:#121416; --rail-fg:#EFECE4;
  --shadow:0 4px 20px rgba(0,0,0,.35); color-scheme:dark;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font-sans);
  font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{margin:0;text-wrap:balance;font-style:normal}
button{font-family:inherit}
.shell{display:grid;grid-template-columns:216px minmax(0,1fr);min-height:100%}
/* `1fr` is `minmax(auto,1fr)`, so the track's floor is its content's
   min-content -- which on the setup page is a table header that may not wrap,
   and the single column came out wider than the window. Below the breakpoint
   there is no rail to make room for, so this track exists only to be the
   window's width: say so. */
@media(max-width:860px){.shell{grid-template-columns:minmax(0,1fr)}}

/* rail */
.rail{background:var(--rail);color:var(--rail-fg);padding:26px 0 40px;
  position:sticky;top:env(safe-area-inset-top,0px);align-self:start;max-height:100vh;overflow:auto}
@media(max-width:860px){.rail{position:static;max-height:none;padding:20px 0 14px}}
/* Scoped to the rail, because `.mark` is a rail rule and `mark` is a word any
   page will reach for. The sweep's performance page uses `.row .mark` for a
   state glyph: this rule's `display:flex` plus `gap:5px` stood through that
   page's own rule -- which declares neither -- and left 21px of dead space
   inside every glyph, measured as `div.row` 966x65 against 966x44 with this
   rule removed. A rule that belongs to one component says so in its
   selector. */
.rail .mark{padding:0 22px 22px;display:flex;flex-direction:column;gap:5px}
.wordmark{font-weight:700;font-size:15px;letter-spacing:5px}
.markline{font-size:9px;letter-spacing:2.6px;text-transform:uppercase;color:#9BB3A1;font-weight:600}
/* Anchors as well as buttons: the mockup switched sections inside one file
   and could use buttons; real pages navigate, so the rail is links. */
.navlist{display:flex;flex-direction:column;gap:1px}
@media(max-width:860px){.navlist{flex-direction:row;overflow-x:auto;gap:4px;padding:0 16px 4px}}
.navlist button,.navlist a{display:flex;align-items:center;gap:9px;width:100%;text-align:left;
  background:none;border:0;color:var(--rail-fg);padding:9px 22px;cursor:pointer;
  text-decoration:none;
  font-size:12px;font-weight:600;letter-spacing:.3px;white-space:nowrap;
  border-left:2px solid transparent}
@media(max-width:860px){.navlist button,.navlist a{width:auto;border-left:0;border-bottom:2px solid transparent;
  padding:8px 10px;border-radius:3px}}
.navlist button:hover,.navlist a:hover{color:#fff;background:rgba(255,255,255,.05)}
.navlist button[aria-current="true"],.navlist a[aria-current="page"]{color:#fff;background:rgba(190,229,200,.1);border-left-color:var(--mint)}
@media(max-width:860px){.navlist button[aria-current="true"],.navlist a[aria-current="page"]{border-bottom-color:var(--mint);border-left-color:transparent}}
.navlist .ct{margin-left:auto;font-size:10px;font-weight:700;background:var(--yellow);color:#1E1E1E;
  padding:1px 6px;border-radius:2px;font-variant-numeric:tabular-nums}
@media(max-width:860px){.navlist .ct{margin-left:4px}}
/* The logout button's spacing, which was an inline style on the form in
   base.html -- the only one left in a rendered admin page. */
.railfoot .acts{margin-top:12px}
.railfoot{padding:22px 22px 0;margin-top:20px;border-top:1px solid rgba(255,255,255,.1);
  font-size:10px;color:#8E948F;line-height:1.7}
@media(max-width:860px){.railfoot{display:none}}

/* pane */
/* `width:100%` is not redundant beside `min-width:0`.
   A grid item with `width:auto` is stretched to its track, but a scroll
   container inside it still pushes its min-content up the tree -- here
   `th{white-space:nowrap}` sets the table's min-content, `.tbl-wrap`'s
   `overflow-x:auto` does not stop it propagating, and the pane came out 733px
   wide in a 645px track. Measured: `min-width:0` alone leaves it at 733,
   `width:100%` brings it to 645. The content column may never be wider than
   the column it was given; a wide table scrolls inside `.tbl-wrap` instead. */
.pane{padding-inline:28px;padding-block:30px 60px;min-width:0;width:100%}
@media(max-width:560px){.pane{padding-inline:16px}}
.ptop{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end;justify-content:space-between;
  padding-bottom:18px;border-bottom:1px solid var(--line)}
.ptitle{font-family:var(--font-fig);font-size:30px;font-weight:700;letter-spacing:-.5px;line-height:1.1}
/* ---- the measure -----------------------------------------------------
   `1ch` is the width of "0", not of an average character. Measured in this
   stack at 12.5px: a digit is 8.28px and a character of real prose averages
   5.95px, so a `ch` measure renders about 39% more characters than its
   number says. `64ch` was 89 characters and `.crit`'s `74ch` was 103 -- both
   past the 45-75 that is comfortable to read.
   These are written to RENDER about 72: 72 x 5.95 / 8.28 = 52ch. Keep that
   conversion in mind before changing one, and change all of them together. */
.psub{font-size:12.5px;color:var(--navy);margin-top:5px;max-width:52ch}
.meta{display:flex;gap:18px;flex-wrap:wrap;align-items:center;
  font-size:10px;letter-spacing:1.3px;text-transform:uppercase;color:var(--navy);font-weight:700}
.meta b{color:var(--ink);font-variant-numeric:tabular-nums}
.eyebrow{font-size:10px;letter-spacing:3.2px;text-transform:uppercase;font-weight:700;color:var(--green)}

/* band */
/* The floor is the width of the figure, not a round number. `.tile .n` is
   33px Playfair and a four-decimal rate -- "$0.0005" on the cost page -- is
   128px of it with no break opportunity; 142px of track less 36px of tile
   padding left 106px, so the figure simply painted over the tile beside it,
   at every window width from 420 to 1680. 168px is 128px plus that padding
   plus a little. A figure that outgrows a tile belongs in `.tile--wide`. */
/* The hairlines belong to the tiles, not to the band behind them. The band
   used to be a filled `--line` rectangle that the tiles covered, so any cell
   `auto-fit` left over stayed filled -- a lighter slab the width of the
   missing tiles, which reads as a tile that failed to load rather than as
   nothing. Raising the floor to 168px made those leftovers common and large:
   eight stats tiles go 8/4/4 at 1680/950/420 and fill the row, but 3+3+2 at
   861 and 5+3 at 1280, and the cost page's four-tile band left two thirds of
   a row filled at 861. An outline draws in the 1px gap instead, so leftover
   cells are simply absent. */
.band{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:1px;
  margin-block:24px 26px}
.tile{background:var(--surface);padding:17px 18px 15px;outline:1px solid var(--line)}
.tile .k{font-size:9.5px;letter-spacing:2px;text-transform:uppercase;font-weight:700;color:var(--green);margin-bottom:9px}
.tile .n{font-family:var(--font-fig);font-size:33px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.tile .s{font-size:11.5px;color:var(--navy);margin-top:6px;line-height:1.45}
/* A whole tile as a drill-down. Nothing else gives `.tile .n` a colour, so
   an anchor around one otherwise picks up the browser's default link blue --
   a literal that belongs to neither theme. */
a.tile{color:inherit;text-decoration:none}
a.tile:hover{box-shadow:inset 0 0 0 1px var(--line)}
/* A figure that is a pair -- "41,408,866 / 2,310,651" -- is three times the
   width of a single number and broke onto three lines in an equal-width
   tile. It gets two columns and a smaller face: still the largest thing in
   the tile, but sized to what it has to say. Falls back to one column when
   the band is already down to one. */
.tile--wide{grid-column:span 2}

/* ---- long strings ----------------------------------------------------
   A URL or a run of comma-separated ids has no break opportunity a browser
   will take by default, so one cell sets the width of the whole table and
   the page scrolls sideways -- which also drags the sticky rail out of
   view, so the symptom reads as "the menu is cut off". Breaking anywhere is
   the right trade for a payload or an id list: they are read by eye, not by
   line. */
td,.why,.fix,.hint,.logmsg{overflow-wrap:anywhere}
.mono{overflow-wrap:anywhere}
/* The prose classes belong on that list too, and for a sharper reason: each
   is capped at a measure, and each routinely carries a `<code>` holding a
   path or an id. An unbreakable string longer than the measure overflows a
   box that is, by construction, narrower than the column -- so it happens at
   EVERY window width, not just a narrow one. The setup page's lead paragraph
   names `<data_path>/config.enc`, which is short in production and long
   under a temp directory; the browser test caught it the day the path had no
   hyphen in it to break on. A measure the text cannot keep is not a measure.
   `.caveat` is on the list for the same reason and was missed because the
   browser test could not see it: Chrome will not open a window under 500px,
   so the 420px row laid out at 500 and the Opsgenie caveat's
   `https://<site>.atlassian.net/jira/ops/teams/<teamId>/integrations` -- 390px
   of unbreakable string in a 314px box -- only spilled below that floor. */
.psub,.sec-sub,.crit,.caveat{overflow-wrap:anywhere}

/* ---- the rail collapses ----------------------------------------------
   No script: a checkbox the rail owns, read with :has(). The CSP allows one
   hashed inline block and the rail is on every page, so a JS toggle would
   mean a second hash to keep in sync forever. */
.rail-toggle{position:absolute;opacity:0;width:1px;height:1px}
.rail-grip{position:absolute;top:22px;right:10px;cursor:pointer;
  display:block;margin:0;
  color:var(--rail-fg);font-size:14px;line-height:1;padding:6px 8px;border-radius:3px;
  opacity:.65}
.rail-grip:hover{opacity:1;background:rgba(255,255,255,.08)}
.rail-toggle:focus-visible+.rail-grip{outline:2px solid var(--mint);outline-offset:2px}
.shell:has(.rail-toggle:checked){grid-template-columns:40px minmax(0,1fr)}
.rail:has(.rail-toggle:checked) .mark,
.rail:has(.rail-toggle:checked) .navlist,
.rail:has(.rail-toggle:checked) .railfoot{display:none}
.rail:has(.rail-toggle:checked) .rail-grip{right:auto;left:7px}
@media(max-width:860px){.rail-grip{display:none}}
@media(max-width:620px){.tile--wide{grid-column:span 1}}
.tile--wide .n{font-size:25px;letter-spacing:-.5px}
.tile--act{background:var(--sunk);box-shadow:inset 3px 0 0 var(--yellow)}

.sec{margin-top:34px}
.sec-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:4px}
.sec h2{font-family:var(--font-fig);font-size:22px;font-weight:700;letter-spacing:-.3px}
.count{font-size:10px;font-weight:700;background:var(--sunk);border:1px solid var(--line);
  padding:1px 7px;border-radius:2px;color:var(--navy);font-variant-numeric:tabular-nums}
.sec-sub{font-size:12.5px;color:var(--navy);max-width:52ch;margin-bottom:16px}
/* ---- the prototype's row card, removed ------------------------------
   `.rows`, `.row`, `.stripe`, `.row--act|wait|ok`, `.row-in`, `.idcol`,
   `.tck` and `.tck .v` came across from docs/design/console-prototype.html
   and were never used: no template in `src/templates/` carries one of those
   class names, on any page, which is why nothing here changes by their
   going. `row`, `rows` and `panel` are words any page will reach for, and
   this file is served to both apps -- so an unused rule under a generic name
   is not dead weight, it is a rule that only ever applies to somebody else's
   component.

   It did. The sweep's performance page has its own `.row` and `.rows`, and
   brand's stood underneath for every property that page's rules do not
   declare: surface, border, radius, shadow and `overflow:hidden`, so each
   row rendered as a card inside a card at every width. Measured against the
   same page with these rules removed: `div.row` 966x65 -> 1006x65 once
   `.panel`'s padding goes with it, `progress.bar` 420x9 -> 460x9.

   If the console grows a row card again it should be written for the markup
   it has, under a name that is not three letters long. */
/* `white-space:nowrap` is what keeps a chip a chip. `td{overflow-wrap:anywhere}`
   is inherited, so inside a table cell a chip's own label is breakable at
   every character -- and a chip is laid out at whatever width the column
   hands it. Rendered: the RCA eval STATUS chip came out as "SKIPPED - NO
   CAPTURED RUN" set ONE LETTER PER LINE, 270px tall, at 861px; tool health's
   "ERRORS" read "ER/RO/RS"; the feedback page's "GENERAL FEEDBACK" broke
   mid-word at every width including 1680. The chip is the state cue this
   console is built on -- stripe plus glyph plus WORD, because the hue alone
   is not readable to everyone -- so the word has to survive. A chip that
   needs more room than the column has makes the table wide and `.tbl-wrap`
   scroll, which is the same trade `.btn` already makes two rules down. */
.chip{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;
  padding:3px 9px 3px 7px;border:1px solid var(--line);border-radius:2px;background:var(--sunk);
  white-space:nowrap;
  font-size:9.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700}
.glyph{font-family:var(--font-mono);font-size:11px;line-height:1}
.chip--act{border-color:var(--yellow);box-shadow:inset 0 0 0 1px var(--yellow)}
.chip--act .glyph{color:#8A6A00}
/* An error state with its own chrome. Warm already means wants-a-person, so
   this is not a second hue -- it is the ink treatment `.lv-err` uses, which
   reads as heavier at a glance without introducing a red. */
.chip--err{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.chip--err .glyph{color:var(--ink)}
/* Long unbroken strings -- an error message, a URL -- in a narrow cell. */
.brk{word-break:break-all}
.chip--wait .glyph,.chip--ok .glyph{color:var(--green)}
:root[data-theme="dark"] .chip--act .glyph{color:var(--yellow)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .chip--act .glyph{color:var(--yellow)}}
.age{font-size:10.5px;color:var(--navy);line-height:1.5;font-variant-numeric:tabular-nums}
.age b{color:var(--ink);font-weight:600}
.body{min-width:0}
.ticket{font-size:11.5px;color:var(--navy);margin-bottom:4px}
.ticket a{color:var(--green);text-decoration:none;border-bottom:1px solid var(--line);font-weight:600}
.ticket a:hover{border-bottom-color:var(--green)}
.why{font-size:15px;font-weight:600;line-height:1.4;margin-bottom:5px}
.fix{font-size:12.5px;color:var(--navy);max-width:52ch}
details.more{margin-top:9px}
details.more summary{cursor:pointer;font-size:10px;letter-spacing:1.4px;text-transform:uppercase;
  font-weight:700;color:var(--green);list-style:none}
details.more summary::-webkit-details-marker{display:none}
details.more summary::before{content:"+ ";font-family:var(--font-mono)}
details.more[open] summary::before{content:"– "}
.crit{margin-top:9px;padding:13px 15px;background:var(--sunk);border-left:2px solid var(--blue);
  font-size:12.5px;color:var(--navy);max-width:56ch}
.crit p{margin:0 0 8px}.crit p:last-child{margin:0}
.acts{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
/* `text-decoration:none` because a .btn is often an anchor -- a link that
   navigates rather than submits. Without it the browser underlines every
   one, which shipped visibly on the cost page's window selector. */
.btn{text-decoration:none;display:inline-flex;align-items:center;min-height:34px;padding:0 14px;border-radius:3px;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;
  font-size:10.5px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;
  transition:background .18s,border-color .18s,color .18s}
.btn:hover{border-color:var(--green);color:var(--green)}
.btn--go{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.btn--go:hover{background:var(--green);border-color:var(--green);color:#fff}
.btn--sm{min-height:28px;padding:0 10px;font-size:9.5px}
/* A flex item shrinks below its content by default, and a button that does
   is left showing its own padding with the label cut off -- which is worse
   than the row being a little wide, and it happens without a scrollbar.
   `white-space:nowrap` is the other half of the same statement, and without
   it `flex-shrink:0` is a lie the layout cannot see: the button LAYS OUT at
   its full label width, but it CONTRIBUTES the width of its longest word to
   anything sizing around it. On the feedback page "Draft improvement" laid
   out at 172px and contributed about 90px, so a table asked for 90 and then
   painted 172 over the column beside it -- at every width from 420 to 1680.
   Saying it once here keeps the two numbers the same. */
.btn{flex-shrink:0;white-space:nowrap}
/* Below a phone's width the trade above stops paying. "Connect Modus
   knowledgebase" lays out at 269px, and a 320px window leaves `.acts` 246 --
   so holding the label on one line puts 23px of it outside the card rather
   than keeping it readable, which was the whole point. Two lines of a button
   read fine; the table-sizing argument for `nowrap` does not reach here,
   because at this width a table is already scrolling inside `.tbl-wrap`.
   `flex-shrink` has to go with it: measured, `white-space:normal` alone left
   the button at 269px, because `flex-shrink:0` holds a flex item at its
   max-content base size whether or not its text COULD wrap. `max-width:100%`
   is the floor that `.acts` could not otherwise impose. */
@media(max-width:420px){.btn{white-space:normal;text-align:center;
  flex-shrink:1;max-width:100%;padding-block:6px;line-height:1.3}}
.btn:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* generic blocks */
.card{background:var(--surface);border:1px solid var(--line);border-radius:4px;
  box-shadow:var(--shadow);padding:18px 20px}
/* `minmax(282px,1fr)` has a floor the column cannot always pay: below about
   310px of content width the track is wider than the grid, and the setup
   page's credential pairs spilled 282px into a 216px box at 320, 256 at 360
   and 276 at 380. `min(282px,100%)` keeps the two-column intent wherever
   there is room for it and lets the track be the container where there is
   not -- which is what `auto-fit` was already trying to say. */
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(282px,100%),1fr));gap:12px}
table{width:100%;border-collapse:collapse;font-size:12.5px}
th{text-align:left;font-size:9.5px;letter-spacing:1.6px;text-transform:uppercase;color:var(--green);
  font-weight:700;padding:0 10px 8px 0;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:9px 10px 9px 0;border-bottom:1px solid var(--line);vertical-align:top}
/* `padding-right:0` keeps the last column's digits flush with the table edge,
   but every cell's padding-left is 0 too -- so a right-aligned number ends
   exactly where the next cell's text begins, with nothing between them. Three
   admin pages shipped unreadable header runs because of it: tool health's
   "MAX" + "LAST CALLED" read "MAXLAST CALLED" over "0.0s11/03 14:00:05", RCA
   eval's "SCORE" + "FAILED CITATIONS" read "SCOREFAILED CITATIONS", and
   memory eval's last three columns read "P@3R@3 RR" over "0.3 1.01.0". The
   gutter goes on the left, and `padding-right:0` narrows to the last column,
   which is the only one whose right edge the flush alignment was for. A
   middle `.num` keeps `td`'s own 10px, so "SCORE" stops touching "FAILED
   CITATIONS" -- a gutter on the left of the number cannot open a gap after
   it.
   `overflow-wrap:anywhere` is right for an id or a payload and wrong for a
   figure: memory eval's recall columns rendered "1.00" as "1." over "00" and
   "0.33" as "0.3" over "3", which is not a smaller number, it is a different
   one. A number is short enough to make the table wide and let `.tbl-wrap`
   scroll instead. */
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;padding-left:14px;
  white-space:nowrap;overflow-wrap:normal}
td.num:last-child,th.num:last-child{padding-right:0}
tr:last-child td{border-bottom:0}
.mono{font-family:var(--font-mono);font-size:11.5px}
.tbl-wrap{overflow-x:auto}
/* `width:100%` on its own lets auto table layout squeeze a column below what
   its contents need, and the contents then paint over the next column rather
   than the table admitting it is too narrow. The feedback page's action
   column held a 172px button in a 111px cell at every width measured,
   1680 included -- a wide table is not a narrow-window problem.
   `min-content` is the width the cells actually need, so the table takes it
   and `.tbl-wrap` scrolls, which is what the wrapper is for. It binds only
   when the cells need more than the wrapper has. */
.tbl-wrap>table{min-width:min-content}
/* Every text-ish input, not just the two the mockup happened to contain.
   Password and untyped fields matched nothing here, so every credential
   field on the admin and setup pages was dressed only by style.css's
   `label input` rule -- load-bearing by accident, and gone the day that
   file is retired. Two porting agents hit this independently. */
input[type=search],input[type=text],input[type=password],input[type=email],
input[type=number],input[type=url],input[type=date],input:not([type]),
select,textarea{width:100%;min-height:38px;padding:8px 12px;
  border:1px solid var(--line);border-radius:3px;background:var(--surface);color:var(--ink);
  font-family:inherit;font-size:13px}
textarea{font-family:var(--font-mono);font-size:11.5px;line-height:1.55;resize:vertical}
.qout{margin:10px 0 0;padding:10px 12px;background:var(--sunk);border:1px solid var(--line);
  border-radius:3px;font-family:var(--font-mono);font-size:11px;line-height:1.6;
  color:var(--navy);overflow-x:auto;white-space:pre}
.field{display:grid;gap:5px}
.flabel{font-size:9.5px;letter-spacing:1.6px;text-transform:uppercase;font-weight:700;color:var(--green)}
.hint{font-size:11.5px;color:var(--navy)}
.bar{height:7px;background:var(--line);border-radius:1px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--green)}
.bar i.y{background:var(--yellow)}
.bar i.b{background:var(--blue)}
.toolrow{display:grid;grid-template-columns:minmax(0,1fr) 92px 64px;gap:12px;align-items:center;
  padding:9px 0;border-bottom:1px solid var(--line)}
.toolrow:last-child{border-bottom:0}
.sr{font-size:11px;color:var(--navy);font-variant-numeric:tabular-nums;text-align:right}

/* log */
.logline{display:grid;grid-template-columns:118px 1fr;gap:12px;padding:8px 0;
  border-bottom:1px solid var(--line);font-size:12px;align-items:start}
.logline:last-child{border-bottom:0}
.logts{font-family:var(--font-mono);font-size:10.5px;color:var(--navy);font-variant-numeric:tabular-nums}
.logmsg{min-width:0}
.logmsg .lv{display:inline-block;font-size:9px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;
  padding:1px 5px;border-radius:2px;margin-right:7px;border:1px solid var(--line);background:var(--sunk)}
.lv-warn{border-color:var(--yellow);box-shadow:inset 0 0 0 1px var(--yellow)}
.lv-err{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.logmsg code{font-family:var(--font-mono);font-size:11px;color:var(--navy);word-break:break-word}

/* run strip */
.runbar{display:flex;gap:3px;align-items:flex-end;height:42px;margin:12px 0 8px}
.runbar i{flex:1;background:var(--line);border-radius:1px;min-width:3px}
.runbar i.d{background:var(--green)}
.runbar i.s{background:var(--yellow)}
.runbar i.now{outline:1px solid var(--ink);outline-offset:1px}
.runkey{display:flex;gap:16px;flex-wrap:wrap;font-size:10.5px;color:var(--navy);align-items:center}
.sw{width:9px;height:9px;border-radius:1px;display:inline-block;margin-right:5px;vertical-align:-1px}
.proto{display:inline-block;padding:3px 9px;background:var(--mint);color:#1E1E1E;
  border-radius:2px;font-size:9.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase}
.foot{margin-top:34px;padding-top:16px;border-top:1px solid var(--line);
  font-size:10.5px;color:var(--navy);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}
.ctrlbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;background:var(--sunk);
  border:1px solid var(--line);border-radius:4px;padding:14px 16px;margin-bottom:4px}
.ctrlbar .field{min-width:128px}
.seg{display:flex;gap:6px;flex-wrap:wrap;margin-block:20px 0}
.live{display:flex;gap:14px;align-items:center;flex-wrap:wrap;background:var(--sunk);
  border:1px solid var(--line);border-left:3px solid var(--blue);border-radius:4px;
  padding:13px 16px;margin-bottom:12px;font-size:12.5px}
.live .pb{flex:1 1 160px;height:6px;background:var(--line);border-radius:1px;overflow:hidden;min-width:120px}
.live .pb i{display:block;height:100%;background:var(--blue);width:58%}
.dcard{background:var(--surface);border:1px solid var(--line);border-radius:4px;
  box-shadow:var(--shadow);overflow:hidden;margin-bottom:12px}
.dhd{padding:15px 20px;border-bottom:1px solid var(--line);display:flex;gap:12px;
  align-items:baseline;flex-wrap:wrap}
.dhd .t{font-size:15px;font-weight:700}
.dbody{padding:16px 20px}
.tc{border:1px solid var(--line);border-radius:3px;margin-bottom:10px;overflow:hidden}
.tc-hd{background:var(--sunk);padding:9px 13px;font-size:12px;font-weight:700;
  display:flex;gap:9px;align-items:baseline;flex-wrap:wrap}
.tc-hd .id{font-family:var(--font-mono);font-size:10.5px;color:var(--navy);font-weight:600}
.tc ol{margin:0;padding:11px 13px 11px 30px;font-size:12.5px}
.tc ol li{margin-bottom:5px}
.tc .exp{padding:0 13px 11px;font-size:12.5px;color:var(--navy)}
.tc .exp b{color:var(--ink);font-weight:600}
/* `.panel`, `.panel .ph`, `.finding` and `.finding b` are gone for the reason
   above the row card: no `src/templates/` page carries any of them, and both
   names belong to the sweep's own components. `.panel`'s `padding:13px 20px`
   was taking 40px of horizontal room off every panel on the performance page
   -- a tenth of the column at 420px -- and 26px of height, measured as
   `div.panel.rows` 1008x245 against 1008x219 without it. */
/* A checkbox or radio inside a label is otherwise stretched to the whole
   column, because the rule above sets width:100% on bare inputs. */
input[type=checkbox],input[type=radio]{width:auto;min-height:0}
.prc{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid var(--line)}
.prc:last-of-type{border-bottom:0}
.prc input{width:auto;min-height:0;margin-top:3px}
.seg .btn[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(142px,1fr));gap:10px;
  align-items:end;margin-bottom:16px}
.filters .btn{min-width:92px}
.thread{border:1px solid var(--line);border-radius:3px;margin-bottom:8px;background:var(--sunk)}
.thread summary{cursor:pointer;padding:11px 14px;list-style:none;display:flex;gap:11px;
  align-items:center;flex-wrap:wrap;font-size:12.5px}
.thread summary::-webkit-details-marker{display:none}
.thread summary::before{content:"▸";font-family:var(--font-mono);color:var(--green)}
.thread[open] summary::before{content:"▾"}
.thread .inner{padding:0 14px 12px;background:var(--surface)}
.kind{font-family:var(--font-mono);font-size:10px;letter-spacing:.6px;text-transform:uppercase;
  background:var(--surface);border:1px solid var(--line);padding:1px 6px;border-radius:2px;color:var(--navy)}
.score{font-variant-numeric:tabular-nums;font-weight:600}
.gate{font-family:var(--font-mono);font-size:10.5px;color:var(--navy)}
.prov{display:grid;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
.prov:last-child{border-bottom:0}
/* Each step names a URL or a scope in a `<code>`, so these are prose with
   unbreakable strings in them and belong with `.psub` and `.caveat` above:
   `https://<your-host>/slack/events` is 284px of step in a 256px list at
   360px, and the list has a 17px marker gutter taking room off it first. */
.steps{font-size:12px;color:var(--navy);padding-left:17px;margin:0;
  overflow-wrap:anywhere}
.steps li{margin-bottom:3px}
.scopes{display:flex;flex-wrap:wrap;gap:5px}
.scope{font-family:var(--font-mono);font-size:10px;background:var(--sunk);border:1px solid var(--line);
  padding:1px 6px;border-radius:2px;color:var(--navy)}
.caveat{font-size:11.5px;color:var(--navy);border-left:2px solid var(--yellow);padding-left:10px}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
