/* Flora — the first stylesheet in this repository.
 *
 * THE TOKENS LIVE IN tokens.css SINCE 2026-10-14, loaded before this file by
 * base.html and login.html. Every colour, every type size on the shared
 * scale, every single-value flex or grid gap and every corner radius on the
 * scale is consumed here through var(--...); no colour literal may appear in
 * this file. A size the sheet uses fewer than three times stays a literal,
 * recorded as such in the changeover entry of
 * docs/flora-stylesheet-versions.md.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* THE BROWSER'S OWN [hidden] RULE, PUT BACK OUT OF REACH OF A CLASS RULE.
 *
 * `[hidden] { display: none }` lives in the user-agent stylesheet, and ANY
 * author rule that sets `display` beats it, whatever its specificity. So a
 * component that sets its own display silently cancels the attribute for every
 * element carrying it, and nothing fails anywhere: the template says hidden, the
 * script sets `.hidden = true`, and the thing stays on the screen.
 *
 * It has happened twice on this surface. `.picklist` was caught by reading a
 * diff and fixed with a rule of its own, further down this file. `.askpanel` was
 * not caught, and it is the more expensive of the two because the chat panel is
 * in the shell and therefore on every page:
 *
 *   the panel ships `hidden` and sets `display: flex`, so it was drawn open on
 *   every page of the surface from the moment it landed
 *
 *   its Ask button calls `toggle(panel.hidden)`, which flips an attribute that
 *   changed nothing on the screen, so the button did nothing twice over
 *
 *   its close button sets `panel.hidden = true`, so the panel could not be shut
 *
 *   being `position: fixed` at `z-index: 40` over a `position: sticky` control
 *   bar at `z-index: 2`, it sat on the compound list's column picker and took
 *   every click meant for it, so the picker "did nothing" as well
 *
 * Fixed as the CLASS rather than one component at a time, so the next component
 * that sets a display cannot reopen it. `!important` is what puts the rule out
 * of reach; the only other `!important` in this file is the reduced-motion block
 * and it sets no display. tests/flora/test_hidden_means_hidden.py holds both
 * facts, and sweeps every element on this surface that carries the attribute. */
[hidden] { display: none !important; }

body {
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px;
}

a { color: var(--violet); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── top bar ─────────────────────────────────────────────────────────── */
.bar {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
}
.bar .wrap { display: flex; align-items: center; gap: 16px; height: 54px; }

.brand { display: flex; align-items: center; gap: 9px; flex: none; text-decoration: none; color: inherit; }
.brand svg { width: 19px; height: 19px; color: var(--violet); }
.brand span { font-family: var(--serif); font-size: 19px; letter-spacing: -.01em; }

/* ── the homepage banner ──────────────────────────────────────────────────────
 *
 * Added 2026-09-20, replacing the "N compounds across M programs" block Patrick
 * asked pulled: "just replace with a simple Flora - VRI banner with the little
 * logo." A NEW class rather than reusing `.statusline`: that class is the
 * bordered, padded card seven other Flora pages open with, and giving it to
 * three words and a mark would draw the same box those pages use for a
 * multi-line summary around a single line that is not one.
 *
 * TWO ROWS, NOT ONE. `.brandmark` is the mark and the wordmark; `.brandlinks`,
 * beneath it, is the three plain links to Data health, Conflicts and Flags
 * that used to be their own `.sub` lines with counts attached. The counts are
 * gone, per Patrick; the links are not, per the correction recorded in
 * `home.html`'s own comment and in
 * `tests/flora/test_flag_and_conflict_boards.py::TestTheFrontDoorLinksBothBoards`:
 * `nav.py` saying `in_nav=True` does not mean one click, because the header's
 * five groups ship closed.
 *
 * THE MARK IS SIZED UP FROM THE HEADER'S OWN 19px, since it is standing alone
 * here rather than beside a 54px bar full of navigation, but it is still the
 * "little logo" Patrick asked for and not a hero image: `.bn` is the same
 * 21px `.statusline h1` already sets for the sentence this replaces. */
.brandline { padding: 2px 0 4px; }
.brandmark { display: flex; align-items: baseline; gap: var(--sp-10); }
.brandmark svg { width: 24px; height: 24px; align-self: center; color: var(--violet); }
.brandmark .bn {
  font-family: var(--serif); font-size: var(--fs-21); font-weight: 400; letter-spacing: -.01em;
  color: var(--ink);
}
.brandmark .bco {
  font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
/* Plain text and plain links, deliberately: no card, no border, no count. A
 * `<p>`'s own `color` is inherited by anything inside it that has no colour
 * of its own, but `a { color: var(--violet) }` (top of this file) matches the
 * anchors directly and wins, so the three links stay the ordinary link colour
 * while the word "Data health" and the middot separators read as quiet fine
 * print around them. */
.brandlinks { margin: 6px 0 0; font-size: var(--fs-125); color: var(--ink-3); }

/* The .omni search rules were deleted on 2026-09-09 with the markup they
 * styled. The box was a disabled input on a form posting to /find, which is not
 * a route in app/flora/. Restore both together when search exists. */

/* The navigation, grouped. nav.py declares five groups and the shell printed
 * only the pages inside them, so fourteen links rendered as one flat row. Each
 * group is now a <details> whose <summary> is the group name. */
.nav { display: flex; gap: 2px; font-size: var(--fs-135); margin-left: auto; }

.navgrp { position: relative; }
.navgrp > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: var(--sp-5);
  padding: 6px 10px; border-radius: var(--r-7);
  color: var(--ink-2); white-space: nowrap;
  user-select: none;
}
.navgrp > summary::-webkit-details-marker { display: none; }
.navgrp > summary:hover { color: var(--violet); background: var(--card-2); }
.navgrp > summary:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
/* The group holding the current page. A weight change and the ink, not a colour
 * alone, because colour is never the only channel carrying meaning here. */
.navgrp > summary.on { color: var(--ink); font-weight: 600; }
.navgrp > summary .chev { width: 9px; height: 9px; flex: none; opacity: .6; transition: transform .12s; }
.navgrp[open] > summary { color: var(--violet); background: var(--card-2); }
.navgrp[open] > summary .chev { transform: rotate(180deg); }

/* Sized for one line per entry, not two. It was 268-340px because each row was a
 * label over a wrapped paragraph; with the paragraph gone that width is a column
 * of short labels against a lot of empty card.
 *
 * NOT MEASURED IN A BROWSER, and the numbers do not claim to be. What decides
 * whether the longest label today, "Conflicting compound identifiers", stays on
 * one line is the MAX, and 300px leaves it 272px of content box after this
 * panel's padding and the anchor's, which is more than 32 characters need at
 * 13.5px by any reasonable advance width. A label that did overflow would wrap
 * to a second line and still be legible and still be clickable, so the failure
 * this pair can produce is cosmetic. */
.navmenu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
  min-width: 204px; max-width: 300px;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 10px; box-shadow: var(--lift);
  padding: 5px; display: flex; flex-direction: column; gap: 1px;
}
.navmenu a {
  display: block; padding: 6px 9px; border-radius: var(--r-6);
  text-decoration: none; color: var(--ink);
}
.navmenu a:hover { background: var(--card-2); }
.navmenu a[aria-current="page"] { background: var(--violet-w); }
/* The label, and only the label. `.ns`, the per-page summary that rendered as a
 * second line here, was deleted on 2026-09-29: it is agent-facing text on the
 * ten entries the operation registry emits, up to 528 characters, and base.html
 * carries the measurement and the argument. It did not become a `title`
 * attribute; it had been one until 2026-09-09 and was moved out of one on
 * purpose, a hovering mouse being the only thing that ever sees one. */
.navmenu .nl { display: block; font-size: var(--fs-135); line-height: 1.35; }

/* ── back to VRI OS ──────────────────────────────────────────────────────────
 *
 * Added 2026-09-30, the day Patrick decided that everyone lands in Flora first,
 * that every old VRI OS page keeps working at its own address, and that Flora
 * links back wherever it has no counterpart. The markup is the last disclosure
 * in the bar, `.navgrp.oldsite`, and base.html carries the argument for what it
 * lists; these rules only decide how it looks.
 *
 * FILLED, WHERE THE FIVE GROUP SUMMARIES ARE PLAIN. The same ink-on-violet as
 * `.tool button`, the submit control on the run cards, so it reads as the one
 * primary control on the bar rather than a sixth section of Flora. Its edge is
 * `--violet`, never `--rule`: tests/flora/test_control_contrast.py sweeps every
 * bordered rule that lands on a summary and refuses the hairline token.
 *
 * HOVER AND OPEN KEEP THE FILL. `.navgrp > summary:hover` and
 * `.navgrp[open] > summary` turn a plain summary into violet ink on `--card-2`,
 * which on a filled control would invert it under the cursor; both are
 * overridden at higher specificity and the feedback is a slight darkening
 * instead. The focus ring takes `--ink` rather than `--violet`, because a
 * violet ring around a violet fill is no ring at all.
 *
 * THE PANEL IS A GRID, NOT THE SHARED COLUMN. `.navmenu` is 204 to 300px of one
 * column, sized for the handful of pages a Flora group holds. This panel lists
 * the old dashboard and then 23 old pages for a plain reader, 27 for an
 * administrator who is also a budget and payroll user, under five to seven
 * section headings, and one column of that runs off the bottom of a laptop
 * screen. Three columns of section blocks with the dashboard link spanning the
 * top is the override, scoped to `.oldsite .navmenu` so the shared rule is
 * untouched.
 *
 * NOT MEASURED IN A BROWSER, and the numbers do not claim to be: 660px is three
 * columns with room for the longest label, "Experiment Tracker" at 18
 * characters, and `calc(100vw - 44px)` keeps the panel inside a narrow window,
 * where the grid also drops to two columns. What can go wrong is cosmetic: a
 * label that wraps to a second line is still legible and still a link. */
.navgrp.oldsite { margin-left: 6px; }
.navgrp.oldsite > summary {
  color: var(--on-violet); background: var(--violet);
  border: 1px solid var(--violet); font-weight: 600;
}
.navgrp.oldsite > summary:hover,
.navgrp.oldsite[open] > summary {
  color: var(--on-violet); background: var(--violet); filter: brightness(.92);
}
.navgrp.oldsite > summary:focus-visible { outline-color: var(--ink); outline-offset: 2px; }
.navgrp.oldsite > summary .chev { opacity: .85; }
.oldsite .navmenu {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px; padding: 8px;
  width: min(660px, calc(100vw - 44px)); min-width: 0; max-width: none;
}
/* The old dashboard, alone on the top row: the one entry a reader is most
 * likely to want and the only one that is not under a section heading. */
.oldsite .navmenu > a { grid-column: 1 / -1; font-weight: 600; }
.oldsite .ngrp { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* A section heading, and a span rather than a link: the old menu's own section
 * names, which open nothing, so they get no hover and no pointer. */
.oldsite .ng {
  display: block; padding: 5px 9px 2px; font: 600 10.5px/1.2 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}

/* A SPAN SINCE 2026-09-30, not an anchor: the initials no longer link to the old
 * dashboard, because the disclosure above is the way back. The rule is
 * unchanged; `text-decoration: none` is inert on a span and stays so the rule
 * still reads correctly if the element is ever a link again. */
.me {
  width: 27px; height: 27px; border-radius: 50%; flex: none;
  background: var(--violet-w); color: var(--violet);
  display: grid; place-items: center;
  font: 600 11px var(--sans); text-decoration: none;
}
/* Below 820px the bar used to set `.nav { display: none }`, which removed the
 * only navigation on the surface and put nothing in its place. The groups now
 * scroll sideways instead, and the menus anchor left so a panel opened from the
 * far end of that scroll is not pushed off screen. The back-to-VRI-OS panel
 * drops from three columns to two at the same width. */
@media (max-width: 820px) {
  .bar .wrap { gap: var(--sp-10); }
  .nav { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .nav::-webkit-scrollbar { display: none; }
  .navmenu { right: auto; left: 0; min-width: 190px; }
  .oldsite .navmenu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The `.strip` rules, the preview strip under the bar, were deleted on
 * 2026-09-30 with the markup they styled. Flora stopped being a preview that
 * day and the strip's "read only" had been false since the flag and change
 * controls shipped; its link back to the old dashboard became the disclosure
 * above. base.html records the decision where the markup was. */

/* ── breadcrumb ──────────────────────────────────────────────────────── */
.crumbwrap { padding-top: 14px; }
.crumb { font-size: var(--fs-125); color: var(--ink-3); }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb .sep { margin: 0 7px; opacity: .6; }
.crumb b { color: var(--ink-2); font-weight: 500; }

/* ── page shell ──────────────────────────────────────────────────────── */
main.wrap { padding-top: 26px; }

/* ── the space between one section and the next ──────────────────────────────
 *
 * Added 2026-09-09, because NOTHING owned it. `* { margin: 0 }` at the top of
 * this file clears every default margin and no rule put one back for a section,
 * so each gap on a page was a side effect of whichever child happened to carry
 * a margin of its own.
 *
 * Measured on the home page before the fix: 26px between the summary card and
 * the programs row, borrowed from `.statusline`'s own margin-bottom, and ZERO
 * between the programs row and the "Tools and data" heading, because neither
 * side declared anything. Patrick: "The spacing on the main page is weird in
 * between the card rows."
 *
 * ADJACENT SIBLINGS, NOT A BOTTOM MARGIN ON EVERY SECTION. A bottom margin puts
 * trailing space under the last section of every page, and on the tool pages the
 * last section is followed by a provenance footer that would inherit the gap
 * twice. `section + section` spends the space only where two sections actually
 * meet, which is the only place a reader can see it.
 */
main.wrap > section + section { margin-top: 30px; }

/* ── the answer that is not a table ──────────────────────────────────────────
 *
 * A shellnote carries ONE fact: no rows, nothing unresolved, the source could
 * not be read. It is not a section of a page, it is the whole answer, and it is
 * usually two lines long.
 *
 * THE PADDING IS `.statusline`'s, not its own larger set. It was 30px 32px 28px
 * against the statusline's 20px 24px 18px, so the card holding the LEAST on this
 * surface was the roomiest thing on it: measured on the operation table's empty
 * state, 58px of vertical padding around two lines of text, and the two cards
 * sat one above the other on the same page at two different insets. Patrick,
 * 2026-09-17: "enormous text boxes". One card inset for one surface.
 *
 * The heading SIZE is deliberately untouched. tests/flora/test_operation_table_
 * template.py holds `.shellnote h2` to the size an <h1> renders at, because the
 * empty states are <h2> for outline reasons and must not read as the small
 * uppercase section label h2 carries elsewhere. Shrinking the type would be a
 * change to that rule and to a template this branch does not own.
 */
.shellnote {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 13px;
  box-shadow: var(--lift);
  padding: 20px 24px 18px;
  position: relative;
  overflow: hidden;
}
.shellnote .sprig {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  height: 150%; width: auto; color: var(--violet); opacity: .07;
  pointer-events: none;
}
.shellnote > * { position: relative; }

/* A shellnote that FOLLOWS the page heading carries an <h2>, because a second
   <h1> on one page leaves a screen reader with two titles and no outline. It is
   still the loudest thing in the card, so it is styled as a display heading here
   rather than as the small uppercase section label h2 carries elsewhere. Level
   and appearance are separate decisions and this is the rule that keeps them
   separate. */
.shellnote h2 {
  font: 400 30px/1.16 var(--serif);
  letter-spacing: -.012em; text-transform: none; color: var(--ink);
  margin: 0 0 6px; padding: 0; border-bottom: 0;
}

/* The last line in the card owns no space below it. `.lede` carries 12px so that
 * two of them are separated, and the card's own padding is what separates the
 * last one from the edge. Without this the bottom inset on a one-sentence empty
 * state is 18px of padding plus 12px of orphaned margin, which reads as a card
 * that has lost something off the end of it. */
.shellnote > :last-child { margin-bottom: 0; }

h1 {
  font-family: var(--serif); font-size: 30px; font-weight: 400;
  line-height: 1.16; letter-spacing: -.012em; margin-bottom: 12px;
}
h2 {
  font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin: 26px 0 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--rule);
}
.lede { color: var(--ink-2); max-width: 72ch; margin-bottom: 12px; }
.lede b { color: var(--ink); font-weight: 600; }

ol.steps { list-style: none; }
ol.steps li {
  padding: 8px 0; border-bottom: 1px solid var(--hair);
  font-size: 14px; color: var(--ink-2);
}
ol.steps li:last-child { border-bottom: 0; }
ol.steps b { color: var(--ink); font-weight: 620; }

.fine {
  margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: var(--fs-125); color: var(--ink-3);
}
/* INLINE FINE PRINT CARRIES NO RULE. `.fine` is a block footnote, and its
 * border-top is the rule above that footnote. On an inline `<span>` the border
 * is drawn on every line box the span wraps onto, so wrapped text reads as
 * struck through. Seen 2026-10-16 on the runs panel's run name and id and on
 * the run form's Start stop. Many contexts below reset the same three
 * properties one at a time (`.pick .fine`, `.viewbar .fine`, `.colbar .fine`
 * and others). This rule resets them for every span, so a new inline use cannot
 * bring the line back. `span.fine` outranks `.fine` and is outranked by every
 * two-class context rule, which keeps those rules' own margins. */
span.fine { margin-top: 0; padding-top: 0; border-top: 0; }

/* ── keyboard focus stays visible everywhere ─────────────────────────── */
a:focus-visible, input:focus-visible, button:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── dashboard ───────────────────────────────────────────────────────── */
.statusline {
  background: var(--card); border: 1px solid var(--rule); border-radius: 13px;
  box-shadow: var(--lift); padding: 20px 24px 18px;
  /* No margin-bottom. It used to supply the gap under this card on all five
     pages that use it, which made one component responsible for the page's
     rhythm and left every other pair of sections with none. The
     `section + section` rule above owns the spacing now. */
  position: relative; overflow: hidden;
}
.statusline > * { position: relative; }

/* ── notes stacked above a table ─────────────────────────────────────────────
 *
 * `.fine` is a FOOTNOTE rule. It carries 22px of margin and a hairline ABOVE
 * itself, which is what a footnote under a table needs and is wrong twice over
 * when the notes are the first thing in a card.
 *
 * The first one drew a rule 20px below the card's own top border, so every
 * statusline on this surface opened with a stray line across it. The ones after
 * it turned a list of short facts into four ruled-off sections: measured on
 * /n/programs, which is the page this branch was opened for, four one-line notes
 * occupied 34px of rule and margin EACH before their own text.
 *
 * Direct children only. The parameter form in operation_table.html puts
 * `label.fine` inside a <form>, so the labels there are untouched by both rules
 * and stay whatever the branch that owns them decides.
 */
.statusline > .fine:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.statusline > .fine + .fine { margin-top: 9px; padding-top: 0; border-top: 0; }
.statusline .sprig {
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  height: 210%; width: auto; color: var(--violet); opacity: .08; pointer-events: none;
}
.statusline h1 {
  font-family: var(--serif); font-size: var(--fs-21); font-weight: 400; line-height: 1.4;
  max-width: 74ch; margin-bottom: 5px; text-wrap: balance;
}
.statusline h1 b { font-weight: 600; }
.statusline h1 em { font-style: normal; color: var(--alert); font-weight: 600; }
.statusline .sub { font-size: var(--fs-125); color: var(--ink-3); }

.head { display: flex; align-items: baseline; gap: var(--sp-12); margin-bottom: 11px; }
.head h2 {
  font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin: 0; padding: 0; border: 0;
}
.head .hint { font-size: var(--fs-125); color: var(--ink-3); margin-left: auto; }

.progs { display: grid; grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 11px; }
/* Not interactive, so no hover response. A card that lights up under the cursor
   promises it opens something, and the per-program view is not built yet. */
.prog {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 15px 16px; box-shadow: var(--lift);
  border-top: 3px solid var(--violet); display: block; color: inherit;
}
.prog.thin { border-top-color: var(--rule-2); background: var(--card-2); box-shadow: none; }
.ph { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: 12px; }
.pn { font-family: var(--serif); font-size: var(--fs-21); letter-spacing: -.01em; }
.last { font-size: var(--fs-115); color: var(--ink-3); }
.last.none { color: var(--alert); }
.ms { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 9px 6px; }
.m { display: flex; flex-direction: column; gap: 1px; }
.m .v { font: 600 17px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.m .v.dim { color: var(--ink-3); font-weight: 400; }
.m .k { font-size: 10.5px; color: var(--ink-3); }
.prog.thin .m .v { color: var(--ink-3); }

.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: var(--sp-10); }
.tool {
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-11);
  padding: 14px 15px; display: flex; flex-direction: column; gap: var(--sp-5);
  box-shadow: var(--lift); text-decoration: none; color: inherit;
}
/* Hover on the openable cards ONLY. A card that lights up under the cursor
   promises it opens something, and half of these do not. The same fault was
   removed from the program cards on 2026-08-16; it survived here because the
   rule is written against `.tool`, which both groups share.
   The old [aria-disabled] rule went with it: nothing carries that attribute any
   more, so it styled nothing while looking like it covered this case. */
a.tool:hover { background: var(--card-2); }
.tn { font-size: 14.5px; font-weight: 620; letter-spacing: -.006em; }
.td { font-size: var(--fs-125); color: var(--ink-2); flex: 1; line-height: 1.45; }
.tm { font: 11.5px var(--mono); color: var(--ink-3); }
.ts {
  align-self: flex-start; margin-top: 5px; font: 600 10px/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--r-11);
  background: var(--card-3); color: var(--ink-3);
}
/* Availability is carried by which group a card sits in, not by a badge on the
   card. Six status words grading the build were replaced by two headings on
   2026-08-16, because a reader wants to know what opens, not how finished it is. */
.grp {
  font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin: 18px 0 9px;
}
.grp:first-of-type { margin-top: 4px; }
/* A card that opens nothing and is not greyed: the flywheel's wave cards. They
   hold text and at most one small link, so the card itself must not look raised
   or clickable. Shape only, no colour. */
.tool.t-plain { box-shadow: none; cursor: default; }
.tool .tn a { color: inherit; }
.fly-line { font-size: var(--fs-125); color: var(--ink-2); margin: 10px 0 0; }
.t-shut {
  opacity: .72; cursor: default; box-shadow: none; background: var(--card-2);
}
.t-shut .tn { color: var(--ink-2); }

/* THE TOOL ROW on the run panel: one line of chips under the board, so the board
 * is what a reader meets first. It wraps rather than scrolls on a narrow screen
 * and holds no fixed height; a chip is one text line. A shut tool says "cannot
 * start" in words, so `.t-shut`'s muted look is never the only signal. */
.toolrow { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toolchip {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--edge); border-radius: 999px;
  background: var(--card); color: inherit; text-decoration: none; font-size: 13px; line-height: 1.3;
}
a.toolchip:hover { background: var(--card-2); }
.toolchip.t-shut { box-shadow: none; }
/* ALL THREE of `.fine`'s footnote properties, the same fault `.tablebar .fine`
 * and `.colbar .fine` record below: `.fine` sets `margin-top`, `padding-top`
 * AND a `border-top`, right for a footnote under a card and wrong inside a
 * chip, where the shut chip's "cannot start" span was painting a stray
 * hairline and phantom padding over itself. */
.toolchip .fine { margin: 0 0 0 4px; padding-top: 0; border-top: 0; }
/* THE SHARE-THIS-VIEW BAR (viewlink.js), the same fault `.toolchip .fine`
 * records: `.fine` carries a footnote's margin, padding and hairline, so the
 * always-drawn status line painted a stray rule and 34px of space on every
 * operation page. Reset all three, and keep the status line out of the layout
 * until it carries a sentence. */
.viewbar { margin: 0 0 12px; }
.viewbar .fine { margin: 0; padding-top: 0; border-top: 0; }
.viewbar [role="status"]:empty { display: none; }
/* THE TWO CONTROLS EVERY OPERATION TABLE DRAWS, "Copy link to this view" and
 * "Snapshot this view", styled since 2026-10-28. Neither had a rule: the
 * filter's Apply button is styled through `.opfilter button[type="submit"]`
 * and these two sit outside that form, so on every operation page they drew as
 * the browser's own grey buttons. They take the column picker's secondary
 * button, because neither is the page's primary action. */
.viewbar .viewcopy,
.snapform button {
  font: inherit; font-size: var(--fs-12); padding: 4px 11px; cursor: pointer;
  color: var(--ink-2); background: var(--card-2);
  border: 1px solid var(--edge); border-radius: var(--r-6);
}
.snapform { margin: 6px 0 10px; }
.toolforms { margin: 0 0 16px; }
.toolforms > summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }

/* `.dests`, `.d`, `.dp`, `.dt`, `.df`, `.dn` and `.dq` left with the front door's
 * "where people go" progress-bar list, which this application no longer renders
 * anywhere: `home.html` carries no reference to any of the seven, and neither
 * does any other template under `app/templates/` or `app/flora/templates/`, swept
 * with `sweep_class.py` rather than assumed. They are deleted here rather than
 * left inert, because `.dt` was not actually inert: `reconciliation.html` and
 * `health.html` both use `class="dt"` for an unrelated table cell, a short
 * secondary fact rather than a progress bar, and the bare selector above painted
 * every one of those cells with this component's `height: 5px`, its rounded
 * `--card-3` fill and `overflow: hidden` for no reason either page's own markup
 * asked for. `table.grid .dt`, below, is what those cells actually meant. */
/* ── data health board ───────────────────────────────────────────────── */
.board-head { margin-bottom: 18px; }
.board-head h1 { margin-bottom: 10px; }
.answer {
  font-family: var(--serif); font-size: var(--fs-21); line-height: 1.42;
  max-width: 64ch; text-wrap: balance; margin-bottom: 10px;
}
.answer b { font-weight: 600; }
.answer .mk { color: var(--alert); font-weight: 600; }

.legend-row { display: flex; flex-wrap: wrap; gap: var(--sp-10); margin-bottom: 16px; }
.lg {
  display: inline-flex; align-items: baseline; gap: var(--sp-7);
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-9);
  padding: 7px 12px; font-size: var(--fs-125); color: var(--ink-2);
}
.lg .g { font-size: var(--fs-12); }
.lg .w { font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.lg .n { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.lg .m { color: var(--ink-3); }

/* State colour is Okabe-Ito and always sits beside a glyph and a word, per P11. */
.st-current .g, .st-current .w { color: var(--ok); }
.st-lagging .g, .st-lagging .w { color: var(--warn); }
.st-stale   .g, .st-stale   .w { color: var(--muted); }
.st-undated .g, .st-undated .w { color: var(--alert); }
.st-empty   .g, .st-empty   .w { color: var(--ink-3); }
.st-unreadable .g, .st-unreadable .w { color: var(--alert); }
/* The compound record page emits a glyph and a word here too, so the state needs
   a colour beside them or the '!' and the word render in the inherited ink and
   the tag reads as a label. `--alert` is Okabe-Ito vermillion, which is the same
   colour the two states above take. */
.st-conflict .g, .st-conflict .w { color: var(--alert); }

table.health { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
table.health th {
  text-align: left; font: 600 10.5px/1 var(--sans); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); padding: 9px 14px;
  background: var(--card-2); border-bottom: 1px solid var(--rule);
  position: sticky; top: 54px; z-index: 2;
}
table.health td { padding: 7px 14px; border-bottom: 1px solid var(--hair); vertical-align: baseline; }
table.health tr:last-child td { border-bottom: 0; }
table.health .num { text-align: right; font-variant-numeric: tabular-nums; }
table.health .rel { color: var(--ink); }
table.health .dt { color: var(--ink-2); font-size: var(--fs-12); }
table.health .none { color: var(--ink-3); font-style: normal; }
/* A row needing attention is marked by an edge as well as by its badge, so the
   signal survives a greyscale print and a colour vision deficiency alike. */
table.health tr.problem td:first-child { box-shadow: inset 3px 0 0 var(--alert); }
table.health tr.st-stale td:first-child { box-shadow: inset 3px 0 0 var(--muted); }
table.health .err { display: block; font-size: var(--fs-115); color: var(--alert); margin-top: 3px; }

.tag {
  display: inline-flex; align-items: baseline; gap: var(--sp-5);
  font: 600 10px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-11); background: var(--card-3);
}
.tag .g { font-size: var(--fs-11); }
.tag.st-current { background: var(--ok-w); }
.tag.st-lagging { background: var(--warn-w); }
.tag.st-stale { background: var(--muted-w); }
.tag.st-undated, .tag.st-unreadable { background: var(--alert-w); }
/* The compound record page prints this one when the identifier register holds an
   unresolved conflict against the compound. It is the only warning that page
   carries, and without a rule of its own it fell back to the neutral `.tag`
   background, so the warning read as an ordinary label. `--alert-w` is the same
   token the two unreadable states above use, and it is defined in all three
   theme blocks. */
.tag.st-conflict { background: var(--alert-w); }
/* The per-field open-conflict badge on the compound page. Glyph and word are both
   in the markup, so colour only reinforces. --warn: a disputed annotation, not a
   failed read. */
.conflict-badge .g, .conflict-badge .w { color: var(--warn); }
.tag.conflict-badge { background: var(--warn-w); text-decoration: none; }

/* The off-target safety warning, on the compound record page and as a row marker
   on the compound list. The SAME two tokens the two rules above already use, and
   the pair is deliberate rather than a third scheme: a criterion that fired takes
   --alert, which is what this page already prints for its other warning, and an
   unscreened, clean or unread compound takes --warn, as a disputed value does
   beside it.

   NO STATE HERE IS TOLD FROM ANOTHER BY HUE. Every tag draws a glyph (.g) and a
   word (.w), the `!` with "off-target safety warning", the `?` with
   "not screened" or "off-target screen unread", and the checked mark with
   "screened, nothing within one mismatch", so the state is read
   from text and the colour reinforces it. tokens-dark.css records the measurement
   for this pair: --warn against --alert is 1.41:1 in lightness and 9.45:1 against
   6.68:1 on --ground, so lightness separates them where hue does not. */
.st-offtarget .g, .st-offtarget .w { color: var(--alert); }
.tag.st-offtarget { background: var(--alert-w); }
.st-offtarget-open .g, .st-offtarget-open .w { color: var(--warn); }
.tag.st-offtarget-open { background: var(--warn-w); }
/* A SCREENED, CLEAN COMPOUND IS NOT A QUESTION. It takes --muted, the neutral
   gray the legacy library pages give every non-hit state so that none of them
   reads as a fourth kind of hit, and its glyph is the checked mark rather than
   the `?`. The word beside it still carries the claim. */
.st-offtarget-clean .g, .st-offtarget-clean .w { color: var(--muted); }
.tag.st-offtarget-clean { background: var(--muted-w); }
/* THE BANNER CARRIES AN EDGE AS WELL AS ITS TAG, the same second channel the
   health board gives a row needing attention: "marked by an edge as well as by
   its badge, so the signal survives a greyscale print and a colour vision
   deficiency alike". The section takes the state's own class, so a fired
   criterion draws the vermillion edge and an unscreened or unread one draws
   the orange one, and the heading beside it says which in words either way. */
.offtarget-warning { box-shadow: inset 3px 0 0 var(--warn); }
.offtarget-warning.st-offtarget { box-shadow: inset 3px 0 0 var(--alert); }
.offtarget-warning.st-offtarget-clean { box-shadow: inset 3px 0 0 var(--muted); }
/* The source sentence under each criterion, as its own quieter line. `.k` is the
   class the predicted panels use for a value's basis and its rule there is scoped
   to `table.grid .rowhead`, so this list needs its own copy of the same three
   declarations rather than a second class name for one meaning. */
.offtarget-warning li .k { display: block; color: var(--ink-3); font-weight: 400; }
/* The banner's own heading, which is an h2 inside a .statusline. That section
   styles h1 and nothing else, so without this the heading renders at the browser
   default and outweighs the compound's own identifier above it. The tag sits on
   the same line, which is what `baseline` is for. */
.offtarget-head {
  display: flex; align-items: baseline; gap: var(--sp-5); flex-wrap: wrap;
  font-family: var(--serif); font-size: var(--fs-135); font-weight: 600;
  line-height: 1.4; margin: 0 0 var(--sp-5);
}

/* The migration-applied board on this same page, /n/health, reuses the exact
   .tag treatment above rather than a third scheme. PARTIAL and UNPARSEABLE
   both take --alert: PARTIAL means part of a migration ran and part did not,
   which is worse than a clean UNAPPLIED, and UNPARSEABLE means the check
   could not even verify the file, so neither may read as milder than a
   plain "not applied". UNAPPLIED itself takes --warn: something is
   outstanding, but at least honestly so. NO_DECLARATIONS takes --muted, the
   same neutral this file already uses for "nothing here" (.st-empty). */
.st-applied .g, .st-applied .w { color: var(--ok); }
.st-no_declarations .g, .st-no_declarations .w { color: var(--muted); }
.st-unapplied .g, .st-unapplied .w { color: var(--warn); }
.st-partial .g, .st-partial .w,
.st-unparseable .g, .st-unparseable .w { color: var(--alert); }
.tag.st-applied { background: var(--ok-w); }
.tag.st-no_declarations { background: var(--muted-w); }
.tag.st-unapplied { background: var(--warn-w); }
.tag.st-partial, .tag.st-unparseable { background: var(--alert-w); }
table.health tr.st-unapplied td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

code {
  font: 12.5px var(--mono); background: var(--card-2);
  border: 1px solid var(--rule); border-radius: 5px; padding: 1px 6px;
}

/* A program card opens a page only when there is a page to open, so the affordance
   is scoped to the anchor. A `.prog:hover` rule here would light up the cards that
   render as a div, which is the same false promise this surface has been corrected
   for three times. */
a.prog { text-decoration: none; color: inherit; display: block; }
/* The three sides that are NOT the accent strip. `border-color` is shorthand for all
   four, so it repainted the 3px top border that carries the program colour, and the
   thin variant lost its own `--rule-2` top the same way. Hovering a card should not
   erase the one thing that identifies it. */
a.prog:hover {
  border-right-color: var(--ink-3);
  border-bottom-color: var(--ink-3);
  border-left-color: var(--ink-3);
}
a.prog:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }

table.grid { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
table.grid th, table.grid td { padding: 7px 10px; text-align: left; vertical-align: top; }
table.grid thead th { font-weight: 500; color: var(--ink-3); font-size: var(--fs-115);
  letter-spacing: .04em; text-transform: uppercase; }
table.grid tbody tr { border-top: 1px solid var(--rule); }
/* WHERE AN IN-PAGE LINK LANDS, and `.bar` is why the browser's own answer is
 * wrong here. The bar is `position: sticky; top: 0` over a 54px row, so
 * anything scrolled to the viewport top lands UNDERNEATH it and the reader is
 * looking at whatever follows the thing they asked for. `scroll-margin-top`
 * moves every anchor's resting place down by the bar plus a little air.
 *
 * TWO KINDS OF ANCHOR, AND THE RULE IS NOT SCOPED TO ONE. An earlier version
 * of this block claimed the flag board's `#rid-` link was "the surface's FIRST
 * in-page anchor, so there is no earlier form to copy", and a cold reader
 * showed the claim was false: the program page has linked its region cards by
 * bare fragment since before this branch (`program_pages.py` builds the href,
 * the region partials carry the id, and a test pins the rendered link). Those
 * cards sat under the same sticky bar with the same defect, and a rule written
 * only for table rows would have stepped around them while citing their
 * absence as its justification. `[id]:target` reaches both.
 *
 * THE MARK IS FOR THE TABLE ROW ONLY. A 200-row table gives no sign of WHICH
 * row was landed on, which is what the mark answers; a region card is a titled
 * block and needs no such help. `--warn-w` is the token `.tag.st-flag-open`
 * uses, so the landing reads as the flag it came from rather than as a new
 * state, and it is declared in all three palette blocks.
 *
 * TWO CHANNELS NOW, AND THE WASH ALONE COULD NOT CARRY IT. The mark is two
 * things; the wash is only the first of them.
 * An earlier version of this paragraph argued the highlight's legibility from
 * `--warn`, Okabe-Ito orange, while the rule beneath it painted `--warn-w`,
 * the pale wash. Measured against the page's `--ground`, the wash is 1.06:1
 * in the light palette and 1.28:1 in the dark one, so nearly the whole change
 * is hue, in light along the yellow-to-lavender axis. The primary reader's
 * deficiency is blue-green and tests/flora/test_control_contrast.py opens on
 * what follows from it: a boundary told apart by hue may not be there at all
 * for him. The whole purpose of the board's link is to land on one row of two
 * hundred and see which, so a mark he cannot see defeats the feature.
 *
 * SO THE EDGE AS WELL, in the form the three attention rules on `table.health`
 * above already use, for the reason their own comment gives. The edge takes
 * `--warn`, which is what an unapplied migration's row up there takes, and it
 * measures 1.89:1 against `--ground` in the light palette and 9.45:1 in the
 * dark one. 1.89:1 is not a 3:1 pass and nothing here claims it as one: what
 * the edge adds is POSITION AND SHAPE, a 3px band at the row's left edge that
 * is either there or not, which no wash of any hue can supply. The edge also
 * survives a print in black and white, at 1.89:1 of lightness, where a 1.06:1
 * wash does not.
 */
[id]:target { scroll-margin-top: 68px; }
table.grid tbody tr[id^="rid-"]:target { background: var(--warn-w); }
table.grid tbody tr[id^="rid-"]:target td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
/* The compound page's conflict badge lands on `annotation-` rows: same wash, same edge. */
table.grid tbody tr[id^="annotation-"]:target { background: var(--warn-w); }
table.grid tbody tr[id^="annotation-"]:target td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.grid .n { text-align: right; font-variant-numeric: tabular-nums; }
/* A cell holding a short secondary fact: reconciliation.html's finished-at date,
 * the rule that decided a row, the divergence list. Matches `table.health .dt`'s
 * own colour and size rather than inventing a second "secondary cell" rule for a
 * sibling table, now that the unrelated `.dt` this collided with is gone. */
table.grid .dt { color: var(--ink-2); font-size: var(--fs-12); }
/* UNKNOWN, on a cell that is not a count. reconciliation.html's `dim_if_unknown`
 * and `dim_if_unknown_text` have always appended this class beside `mono`, `dt`
 * and `n`, on a project ref, a mode, or a count nobody could read, and it drew
 * nothing: the only `.dim` rule on this sheet is `.m .v.dim`, a KPI tile that
 * never contains a `<td>`. A remainder of zero and a remainder this page could
 * not read rendered in the same ink, which is the exact failure the page's own
 * header comment says it exists to surface. `--ink-3` was tried first and
 * rejected: `tests/flora/test_control_contrast.py`'s `TestTheDeadPagerWordsAreLegible`
 * already found it under the 4.5:1 body text floor at 3.79:1 on `--paper`, the
 * same token measuring under that floor again here on every surface this table
 * sits on. `--ink-2` clears 4.5:1 everywhere in both themes and is already this
 * page's `.lede` colour. */
table.grid td.dim { color: var(--ink-2); font-weight: 400; }
table.grid .rowhead { font-weight: 500; white-space: nowrap; }
table.grid .rowhead .k { display: block; color: var(--ink-3); font-weight: 400; }
/* A row heading whose second line is a SENTENCE rather than a label.
 *
 * The nowrap above was written for what every other page puts here: 'internal
 * counter', 'database row id', a timestamp. A parsed run's sentinel row carries
 * a whole explanation instead (the off-target promiscuity note is 398
 * characters), and nowrap drew it on one line, so .tablewrap's overflow turned
 * the results table into a sideways scroll of that sentence on every such row.
 * Only the note is released, so the id above it still cannot break in two. */
table.grid .rowhead .rownote { white-space: normal; }
/* The unit chip in a column HEADING. Every other .k on this surface is inside a
 * cell, so a heading's chip matched no rule at all: it inherited the thead's
 * uppercase and letter-spacing and drew as part of the heading word. */
table.grid thead th .k {
  text-transform: none; letter-spacing: 0; color: var(--ink-3); font-weight: 400;
}
/* A column declared fmt="pill" renders its value as a status badge, reusing the
   .tag treatment the health board already uses rather than inventing a second
   pill. The cell does not wrap, because a status broken across two lines reads
   as two statuses. */
table.grid td.pill { white-space: nowrap; }
/* .ms is a grid, so flex-wrap on it does nothing at all. The program page wants
   four metrics rather than the dashboard's three, so widen the track count instead
   of setting a property the layout does not read. Copilot found the no-op. */
.ms.wide { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

/* ── flags ───────────────────────────────────────────────────────────────────
 *
 * SHAPES, NOT COLOURS, per P15. Every flag state renders as a glyph and a word,
 * and the colour below is decoration on top of both. Green is absent here as it
 * is everywhere else on this surface: red against green is the pairing the
 * primary reader cannot separate, which is the reason the tick and the cross
 * exist in the first place.
 *
 * The five names are the five statuses `value_flag_status_check` allows, plus one
 * for a status this application cannot produce. A row written by something else
 * carrying an unrecognised status would otherwise paint as an ordinary neutral
 * label, which is the exact defect st-conflict shipped with.
 */
.st-flag-open .g, .st-flag-open .w { color: var(--warn); }
.st-flag-confirmed .g, .st-flag-confirmed .w { color: var(--ok); }
.st-flag-corrected .g, .st-flag-corrected .w { color: var(--alert); }
.st-flag-unresolvable .g, .st-flag-unresolvable .w { color: var(--muted); }
.st-flag-withdrawn .g, .st-flag-withdrawn .w { color: var(--ink-3); }
.st-flag-unknown .g, .st-flag-unknown .w { color: var(--ink-3); }

.tag.st-flag-open { background: var(--warn-w); }
.tag.st-flag-confirmed { background: var(--ok-w); }
.tag.st-flag-corrected { background: var(--alert-w); }
.tag.st-flag-unresolvable { background: var(--muted-w); }
.tag.st-flag-withdrawn { background: var(--muted-w); }
.tag.st-flag-unknown { background: var(--card-3); }

/* The per-compound badge is a COUNT, not a verdict, so it has two states of
   its own rather than reusing the five above. `v_value_flag_by_compound`
   counts closures in one bucket, so a compound whose flags are all closed
   may have had every value corrected or every value confirmed, and painting
   that case with the tick would assert the half the view does not say. */
.st-flag-closed .g, .st-flag-closed .w { color: var(--ink-3); }
.tag.st-flag-closed { background: var(--card-3); }

/* Read by a screen reader, never seen. Used for the label on a control whose
   visible content is a glyph, so the control has a name in both channels. */
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* The one-click control beside a value. It is a real submit button in a real
   form, so it works with scripting switched off.
 *
 * NO HOVER RULE, deliberately. Every hover rule on this surface is scoped to an
 * anchor, because a card that lights up and opens nothing is a promise this
 * surface has already broken three times. A focus ring is the affordance instead,
 * which reaches a keyboard as well as a mouse. */
.flagform { display: inline; }
/* The uppercase treatment sits on the WORD inside the button, never on the
   button. A container forcing uppercase makes every word inside it inherit the
   transform, which is how the program page's two notices came to render their
   explanations in tiny capitals. `.tag` and `.lg` carry the same treatment and get
   away with it only because their content is a label; a button's is not. */
.flagbtn, .changebtn {
  display: inline-flex; align-items: baseline; gap: var(--sp-5);
  font: 600 11px/1 var(--sans);
  color: var(--ink-3); background: transparent;
  border: 1px solid var(--edge); border-radius: var(--r-11);
  padding: 4px 8px; cursor: pointer;
}
.flagbtn .g, .changebtn .g { font-size: var(--fs-12); }
.flagbtn .w, .changebtn .w { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.flagbtn:focus-visible, .changebtn:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.flagbtn:active, .changebtn:active { background: var(--card-2); }
.flagbtn.wide, .changebtn.wide { padding: 5px 12px; }
table.grid td.flagcell { width: 1%; white-space: nowrap; text-align: right; }

/* The row-level control, and the closing control on the flag board. Both carry a
   free text field, because a mark on a whole record without a word about why is a
   complaint nobody can act on. */
.flagrow, .flagclose, .changerow {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-7); margin-top: 9px;
}
.flagnote, .changenote, .changevalue {
  flex: 1 1 220px; min-width: 0;
  font: 13px var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-8);
  padding: 6px 10px;
}
.flagnote:focus-visible, .changenote:focus-visible, .changevalue:focus-visible {
  outline: 2px solid var(--ink-2); outline-offset: 1px;
}
.flagclose select {
  font: 12.5px var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-8);
  padding: 5px 8px;
}

/* ── the join, and why both blocks stay ──────────────────────────────────────
 *
 * Everything above this line arrived with the flag controls. Below it are the
 * Phase 2 table and cell primitives, the three tool landing pages, and the run
 * panel. Four rule sets from three branches, each of which called itself v=4
 * before the merges, which is why git keeps reporting this one region.
 *
 * THEY ARE NOT DUPLICATES AND NONE REPLACES ANOTHER. They share no selector:
 * above is `.st-flag-*`, `.flagbtn`, `.flagnote`, `.flagclose` and `.vh`; below is
 * `.run-*`, `.tool`, `table.grid thead th.sortable` and the note beneath a cell.
 * Dropping any of them silently unstyles a live page, which is what picking a side
 * would have done.
 *
 * The failure mode here is NOT a duplicate selector, which is what a reader looks
 * for and what a scan over `{...}` pairs finds. It is an unbalanced brace: a merge
 * on this file dropped the closing brace of `.tool button` and every rule after it
 * was swallowed, including the sortable headings. Count the braces.
 */

/* ── the run panel ──────────────────────────────────────────────────────────
   Five run states, each carrying a glyph as well as a colour, because colour
   never carries a meaning by itself here. The hues are the four already defined
   for the health board rather than four new ones: a second palette for a second
   board is how two pages come to disagree about what orange means.

   Green is deliberately absent, as everywhere else in this stylesheet. A
   completed run reads as `ok` blue, the same as a current relation. */
.st-pending   .g, .st-pending   .w { color: var(--ink-3); }
.st-running   .g, .st-running   .w { color: var(--warn); }
.st-completed .g, .st-completed .w { color: var(--ok); }
.st-failed    .g, .st-failed    .w { color: var(--alert); }
.st-cancelled .g, .st-cancelled .w { color: var(--muted); }
.tag.st-pending   { background: var(--muted-w); }
.tag.st-running   { background: var(--warn-w); }
.tag.st-completed { background: var(--ok-w); }
.tag.st-failed    { background: var(--alert-w); }
.tag.st-cancelled { background: var(--muted-w); }

/* The error text on a run row. table.health .err already styles the health
   board's; both of the run panel's uses are inside table.grid, so the selector
   names that and nothing wider. `td .err` was the first form and reached every
   .err in every table cell on the surface, including the health board's, which
   is broader than the sentence above it claimed. Copilot found the mismatch. */
table.grid .err { color: var(--alert); }

/* The submit buttons on this surface, and there are two.

   `.tool button` starts a run and sits inside a tool card, sized not to stretch
   it. `.requeue button` puts one run's delivery back in the queue and sits inside
   a table cell on the run panel, so it is smaller and its form carries no top
   margin: a row is not a card and a margin there pushes the whole row taller.

   TWO SELECTORS RATHER THAN ONE SHARED CLASS, because the two differ in size and
   in what surrounds them, and a shared rule would have to be overridden by one of
   them anyway. Neither can reach the other's markup.

   NO :hover RULE ON EITHER, deliberately. test_no_false_affordances.py requires
   every hover rule in this file to be scoped to an anchor, and a button is not
   one. The rule it protects has been broken three times on this surface, so the
   buttons give up their hover shade rather than the guard giving up its reach.
   Focus is still visible, through the global :focus-visible rule above.

   `.tool form` IS A FLEX COLUMN NOW, 2026-09-20, so its own `gap` supplies the
   space between every declared field and the button, where each field used to
   carry its OWN `margin-bottom` (below, `.tool form .pf`) for the same job:
   the exact "per-element margin" shape a run form's other two surfaces,
   `.rf` and `.prefill`, had already moved past. `align-self: flex-start`
   below is what "sized not to stretch it" now takes to keep being true: a
   flex column's default cross-axis behaviour is to STRETCH a child to the
   container's full width, and a `<button>` in ordinary block flow never did
   that on its own. */
.tool form { --rowgap: 6px; margin-top: 8px; display: flex; flex-direction: column; gap: var(--rowgap); }
.tool button {
  align-self: flex-start;
  font: inherit; font-size: var(--fs-125); padding: 5px 11px; cursor: pointer;
  color: var(--on-violet); background: var(--violet);
  border: 1px solid var(--violet); border-radius: var(--r-6);
}
.requeue { margin: 0; }
.requeue button {
  font: inherit; font-size: var(--fs-115); padding: 3px 9px; cursor: pointer;
  color: var(--on-violet); background: var(--violet);
  border: 1px solid var(--violet); border-radius: var(--r-6);
}

/* ── the run control on a tool page ──────────────────────────────────────────
 *
 * Added 2026-09-09. The three tool pages had no way to start the tool they are
 * about, because the template was written in step G-3 before a runner existed.
 *
 * ONE BLOCK, NOT A CARD IN A GRID. The run panel draws four tools side by side
 * and needs `.tools` to lay them out. A tool page is about one tool, so the
 * control is a single full-width block and reuses `.t-shut` for the unavailable
 * state rather than declaring a second way to say the same thing.
 *
 * The submit button borrows `.tool button` by matching its shape here rather
 * than by sharing a selector, for the reason that block already gives: the two
 * differ in what surrounds them. NO :hover, per test_no_false_affordances.py. */
.runbox {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-11);
  padding: 14px 16px 16px; box-shadow: var(--lift); margin: 4px 0 18px;
}
.runbox .grp { margin-top: 0; }
.runbox.t-shut { background: var(--card-2); box-shadow: none; }
.runbox .fine { margin: 0; }

/* ── the quiet chip disclosure, shared ───────────────────────────────────────
 *
 * ONE RULE SET, USED BY THREE CALLERS: the tool pages' compute envelope
 * (`.envelope`, below), the run form's collapsed s3:// box (`.s3alt`, in the
 * picker section further down) and, since 2026-10-01, the run form's
 * "Advanced options" drawer (`.advopts`, in the next block). The first two
 * used to be two hand-typed copies of the same declarations, caught by a cold
 * reviewer reading this branch: "A
 * second copy of the same numbers is the thing that drifts the day one of
 * them is nudged for one surface and not the other," which is the exact
 * argument `_brand_mark.html`'s own docstring makes about the flower mark,
 * in the same branch, about a different duplicate. `.chipdisc` is the fix:
 * one declaration of the summary's box, its caret and its two states, and
 * `.envelope`/`.s3alt`/`.advopts` carry only what actually differs between
 * them (their margin, `.s3alt`'s own input spacing, and `.advopts`'s
 * whole-row span), further down.
 *
 * NOT MERGED WITH `.colpick > summary`, which draws the same three channels
 * again for a third, older control. That rule is exercised by its own
 * established tests and sits inside `.tablebar`'s sticky-bar layout; folding
 * it into this one would touch a control this branch has no reason to
 * change. Named here as a duplicate left alone on purpose, not missed.
 *
 * SHAPE, EDGE AND WORD are the three channels, and colour carries none of
 * them: Patrick is blue-green colourblind, so a control told apart by hue
 * alone might as well not be told apart. `--edge` is the boundary token
 * every control on this surface is held to by
 * tests/flora/test_control_contrast.py. */
.chipdisc { font-size: var(--fs-12); }
.chipdisc > summary {
  width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: var(--sp-6);
  cursor: pointer; padding: 3px 8px; border-radius: var(--r-6);
  border: 1px solid var(--edge); background: var(--card-2);
  color: var(--ink-2); list-style: none; font-size: var(--fs-115);
}
.chipdisc > summary::-webkit-details-marker { display: none; }
.chipdisc > summary::before {
  content: ""; flex: none; width: 5px; height: 5px;
  border-right: 1.5px solid; border-bottom: 1.5px solid;
  transform: rotate(-45deg); margin-top: -1px;
}
.chipdisc[open] > summary::before { transform: rotate(45deg); margin-top: -2px; }
.chipdisc[open] > summary { color: var(--ink); }

/* ── the compute envelope, moved out of the primary flow ─────────────────────
 *
 * Added 2026-09-20. The instance type, disk size, lease and repository used to
 * be the first line under "Run this tool", ahead of the form: operator detail
 * in the first place a bench scientist looks. Patrick: "Clean and clear
 * formatting on the interface is a big priority." Collapsed rather than
 * deleted, because somebody approving a run still has to know what it bills;
 * `.tm` inside it is the same paragraph, unchanged, just not the first thing a
 * reader meets. */
.runbox .envelope { margin: 0 0 12px; }
.runbox .envelope .tm { margin: 8px 0 0; }

/* The declared fields, laid out so a long label does not squash its input.
 *
 * THE DRAWER LAYS OUT AS THE FIELDS ABOVE IT DO, ON WHATEVER SURFACE IT IS
 * DRAWN, which is what two rules say and one could not. Each of the three
 * callers spaces its essential fields its own way, deliberately: `.rf` is a
 * grid (the tool page), `.prefill` and `.tool form` are one-per-line flex
 * columns. So `.advfields` is a flex column by default and takes the grid only
 * where `.rf` is the form around it.
 *
 * ONE GRID DECLARATION STILL, shared by `.rf` and the drawer inside it, which
 * is `.chipdisc`'s argument applied to the same file: a nudge to the track
 * width cannot move the fields above the disclosure without moving the ones
 * inside it.
 *
 * WHY NOT ONE GRID EVERYWHERE, since that is what this rule did between
 * rounds 1 and 4. Cold review round 1 found the drawer's fields sitting flush
 * against each other on the two flex surfaces, because a flex column's `gap`
 * reaches only its direct children (`.prefill`, `.tool form`) and `.pf`'s
 * margins are zeroed: the same grandchild-loses-the-gap shape base.html's v=23
 * note records for `.tool form`. Unscoping fixed that, and brought the COLUMN
 * COUNT along with it, which round 4 caught: on the prefill card the four
 * essential fields render one per line while the drawer's five rendered two
 * abreast at any content width over 438px. `.prefill`'s own note states
 * one-per-line as a SAFETY property, "so a value the panel filled in is read
 * before it is changed rather than after", which is the same argument this
 * branch uses for opening the drawer over a chosen value; a card that argues
 * for reading every filled value and then doubles up the rows inside its own
 * disclosure is arguing against itself. The gap was the defect; the columns
 * were collateral.
 *
 * `min(212px, 100%)` RATHER THAN A BARE 212px FLOOR, which is the form
 * `.opfilter` already uses and documents further down: "A bare `minmax(212px,
 * 1fr)` track keeps its 212px floor even when the container is narrower than
 * that, so the track overflows rather than shrinking." Round 2 found the
 * unscoped grid inside the runs page's compact tool cards, whose own track
 * floor is 224px (`.tools`) and whose content box is that minus `.tool`'s
 * 14px/15px padding and 1px border, so a card at its minimum has 192px to
 * give and the fields ran through its right border. The guarded floor stays
 * on `.rf` on its own account: a tool page on a phone meets the same wall.
 *
 * The other `.rf` rules below are DESCENDANT selectors (`.rf p`, `.rf label`,
 * `.rf input[type="text"]`), so each already reaches inside the `<details>` on
 * the page that has them, with nothing further to say here. */
/* THE SURFACE'S OWN GAP, READ RATHER THAN RETYPED. `.prefill` and `.tool form`
 * each declare their row spacing once as `--rowgap` and use it themselves; a
 * custom property inherits where `gap` does not, so the drawer's rows inside
 * either surface take that surface's number without this rule knowing it.
 * Cold review round 5, house lens: the paragraph above said the drawer lays out
 * as the fields above it do, and on the compact card the fields above sat 6px
 * apart while the drawer's rows sat 10px, because this rule carried one gap for
 * both flex surfaces. A second `.tool form .advfields { gap: 6px }` would have
 * been a second copy of the card's number, which is the drift this file keeps
 * arguing against; the property is the one-declaration form. The 10px fallback
 * is for a drawer drawn somewhere neither surface wraps, which nothing does
 * today. */
.advfields { display: flex; flex-direction: column; gap: var(--rowgap, 10px); margin-bottom: 12px; }
.rf, .rf .advfields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(212px, 100%), 1fr));
  gap: 10px 14px; margin-bottom: 12px;
}
/* THE DISCLOSURE SPANS THE WHOLE ROW rather than taking one track. Left as an
 * ordinary grid item it would sit in a 212px column beside an essential field,
 * which reads as a fifth field rather than as the lid over the rest of them.
 * `.prefill` and the compact tool cards are flex columns and need no such rule:
 * a block child of a column already spans it. */
.rf > .advopts { grid-column: 1 / -1; margin-bottom: 2px; }
.advopts > .advfields { margin-top: 10px; }
/* `.rf div.pf` BESIDE `.rf p`, 2026-10-07: `_run_fields.html` draws an `s3`
 * field's block as a `<div class="pf">`, because the HTML parser closes a
 * `<p>` at the `<details>` start tag the block holds (the macro's own note
 * says what that did to the served page). Written on the element plus the
 * class rather than on `.pf` alone, so `fieldset.pf.mselect` on this surface
 * keeps the layout it has today. */
.rf p, .rf div.pf { display: flex; flex-direction: column; gap: var(--sp-4); margin: 0; }
.rf label { font-size: var(--fs-12); color: var(--ink-2); }
/* SCOPED TO THE TEXT BOX, matching `.prefill` and `.tool form` two blocks down.
   It was a bare `.rf input` while a note was the only field there could be, and a
   tick box inherited 7px of padding, a border and a rounded card background. */
.rf input[type="text"] {
  font: inherit; font-size: var(--fs-13); padding: 7px 10px; min-width: 0;
  color: var(--ink); background: var(--card-2);
  border: 1px solid var(--edge); border-radius: var(--r-7);
}
.rf input[type="text"]::placeholder { color: var(--ink-3); }

.runbox form { margin: 0; }
.runbox button {
  font: inherit; font-size: var(--fs-125); padding: 6px 13px; cursor: pointer;
  color: var(--on-violet); background: var(--violet);
  border: 1px solid var(--violet); border-radius: var(--r-6);
}

/* ── grouped and abridged tool tables ────────────────────────────────────────
 *
 * Added 2026-09-09. Off-target rendered 18 columns at equal weight, qPCR 17 and
 * design 15, which a reader called "random, unformatted data". Two changes, and
 * neither alters a value, an order or a filter: a heading row saying what kind of
 * quantity each run of columns holds, and the less-used columns hidden until
 * asked for.
 *
 * HIDDEN WITH display:none ON A CELL, not by dropping it from the HTML. The cell
 * is present, so revealing it costs no request, sorting still reads its
 * data-sort, and every data-col index the sort control holds stays correct. */
.colbar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-12);
  margin: 0 0 8px;
}
/* ALL THREE OF `.fine`'S FOOTNOTE PROPERTIES, not only the margin. `.fine` sets
 * `margin-top`, `padding-top` and a `border-top`, which is right for a footnote
 * under a card and wrong for a label inside a control bar: resetting the margin
 * alone left a 1px rule painted across the top of the count sentence with 12px
 * above it. `.statusline > .fine:first-child` resets the same three and is the
 * shape this follows. */
.colbar .fine { margin: 0; padding-top: 0; border-top: 0; }
/* `main.wrap > section.colbar + section { margin-top: 10px }` WAS HERE AND IS
 * DELETED, because after 2026-09-18 it matched nothing at all.
 *
 * It closed the gap between a control bar and the table below it, for the
 * compound list's `<section class="colbar">`. That section is gone: the picker is
 * in the floating bar and in the filter form now. The only `.colbar` left on the
 * surface is `tool.html`'s, and it is a `<div class="colbar">` nested inside a
 * `<section>` of its own, so a `section.colbar` selector never matched it and an
 * adjacent-sibling rule has nothing to reach. The tool pages get their spacing
 * from that enclosing section like every other one.
 *
 * SAID RATHER THAN SILENTLY DROPPED, and the first draft of this deletion kept
 * the rule with a comment claiming the tool pages relied on it, which is exactly
 * the false-comment defect this branch corrected twice elsewhere. Restore the
 * rule with the markup, if a `<section class="colbar">` ever comes back. */
/* The tool pages' column button, which lives in a `.colbar` and carried the
 * same under-contrast border as everything else in this group. */
.colbtn {
  font: inherit; font-size: var(--fs-12); padding: 4px 11px; cursor: pointer;
  color: var(--ink-2); background: var(--card-2);
  border: 1px solid var(--edge); border-radius: var(--r-6);
}

/* The heading row. Quieter than the column labels beneath it: it classifies, and
 * the label is what a reader actually reads across. A rule on the left of each
 * heading marks where one group ends and the next starts. */
table.grid thead tr.grouprow th {
  font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); text-align: left;
  padding: 9px 10px 5px; background: var(--card-2);
  border-bottom: 1px solid var(--hair);
}
table.grid thead tr.grouprow th + th { border-left: 1px solid var(--rule); }

table.grid [data-sec] { display: none; }
table.grid.allcols [data-sec] { display: table-cell; }

/* ── TWO SORTING TREATMENTS, AND THEY ARE NOT DUPLICATES ─────────────────────
 *
 * The two blocks below arrived on different branches and share no selector. One
 * sorts with an ANCHOR, `table.grid thead th.sortable a.sort`, because the
 * heading opens a sorted page. The other sorts with a BUTTON,
 * `table.sortable .sortbtn`, because the heading re-orders the rows already on
 * the page and fetches nothing.
 *
 * That is a difference in what the control DOES, so converging them would be a
 * design decision and a merge is not the place to make one. They are kept
 * separate on purpose. Neither block can reach the other's markup: an anchor
 * rule needs a `th` carrying `sortable`, and the button rules need a `table`
 * carrying it.
 */

/* Sortable column headings.
   The heading is an anchor because it opens a sorted page, and the hover rule is
   scoped to that anchor, so nothing that cannot be clicked lights up. The caret
   is one of two shapes and the same fact is carried by aria-sort, so the state is
   never a glyph alone and never a colour: no column on these tables carries a
   verdict, and a coloured heading would be one. */
table.grid thead th.sortable { padding: 0; }
table.grid thead th.sortable a.sort {
  display: block; padding: 7px 10px; color: inherit; text-decoration: none;
}
table.grid thead th.sortable.n a.sort { text-align: right; }
table.grid thead th.sortable a.sort:hover { color: var(--ink); }
table.grid thead th[aria-sort="ascending"] a.sort,
table.grid thead th[aria-sort="descending"] a.sort { color: var(--ink); }
table.grid thead th .dir { font-size: 10px; margin-left: 3px; }

/* The three empty states share one mark and differ in the word beside it, so the
   classes exist to be found in the markup rather than to paint anything. Only
   the note is styled, and it is styled the same for all three: an absence is not
   a state colour, and colouring one of the three would rank them. */
table.grid td.blank .why,
table.grid td.val .why {
  display: block; font-size: var(--fs-115); color: var(--ink-3); margin-top: 2px;
}

/* ── the tool landing pages ──────────────────────────────────────────────────
 *
 * Three tools, one skeleton, so there is one block of rules rather than three.
 *
 * No :hover rule anywhere below. A hover response on this surface is scoped to
 * elements that are links, and a sort control is a button. Its affordance is the
 * pointer and the arrow, both of which are true of it whether or not the cursor
 * is over it.
 */
.runfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; }
.runfacts dt { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.runfacts dd { font-size: var(--fs-125); word-break: break-all; }

/* A results table can be wider than the page. It scrolls inside its own box, so
   the page itself never scrolls sideways. */
.tablewrap { overflow-x: auto; }

/* DO NOT GIVE `.sheet` THIS SAME RULE without reading this first. A version of
 * the run panel's 2026-09-21 column cleanup did exactly that, on the correct
 * observation that the run panel's own tables sat in a `<div class="sheet">`
 * with no scroll-container treatment at all. The fix was wrong anyway:
 * `health.html` and `audience.html` also wrap a table in `.sheet`, and that
 * table is `table.health`, whose `th` is `position: sticky; top: 54px`
 * (further down this file). Setting `overflow-x` to anything but `visible`
 * forces the browser to compute `overflow-y` as `auto` too, which makes the
 * element the nearest scrolling ancestor for any sticky descendant. `.sheet`
 * has no height of its own, so it never actually scrolls, and the sticky
 * header stops tracking the page and sits near the top of its own box
 * instead. Confirmed in a real browser: the header's y-position after
 * scrolling the page is 54, correctly pinned, without the rule, and 8,
 * unpinned, with it. The run panel's tables were moved to `.tablewrap` above
 * instead, which has no sticky descendant anywhere it is used. `.sheet` is
 * back to carrying no rule of its own. */

table.sortable thead th { padding: 0; }
.sortbtn {
  display: flex; align-items: center; gap: var(--sp-5); width: 100%;
  background: none; border: 0; padding: 7px 10px; cursor: pointer;
  font: inherit; color: inherit; text-align: inherit;
}
table.sortable th.n .sortbtn { justify-content: flex-end; }
.sortbtn:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
/* The arrow is a shape first. Neutral and double headed until the column is the
   one being sorted, then single headed and pointing the way the rows are
   ordered, so the direction is readable without the colour. */
.sortbtn .arrow::after { content: "\2195"; color: var(--ink-3); }
th[aria-sort="ascending"] .sortbtn .arrow::after { content: "\2191"; color: var(--violet); }
th[aria-sort="descending"] .sortbtn .arrow::after { content: "\2193"; color: var(--violet); }
th[aria-sort="ascending"] .sortbtn,
th[aria-sort="descending"] .sortbtn { color: var(--ink); }

.prov { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--rule); }
.prov .fine { max-width: 78ch; margin-bottom: 6px; }

/* ── the chat panel ──────────────────────────────────────────────────────────
 *
 * A launcher fixed in the corner and a surface it opens. Included by base.html,
 * so these rules apply on every page of this surface.
 *
 * NO :hover RULE, for the reason stated twice above: a hover response on this
 * surface is scoped to elements that are links, and both controls here are
 * buttons. Their affordance is the pointer and the focus ring, both of which are
 * true of them whether or not the cursor is over them.
 *
 * Every colour is a token defined on the bare :root, so this block needs no
 * counterpart inside the dark media query.
 */
.askwrap {
  position: fixed;
  right: var(--askdock-inset); bottom: var(--askdock-inset); z-index: 40;
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-10);
}

/* WHAT THE PANEL SAYS WHEN IT CANNOT WORK. Drawn in place of the launcher when
 * the script finds a piece of the panel missing, and never otherwise. A control
 * that returns early and leaves the button sitting there is indistinguishable
 * from a broken page, which is the complaint this replaces. */
.askdead {
  order: 3; max-width: min(300px, calc(100vw - var(--askdock-inset) * 2));
  background: var(--card); color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: var(--r-9);
  box-shadow: var(--lift); padding: 8px 11px;
  font: 400 12.5px/1.45 var(--sans);
}

.askopen {
  order: 2;
  border: 1px solid var(--violet); border-radius: 999px;
  background: var(--violet); color: var(--on-violet);
  font: 600 13px/1 var(--sans); letter-spacing: .02em;
  padding: 11px 20px; cursor: pointer; box-shadow: var(--lift);
}
.askopen:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.askpanel {
  order: 1;
  /* Bounded on both axes so a long conversation scrolls inside the panel and the
     page behind it never grows a second scrollbar. The width falls back to the
     viewport on a narrow screen rather than overflowing it. */
  width: min(380px, calc(100vw - 36px));
  max-height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: var(--lift); overflow: hidden;
}

.askhead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--hair);
  background: var(--card-2); font: 600 13px/1.2 var(--sans);
}
.askclose {
  border: 0; background: none; color: var(--ink-3);
  font: 400 18px/1 var(--sans); padding: 0 2px; cursor: pointer;
}
.askclose:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.askfine {
  margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--hair);
  font: 400 11.5px/1.45 var(--sans); color: var(--ink-3);
}

.asklog {
  flex: 1 1 auto; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.askmsg {
  font: 400 13px/1.5 var(--sans);
  /* THE ASSISTANT HALF IS BUILT AS ELEMENTS NOW, by askmd.js, and this comment
     said the opposite until a cold reader read it: a reader changing this rule
     reads this line before the block below. `pre-wrap` still matters, and for a
     narrower reason. Every OTHER string in this log is plain text -- the person's
     question, a refusal, a progress line -- and its own newlines are the only
     structure it has. `.askmdp` restates `pre-wrap` for itself rather than
     inheriting it from here, so an unrendered construct inside a rendered answer
     does not depend on this line either. */
  white-space: pre-wrap; overflow-wrap: anywhere;
  padding: 8px 10px; border-radius: var(--r-9); max-width: 92%;
}
.ask-you { align-self: flex-end; background: var(--violet-w); color: var(--ink); }
.ask-flora { align-self: flex-start; background: var(--card-2); color: var(--ink); }

/* ── the answer's Markdown, rendered ────────────────────────────────────────
 *
 * The model writes Markdown whether or not anybody asks it to, and until these
 * rules existed the syntax characters stood on the screen as themselves.
 * askmd.js draws a closed subset as elements and every class it can apply is
 * here; anything outside the subset stays literal text and needs none.
 *
 * `.askmsg` KEEPS `white-space: pre-wrap` AND THE PARAGRAPH INHERITS IT, which
 * is what makes an unrendered construct still read. A numbered list, a table row
 * or a block quote comes through as the characters the model wrote, one line per
 * line, exactly as the whole answer did before. The blocks whose own structure
 * supplies the line breaks take it back off.
 *
 * NO :hover RULE, including on the link, for the reason the two blocks above
 * give: tests/flora/test_no_false_affordances.py requires every hover rule on
 * this surface to be scoped to an anchor, and this one gives up the exemption it
 * could claim. The underline and the focus ring are true of it whether or not
 * the cursor is over it.
 *
 * COLOUR CARRIES NOTHING ON ITS OWN HERE. A heading is heavier, a list is
 * indented and bulleted, code is monospaced and boxed, and a link is underlined.
 * Every one of those reads with the colours ignored.
 *
 * Every colour is a token defined on the bare :root, so this block needs no
 * counterpart inside the dark media query.
 */
.askmd { margin: 0; }
.askmd + .askmd { margin-top: 7px; }

/* STATED RATHER THAN INHERITED, and it is the one rendered block that depends on
   it. `.askmsg` above is already `pre-wrap` and a paragraph would inherit that,
   but askmd.js joins a paragraph's lines with the newline the model wrote, so a
   numbered list, a table or a block quote reads one line per line only while
   this holds. Writing it here means changing the bubble cannot silently run
   fourteen unrendered constructs together. */
.askmdp { white-space: pre-wrap; }

.askmdh {
  font: 620 12.5px/1.35 var(--sans); color: var(--ink);
  white-space: normal;
}
/* TWO STEPS, NOT SIX, AND ALL SIX WRITTEN OUT. The panel is 380px wide and six
   type sizes inside it read as noise, so levels 3 to 6 take the base size. They
   are named rather than left to inherit it, because a class askmd.js can apply
   with no rule of its own is a class the browser's defaults decide, and the
   guard in tests/flora/test_chat_markdown.py checks all six. A screen reader
   still gets the level the model wrote, through the `aria-level` askmd.js sets
   from the number of hashes. */
.askmdh1, .askmdh2 { font-size: var(--fs-135); }
.askmdh3, .askmdh4, .askmdh5, .askmdh6 { font-size: var(--fs-125); }

.askmdul {
  white-space: normal;
  padding-left: 17px; margin: 0;
}
.askmdul li { margin: 1px 0; }

.askmdcode {
  font: 400 12px/1.4 var(--mono);
  background: var(--card); border: 1px solid var(--hair); border-radius: 4px;
  padding: 0 3px;
}
/* The exact command on a proposed-run card. THE SAME RULES AS .askmdpre, the
   one other preformatted block on this surface, taken by hand and not by
   claim: the first version said it "takes the same measurement" and matched
   none of it, wrapped with overflow-wrap:anywhere, and read a token
   (--panel) defined nowhere. A command line here can be 628 characters, and a
   wrap breaks it mid-token into rows that look exactly like the next command
   line, in a block whose job is to be exact. So, as the house block does: its
   own scroll container, so a long line moves this block sideways rather than
   the page. Margin 0, because .prefill is a flex column whose gap already
   spaces every row and a margin here would stack on it. */
.cmdpreview {
  font: 400 12px/1.5 var(--mono);
  white-space: pre;
  overflow-x: auto;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--hair);
  border-radius: var(--r-7);
  background: var(--card);
}

.askmdpre {
  white-space: pre;
  /* Its own scroll container, so a long line of code moves this block sideways
     rather than the panel or the page behind it. */
  overflow-x: auto;
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-7);
  padding: 7px 9px;
}
/* THE BARE `code` RULE FURTHER UP THIS FILE PAINTS A BOX, and this element sits
   inside one already. `.askmdpre code` is (0,1,1) and beats `code` at (0,0,1),
   but ONLY for the properties it declares, so background, border, border-radius
   and padding arrived from the shared rule and drew a second bordered, padded box
   inside the block. Inline, so the border painted at the start of the first line
   and the end of the last. Found by a cold reader; the class guard in
   tests/flora/test_chat_markdown.py could not see it, because askmd.js gives this
   element no class and the guard reads the classes it applies. The four
   properties are turned off here rather than a class being invented, since the
   guard would then demand a rule for that class and the rule would be this. */
.askmdpre code {
  font: 400 12px/1.5 var(--mono); color: var(--ink);
  background: none; border: 0; border-radius: 0; padding: 0;
}

/* The destination is allowlisted in askmd.js to https and to a path under the
   Flora prefix the panel passes in. Nothing else becomes a link at all, so
   there is no such thing here as a link that looks live and goes nowhere, and
   none that leaves this surface for a route the reader did not choose. */
.askmdlink { color: var(--violet); text-decoration: underline; }
.askmdlink:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.askform {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px; border-top: 1px solid var(--hair); background: var(--card-2);
}
.askform textarea {
  flex: 1 1 auto; resize: none;
  font: 400 13px/1.45 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-8);
  padding: 7px 9px;
}
.askform textarea:focus-visible { outline: 2px solid var(--violet); outline-offset: -1px; }
.asksend {
  border: 1px solid var(--violet); border-radius: var(--r-8);
  background: var(--violet); color: var(--on-violet);
  font: 600 12.5px/1 var(--sans); padding: 9px 13px; cursor: pointer;
}
.asksend:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* A disabled control says so in more than one channel: the cursor changes and the
   fill drops back, so it is legible without relying on colour alone. */
.asksend[disabled] { background: var(--muted); border-color: var(--muted); cursor: default; }

/* ── the proposal card, inside the chat panel ────────────────────────────────
 *
 * A run the panel has filled in, drawn where the answer is. It is a READING
 * surface with one link on it: the link opens the run form pre-filled, and the
 * button on that page is the only thing that starts anything.
 *
 * NO :hover RULE. The rule this surface has broken three times is that a hover
 * response promises something opens, and the guard in
 * tests/flora/test_no_false_affordances.py requires every hover rule in this file
 * to be scoped to an anchor. The link here is an anchor and could carry one; it
 * gives it up so the block needs no exception, and its affordance is the underline
 * and the focus ring, both of which are true whether or not the cursor is over it.
 *
 * Every colour is a token defined on the bare :root, so this block needs no
 * counterpart inside the dark media query.
 */
.askcard {
  max-width: 100%;
  /* Not pre-wrap. The card is built from elements rather than from one string, so
     the newlines .askmsg preserves would show as blank lines between them. */
  white-space: normal;
  border: 1px solid var(--rule); background: var(--card);
  padding: 9px 11px; display: flex; flex-direction: column; gap: var(--sp-5);
}
.askcardh { font: 620 13px/1.3 var(--sans); color: var(--ink); }
.askcardm { font: 400 11.5px/1.45 var(--sans); color: var(--ink-3); }
.askcardv {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px;
  margin: 2px 0 0; font: 400 12px/1.4 var(--sans);
}
.askcardv dt { color: var(--ink-3); }
.askcardv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.askgo {
  align-self: flex-start; margin-top: 3px;
  font: 600 12.5px/1 var(--sans); color: var(--violet);
}
.askgo:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* The approval question below a run card. A FLEX CONTAINER OF ITS OWN, matching
   `.askcard`'s own shape, rather than a bare block: `.askgo`'s `align-self:
   flex-start` only does anything inside a flex parent, and this block's own
   "Yes, I approve" button is a `<button>`, not the `<a>` the rest of that rule
   was written for. Nesting it one level deeper than `.askcard` without this
   would leave `align-self` inert and the button would just happen to render at
   its natural inline-block width, which is the right size by accident rather
   than by rule. */
.askapproval { display: flex; flex-direction: column; gap: var(--sp-5); margin-top: 2px; }
.askapproval button.askgo { background: none; border: 0; padding: 0; cursor: pointer; }
.askapproval button.askgo:disabled { color: var(--ink-3); cursor: default; }

/* The pre-filled run form on the runs page. One field per line, so a value the
   panel filled in is read before it is changed rather than after. */
.prefill { --rowgap: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: var(--rowgap); }
.prefill .pf { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0; }
.prefill label { font: 600 11.5px/1.3 var(--sans); color: var(--ink-2); }
.prefill input[type="text"] {
  font: 400 13px/1.45 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-8);
  padding: 7px 9px; max-width: 60ch;
}
.prefill input[type="text"]:focus-visible { outline: 2px solid var(--violet); outline-offset: -1px; }
.prefill button {
  align-self: flex-start;
  font: inherit; font-size: var(--fs-125); padding: 6px 13px; cursor: pointer;
  color: var(--on-violet); background: var(--violet);
  border: 1px solid var(--violet); border-radius: var(--r-6);
}
.prefill .fine { margin: 0; }

/* The same field, rendered empty inside a tool card. Sized to the card rather
   than to the page, so the tools grid keeps its columns. */
.tool form input[type="text"] {
  width: 100%; box-sizing: border-box; margin-bottom: 6px;
  font: 400 12px/1.4 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-6);
  padding: 5px 7px;
}
.tool form input[type="text"]:focus-visible { outline: 2px solid var(--violet); outline-offset: -1px; }

/* The same values with no form around them, for a proposal that cannot be started
   from this page. A form with no submit button and exactly one field that blocks
   implicit submission is submitted by Enter, per the WHATWG implicit-submission
   rule, so a card the page says cannot be started renders its values as text
   rather than as controls. Reusing .pf keeps the two shapes on one line each. */
.prefill.shut .lab { font: 600 11.5px/1.3 var(--sans); color: var(--ink-2); }
.prefill.shut .was {
  font: 400 13px/1.45 var(--sans); color: var(--ink);
  max-width: 60ch; overflow-wrap: anywhere;
}

/* ── the controls the declared fields draw ───────────────────────────────────
 *
 * Added 2026-09-09 with the fields themselves. Every run form used to draw one
 * text box per field, because the only field was a note. The fields are now
 * derived from `catalog.Param`, so a flag draws a tick box and a choice draws a
 * menu of exactly the values the tool accepts, and both need a rule here or the
 * browser paints its own default inside a card sized for a text box.
 *
 * THE CLOSING BRACE ABOVE IS PART OF THIS CHANGE. `.prefill.shut .was` had been
 * unclosed since it shipped, so everything up to the next `}` was consumed as
 * declarations of that rule and `.gatebar`, the results review gate's own
 * control, never applied at all. These rules would have been eaten the same way.
 *
 * NO HOVER RULE, per test_no_false_affordances.py. The focus ring is the
 * affordance and it reaches a keyboard as well as a mouse.
 */
.pf .tk { display: flex; align-items: center; gap: var(--sp-7); }
.pf .tk label { font: 400 12.5px/1.3 var(--sans); color: var(--ink); }
.pf input[type="checkbox"] { margin: 0; accent-color: var(--violet); }
.req {
  font: 600 10px/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-3);
}
.prefill select, .rf select, .tool form select {
  font: 400 13px/1.45 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-8);
  padding: 6px 8px; max-width: 60ch;
}
.tool form select { width: 100%; box-sizing: border-box; margin-bottom: 6px; font-size: var(--fs-12); }
.prefill select:focus-visible, .rf select:focus-visible, .tool form select:focus-visible {
  outline: 2px solid var(--violet); outline-offset: -1px;
}
/* The tool card packs its fields tight, so the paragraph the macro wraps each
   one in must not add the margin a paragraph normally carries. NO margin of
   its own any more, 2026-09-20: `.tool form`'s own `gap` is what spaces one
   field from the next now, matching `.rf` (grid + gap) and `.prefill` (flex +
   gap), the run form's other two surfaces. A margin here as well as a gap on
   the parent would double the space between fields rather than share it. */
.tool form .pf { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0; }

/* ── picking a run input by name ─────────────────────────────────────────────
 *
 * Drawn by `_run_fields.html` beside every field of kind `s3`, because two of
 * qPCR's three required parameters are one and the form otherwise demands two
 * bucket paths from somebody who has never seen one.
 *
 * DRIVE FIRST, SINCE 2026-09-20. `.pickbtn`, the button that used to stand in
 * front of the search box, is deleted along with the CSS that drew it. The
 * search box itself still ships `hidden` in the template, exactly as the
 * button did: "always visible" is what `inputpick.js` makes true the moment
 * it runs, not a licence to draw a box that looks live and does nothing with
 * scripting blocked, which is the false affordance this surface has already
 * paid for three times. What a blocked script leaves visible is `.s3alt`
 * below, open rather than closed, which is where a no-script field is
 * actually filled in.
 *
 * NO HOVER RULE, per test_no_false_affordances.py. A button does nothing until
 * something wires it up, and `.pickchange` and `.pickone` both need
 * `inputpick.js` running before either can do anything. The focus ring is the
 * affordance and it reaches a keyboard as well as a mouse.
 *
 * A REFUSED FILE IS STILL DRAWN, in `.pickno`, and it is deliberately not red
 * and not marked by colour alone. Patrick is blue-green colourblind, so the
 * distinction between a file that can be picked and one that cannot is carried
 * by the shape: one is a button and one is not, and the sentence under it says
 * why. Colour never carries meaning on its own here.
 */
.pick { display: flex; flex-direction: column; gap: var(--sp-6); margin-top: 4px; }
.pickq {
  font: 400 12.5px/1.45 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-8);
  padding: 6px 8px; max-width: 40ch; box-sizing: border-box;
}
.pickq:focus-visible { outline: 2px solid var(--violet); outline-offset: -1px; }
.pickmsg { margin: 0; }
.picklist { display: flex; flex-direction: column; gap: var(--sp-4); max-width: 60ch; }
/* A CLASS RULE SETTING `display` OUTRANKS THE BROWSER'S OWN [hidden] RULE, which
   is `[hidden] { display: none }` at user-agent specificity. So the line above,
   on its own, kept the list laid out while the template said it was hidden and
   the script set `.hidden = true`: an empty flex box with a gap sat under the
   field until something was searched for. Found by reading the diff rather than
   by looking at the page. `.pickq` needs no such rule because nothing here sets
   a display on it. */
.picklist[hidden] { display: none; }
.pickone, .pickno {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  border: 1px solid var(--edge); border-radius: var(--r-6); padding: 6px 8px;
  background: var(--card-2);
}
.pickone { cursor: pointer; }
.pickone:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pickone .pn { font: 600 12.5px/1.3 var(--sans); color: var(--violet); }
/* A PICKABLE RESULT IS A <button>, AND EVERY FORM CONTAINER ON THIS SURFACE
   PAINTS ITS BUTTONS VIOLET: `.tool button`, `.prefill button` and `.runbox
   button` set `background: var(--violet)` and `color: var(--on-violet)`, each
   with a higher specificity than `.pickone` above. So a Drive search result on
   the run form rendered as a violet block with its name, `.pn` in `--violet`,
   invisible on the same violet, and only the size line faintly readable.
   Reported by Patrick 2026-10-07 and reproduced with the deployed stylesheet.
   These overrides out-rank the container rules by naming them, so the card
   keeps the look declared above wherever the picker is drawn. */
.tool button.pickone, .prefill button.pickone, .runbox button.pickone, form button.pickone {
  align-self: stretch; font: inherit; padding: 6px 8px; text-align: left;
  color: var(--ink); background: var(--card-2);
  border: 1px solid var(--edge); border-radius: var(--r-6);
}
.tool button.pickone .pn, .prefill button.pickone .pn, .runbox button.pickone .pn, form button.pickone .pn {
  color: var(--violet);
}
.pickno .pn { font: 600 12.5px/1.3 var(--sans); color: var(--ink-2); }
/* ALL THREE OF `.fine`'S FOOTNOTE PROPERTIES, not only the margin: the reset
   `.colbar .fine` and `.tablebar .fine` carry, for the same reason. `.fine`
   draws a hairline ABOVE itself, and inside `.pick` that line has nowhere
   right to be. The `.pickupload` help sentence is an inline span inside a
   plain span, not a flex item, so its top border is painted along the top of
   every line fragment it wraps into, and at four columns (the runs page's tool
   grid at 1000 px) a hairline struck through "No file chosen" beside it and
   through the wrapped sentence itself. Seen in Chrome, 2026-10-07. */
.pick .fine { margin: 0; padding-top: 0; border-top: 0; overflow-wrap: anywhere; }
/* SEVERAL FILES IN ONE FIELD, 2026-10-07. `inputpick.js` draws one `.pickrow`
   per chosen file inside `.pickrows` with a `.pickremove` button, and
   `platemap_run.js` draws one `.pmfile` line per file (and a `.pmrepeat` note)
   inside `.pmfiles`. None of those had a rule when PR #221 shipped, so the
   second file name wrapped around the first Remove button and the file lines
   of the summary ran together on one line. Rows are a column of flex rows,
   the Remove is a small quiet button rather than the container's violet
   submit, and each summary line is its own block. */
.pickrows { display: flex; flex-direction: column; gap: var(--sp-4); margin: 2px 0 4px; }
.pickrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pickrow .pn { font: 600 12.5px/1.3 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
/* USE A FOLDER, 2026-10-16. `inputpick.js` reveals `.pickfolder` on a
   pick-many field: the folder box and its List button on one wrapping line,
   then one `.pickfolderrow` per .eds file (checkbox, name, size and plate,
   and a fine-print line for a refusal or the other files deriving the same
   Plate_ID), then the Use button. A refused file keeps its row, in the quiet
   ink `.pickno` uses, because a file that is listed and cannot be used is
   exactly what a person goes looking for. Both buttons are the small quiet
   button `.pickremove` is, never the container's violet submit. */
.pickfolder { display: flex; flex-direction: column; gap: var(--sp-4); }
.pickfolder[hidden] { display: none; }
.pickfolder > label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.pickfolderq {
  flex: 1 1 28ch; min-width: 16ch; font: inherit; font-size: var(--fs-12); padding: 3px 6px;
  color: var(--ink); background: var(--card-2); border: 1px solid var(--edge); border-radius: var(--r-6);
}
.pickfolderq:focus-visible { outline: 2px solid var(--violet); outline-offset: -1px; }
.pickfolderfiles { display: flex; flex-direction: column; gap: 2px; max-width: 60ch; }
.pickfolderfiles[hidden] { display: none; }
.pickfolderrow { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.pickfolderrow .pn { font: 600 12.5px/1.3 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.pickfolderrow.pfno .pn { color: var(--ink-2); }
.pickfolderrow .fine + .fine { flex-basis: 100%; }
.tool button.pickfolderlist, .prefill button.pickfolderlist, .runbox button.pickfolderlist, form button.pickfolderlist,
.tool button.pickfolderuse, .prefill button.pickfolderuse, .runbox button.pickfolderuse, form button.pickfolderuse {
  align-self: flex-start; font: inherit; font-size: var(--fs-11); line-height: 1; padding: 3px 8px; cursor: pointer;
  color: var(--ink-2); background: var(--card-2); border: 1px solid var(--edge); border-radius: var(--r-6);
}
.pickfolderlist:focus-visible, .pickfolderuse:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.tool button.pickremove, .prefill button.pickremove, .runbox button.pickremove, form button.pickremove {
  align-self: center; font: inherit; font-size: var(--fs-11); line-height: 1; padding: 3px 8px; cursor: pointer;
  color: var(--ink-2); background: var(--card-2); border: 1px solid var(--edge); border-radius: var(--r-6);
}
.pmfiles { display: block; margin-top: 4px; }
.pmfile, .pmrepeat { display: block; }
.pmfile + .pmfile { margin-top: 2px; }
/* THE STOP BESIDE START, 2026-10-16. `platemap_run.js` inserts it after the
   submit button as a `.fine` span; inline, it wrapped under the button and
   `.fine`'s hairline ran through the text (Patrick's screenshot of the Screen
   3 batch). Its own block below the button, the three footnote properties
   reset as every other in-form `.fine` resets them, in the alert colour the
   form's other inline problems (`.err`) use. */
.pmstop { display: block; margin: 8px 0 0; padding-top: 0; border-top: 0; color: var(--alert); max-width: 78ch; }
/* A GRID NOBODY READ, ON A FILE ROW, with its "Read this grid" control: the
   grid's name, a reason field and the button on one wrapping line, the
   server's refusal under them. */
.pmunread { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; }
.pmunread .pmreadwhy { font: inherit; font-size: var(--fs-11); flex: 1 1 22ch; min-width: 16ch; padding: 3px 6px;
  color: var(--ink); background: var(--card-2); border: 1px solid var(--edge); border-radius: var(--r-6); }
.pmreadsay { flex-basis: 100%; color: var(--alert); }
.pmreadsay:empty { display: none; }
.pmunreadlink { display: block; }
.pmusewhy { display: block; margin-bottom: 4px; color: var(--alert); }
/* THE CHOSEN FILE, once `inputpick.js` has one to show. `.pn` here is the same
   class the search results draw their own file name in, bold against the
   surrounding fine print for the same reason: it is the one word in this row
   a bench scientist actually reads. */
.pickchosen { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.pickchosen .fine { margin: 0; }
.pickchosen .pn { font: 600 12.5px/1.3 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.pickchange {
  font: 600 11.5px/1 var(--sans); color: var(--violet); cursor: pointer;
  background: none; border: 1px solid var(--edge); border-radius: var(--r-6); padding: 3px 8px;
}
.pickchange:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* The same control inside a tool card, which is one of five in a row and is far
   narrower than the page. Sized to the card, exactly as the card's own text box
   and menu already are, so the tools grid keeps its columns. */
.tool form .pick { margin-bottom: 6px; }
.tool form .pickq { width: 100%; max-width: none; font-size: var(--fs-12); }
.tool form .picklist { max-width: none; }
.tool form .pickchange { font-size: var(--fs-11); padding: 3px 6px; }

/* ── the s3:// box, once the Drive search is the field's primary control ─────
 *
 * `_run_fields.html` draws this beside `.pick` rather than in place of the old
 * bucket-path box: somebody who already has a URI still needs somewhere to
 * type it, and it is the ONLY thing on the field when `staging_available` is
 * false. A `<details>` rather than a second `.fine` sentence, because the
 * sentence used to sit there unconditionally and Patrick read the page as
 * S3-only until it said otherwise; a collapsed box that says "Paste an S3
 * address instead" on its own summary makes the same point without spending a
 * line of text on it when the Drive search above already has. The chip's own
 * shape, border and caret are `.chipdisc`, shared with the tool pages'
 * compute envelope above.
 *
 * SHIPS OPEN. `inputpick.js` is what closes it, once it has actually revealed
 * the search box beside it; the shut state in this stylesheet is reached
 * only by script, never by a server-rendered attribute, so a blocked script
 * leaves the box exactly as usable as it always was. */
.s3alt { margin-top: 6px; }
.s3alt input[type="text"] { margin-top: 6px; }

/* THE ONE SENTENCE LEFT ABOVE THE BOX, for the deployment with no shared
 * Drive configured, where the box below it is the only route and `.s3alt`
 * does not exist at all: `_run_fields.html` renders this branch instead of
 * the disclosure, never both.
 *
 * `.fine.srcline`, NOT `.srcline` ALONE, and the reason is specificity rather
 * than tidiness. Cold review, 2026-09-18: a bare `.srcline` selector TIES with
 * bare `.fine`'s own specificity, and CSS breaks a tie by SOURCE ORDER; this
 * rule happened to be written after `.fine`'s in the file, so it won by the
 * luck of position rather than by being the more specific rule, and a later
 * edit that reordered the sheet could silently un-win it. Scoping by an
 * ancestor instead, in the shape `.colbar .fine` and `.tablebar .fine` use,
 * is the wrong fix here rather than an alternative: the SAME `<p class="pf">`
 * also carries the field's ordinary help text in its own bare `.fine`, a few
 * lines below this one in `_run_fields.html`, and an ancestor-scoped rule
 * would reset that footnote too. `.fine.srcline` matches only the element
 * that carries both classes and wins by specificity in every order, so it
 * touches nothing else on the page.
 *
 * A FULL RESET, NOT ONLY THE MARGIN, for the same reason the selector is
 * exact. `.fine` is a FOOTNOTE rule: it carries 22px of margin-top, 12px of
 * padding-top and a hairline border-top, right for a caveat drawn under
 * something. This line is context drawn ABOVE the box, so all three are
 * reset here rather than only the margin. No colour carries the distinction:
 * this is the same `--ink-3` every other `.fine` uses, which is a rule for
 * every surface here and not only for Patrick's blue-green colourblindness. */
.fine.srcline { margin: 0; padding-top: 0; border-top: 0; }

/* ── the results review gate (step G-8) ──────────────────────────────────────
 *
 * The one place on this surface where a control writes a scientific value. The
 * bar is a plain row rather than a card, because the table above it is the thing
 * being read and a bordered box under it would compete with the table's own rule.
 *
 * NO HOVER RULE ON THE BUTTON. Every hover rule in this file is scoped to an
 * anchor, for the reason recorded three times already: a thing that lights up
 * under the cursor promises it opens something. The focus ring is the affordance,
 * and it reaches a keyboard as well as a mouse.
 */
.gatebar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-12); margin-top: 12px;
}
.gatebar .fine { flex: 1 1 320px; margin: 0; }
.gatebar button {
  font: 600 12.5px/1 var(--sans); color: var(--card);
  background: var(--ink); border: 1px solid var(--ink);
  border-radius: var(--r-8); padding: 8px 14px; cursor: pointer;
}
.gatebar button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.gatebar button:active { background: var(--ink-2); border-color: var(--ink-2); }

/* The per-compound exceptions to saving a whole run, and the promote controls.
 *
 * Patrick's first control is ONE action with exceptions, so the list under it is
 * a list of decisions rather than a list of rows: no bullets, because a bullet
 * beside a checkbox reads as a second mark, and the label carries the control's
 * whole meaning so the two are one click target.
 *
 * NO COLOUR CARRIES MEANING IN EITHER BLOCK. Every state on these screens is a
 * glyph and a word first, per the surface's own rule and because Patrick is blue
 * green colourblind: a green-versus-blue or maroon-versus-green distinction is
 * invisible to him, so none is used anywhere here.
 */
.exceptions { margin-top: 12px; }
.exceptions .fine { margin: 0 0 6px; }
/* ALL THREE OF `.fine`'S FOOTNOTE PROPERTIES once a SECOND sentence appears, the
 * reset `.statusline > .fine + .fine` and `.colbar .fine` already carry and for
 * the identical reason. The rule above resets the margin only, which was enough
 * while this block held one sentence. The save control now states two facts, what
 * saving writes to invitro_knockdown and what it writes to kd_metrics_aggregated,
 * and `.fine`'s hairline-above would rule them apart into two sections when they
 * are one description of one button. */
.exceptions .fine + .fine { margin-top: 6px; padding-top: 0; border-top: 0; }

/* WHAT THE PARSE SAID ABOUT THE FILES, above the save control.
 *
 * ONE RULE FOR THE BLOCK AND NOT ONE PER NOTE. `.fine` is a footnote rule and
 * carries 22px of margin plus a hairline ABOVE itself, which is right for a
 * single footnote and wrong for a stack: the qPCR parse emits three notes, and
 * unreset they would occupy 34px of rule and margin EACH before their own text
 * and read as three ruled-off sections rather than three facts about one set of
 * files. Measured by the same comment `.statusline > .fine + .fine` carries. */
.parsenotes { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule); }
.parsenotes .fine { margin: 0; padding-top: 0; border-top: 0; max-width: 92ch; }
.parsenotes .fine + .fine { margin-top: 8px; }
.exceptlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.exceptlist li { display: flex; align-items: baseline; gap: var(--sp-6); }
.exceptlist label { font: 12.5px/1.4 var(--sans); cursor: pointer; }
.exceptlist label .k { margin-left: 4px; }

/* The refusal and the untrustworthy note under an outcome. `table.grid .err`
   already colours it; this is what puts it on its own line, the way `.why` does
   for a provenance line.

   THE MARGIN IS ON THE SIBLING SELECTOR, NOT ON `.err` ITSELF. Copilot on PR 86:
   the first version put `margin-top` on every `.err` in the table, including the
   cells where the span IS the cell. runs.html:121 is one, the whole content of
   the Last failure cell, and a top margin there is padding under nothing, which
   pushes that row's text out of line with the rest. The margin now applies only
   where a sibling really does sit above it, which is the case the rule was
   written for. */
table.grid td .err { display: block; font-size: var(--fs-115); }
table.grid td * + .err { margin-top: 3px; }

/* The secondary line inside a cell that is NOT the row heading: the dose under a
   cell line, the sentence under an outcome, the note under a standing pair.
 *
 * SCOPED TO THIS TABLE, not to `table.grid td .k` generally. The general form
 * would also catch reconciliation.html:100, where the fingerprint is written
 * with a leading space and clearly means to sit inline after the run name.
 * Widening a rule to fix one page and silently relaying another is the trade
 * this avoids. */
table.gate-lines td .k,
table.gate-lines td .why {
  display: block; font-size: var(--fs-115); color: var(--ink-3); font-weight: 400;
  margin-top: 2px;
}

/* A list that is a list of facts rather than a list of bullets.
 *
 * Used inside a table cell, where the cell holds several short statements and a
 * bullet glyph would read as decoration in a column of numbers. No colour and no
 * weight: the cell's own text style is the one the reader is already in. */
.bare { list-style: none; margin: 0; padding: 0; }
.bare li + li { margin-top: 2px; }


/* ── change sets ─────────────────────────────────────────────────────────────
 *
 * ONE TREATMENT, TWO NAMES. The rules above carry `.changebtn`, `.changenote`,
 * `.changevalue` and `.changerow` alongside their flag counterparts rather than
 * repeating themselves here. A change control and a flag control are both a small
 * button and a text field in a plain form, and giving them two visual treatments
 * would say they are two kinds of thing when the only difference is what they do.
 * A second copy of a ruleset is a second thing to keep in step.
 *
 * SHAPES, NOT COLOURS, per P11 and P15. Every state below is a glyph AND a word,
 * and the colour is decoration on top of both. Green is absent as a state colour
 * here as everywhere on this surface.
 */

/* Which front end wrote. Four, of which two are wired today; the other two are
 * named so an unwired front end is a recorded gap rather than a value somebody
 * has to invent later, and `unknown` covers a row written by something else. */
.st-intent-form .g,   .st-intent-form .w   { color: var(--ok); }
.st-intent-agent .g,  .st-intent-agent .w  { color: var(--violet); }
.st-intent-rule .g,   .st-intent-rule .w   { color: var(--muted); }
.st-intent-revert .g, .st-intent-revert .w { color: var(--warn); }
.st-intent-unknown .g, .st-intent-unknown .w { color: var(--ink-3); }

.tag.st-intent-form   { background: var(--ok-w); }
.tag.st-intent-agent  { background: var(--violet-w); }
.tag.st-intent-rule   { background: var(--muted-w); }
.tag.st-intent-revert { background: var(--warn-w); }
.tag.st-intent-unknown { background: var(--card-3); }

/* Whether a cell still holds what a change set wrote. Three states, and the
 * third is not a middle one: `unknown` means the current value could not be
 * read, which is a different statement from knowing the cell did not move. */
.st-drift-steady .g,  .st-drift-steady .w  { color: var(--ok); }
.st-drift-moved .g,   .st-drift-moved .w   { color: var(--alert); }
.st-drift-unknown .g, .st-drift-unknown .w { color: var(--ink-3); }

.tag.st-drift-steady  { background: var(--ok-w); }
.tag.st-drift-moved   { background: var(--alert-w); }
.tag.st-drift-unknown { background: var(--card-3); }

/* The diff. Before and after in adjacent columns, in that order, and the
 * difference between them carried by the column heading rather than by colour.
 * The old value is struck through, which is a shape, and dimmed, which is not
 * load bearing on its own. */
table.grid td.was { color: var(--ink-3); text-decoration: line-through; }
table.grid td.was .blank { text-decoration: none; }
table.grid td.now { color: var(--ink); }

/* One editable cell: its label, the note under it, the value, the reason and the
 * button, wrapping to one line per control on a narrow screen. */
.changeform {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-7);
  padding: 10px 0;
}
/* The rule goes BETWEEN controls, keyed on the sibling rather than on
 * :first-of-type. A cell whose value the form cannot carry renders as a div
 * instead of a form, and :first-of-type counts per element type, so the first
 * div and the first form would both have read as "first" and the separator
 * between them would have gone missing. */
.changeform + .changeform { border-top: 1px solid var(--hair); }
/* The reason a blocked cell gives, on its own line under the label. */
.changeform .fine { flex: 1 1 100%; order: 4; margin-top: 0; }
.changelabel {
  flex: 0 0 auto; font: 500 13px var(--sans); color: var(--ink); min-width: 120px;
}
.changeform .why { flex: 1 1 100%; order: 3; }
.changevalue { flex: 2 1 260px; }
.changenote  { flex: 1 1 200px; }

/* ── an operation page's filter form ─────────────────────────────────────────
 *
 * Added 2026-09-17. `operation_table.html` printed each parameter's `help` as
 * its <label>, and `help` is written for an agent reading an MCP tool schema:
 * `compound_class` is 629 characters and cites a migration timestamp. The label
 * is `Param.form_label` now and the long text is a <details> under the field.
 *
 * WHY THE TEXT OVERLAPPED ITSELF rather than merely being long, because the
 * layout fix is only right if it addresses the cause. The label carried `.fine`,
 * which sets `margin-top: 22px`, `padding-top: 12px` and a top border. A <label>
 * is inline, an inline box takes no vertical margin, and its padding and border
 * are PAINTED without reserving space, so each wrapped line's padding and rule
 * were drawn over the line above. Three of these sat as siblings in the form's
 * own inline flow with nothing separating them. So each field is a block now,
 * and no label on this form carries `.fine`.
 *
 * THE GRID MIRRORS `.rf`, the run form's, deliberately: same auto-fit, same
 * 212px floor, same gap shape. Two filter forms on one surface laid out two
 * different ways is a second answer to a settled question.
 *
 * THE GUARDED FLOOR, WHICH `.rf` NOW SHARES. A bare `minmax(212px, 1fr)` track
 * keeps its 212px floor even when the container is narrower than that, so the
 * track overflows rather than shrinking. `.statusline` clips it, which turns a
 * narrow screen into a field cut off at the edge of the card. `min(212px,
 * 100%)` lets the floor collapse to the container on anything narrower, so the
 * form stacks and every field stays whole. Inside the card at 400px there is
 * 308px to lay out in, so the stack is one full-width column.
 *
 * THIS WAS WRITTEN AS "ONE DIFFERENCE FROM `.rf`" and stopped being one on
 * 2026-10-01, when the rule at the top of this file took the same guarded
 * floor for the same reason: that grid was reaching the runs page's compact
 * tool cards, whose content box is 192px at the `.tools` minimum. Cold review
 * round 3, house lens, caught the stale half of the sentence. There is no
 * difference between the two rules' track floors any more, and the paragraph
 * above is the shared argument for both.
 *
 * THE RULE IS `.rf, .rf .advfields`, NOT `.rf, .advfields` (round 21, house
 * lens): this paragraph named the unscoped selector, which round 5 scoped, and
 * gave the unscoping as the reason, so it described a state the file had left.
 * `test_run_form_advanced.py` asserts the scoped selector. Nor are these two
 * blocks the repo's only statements about this grid: `grep -rn "212px" app
 * tests` finds the rest. They are the two that DECLARE it; the others assert
 * or describe it, and a change here has to be reconciled against all of them.
 * NO COUNT IS WRITTEN HERE (round 22): round 21 put one in this paragraph and
 * was wrong by one in both numbers the moment the paragraph existed, because
 * the sentence sits in a file the command searches. The count is asserted in
 * `tests/flora/test_qpcr_param_counts_in_prose.py`.
 *
 * NO HOVER RULE ON A BUTTON, per test_no_false_affordances.py. `summary` is
 * admitted by that file on the argument that a <summary> always toggles its
 * <details>, with no script and no way to be inert. */
.opfilter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(212px, 100%), 1fr));
  gap: 14px 16px; align-items: start;
}
.opfield { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.opfield > label { font-size: var(--fs-12); color: var(--ink-2); }
/* `--edge` HERE TOO, and not for tidiness. The column picker is a field of this
 * form now, so these three are its immediate neighbours: a picker at 4.96:1
 * beside three inputs whose `--rule` border sat at 1.43:1 on the same `--card`
 * would read as the only control in the card. The same 3:1 floor applies to all
 * four, and it was failing for all four. (The pair is named so the contrast
 * guard can match the number to its row rather than to any row with that
 * value.) */
.opfilter input[type="text"],
.opfilter input[type="number"],
.opfilter select {
  font: inherit; font-size: var(--fs-13); padding: 7px 10px;
  width: 100%; min-width: 0; box-sizing: border-box;
  color: var(--ink); background: var(--card-2);
  border: 1px solid var(--edge); border-radius: var(--r-7);
}
.opfilter input:focus-visible, .opfilter select:focus-visible {
  outline: 2px solid var(--violet); outline-offset: -1px;
}

/* The long text, closed until asked for. `max-width` is in ch so the paragraph
   breaks at a readable measure inside a column that may be much wider, and
   `overflow-wrap` keeps a migration timestamp from pushing the column out. */
.opwhy > summary {
  cursor: pointer; font: 400 12px/1.4 var(--sans); color: var(--ink-3);
}
.opwhy > summary:hover { color: var(--violet); }
.opwhy > p {
  margin: 6px 0 0; padding: 9px 11px;
  background: var(--card-2); border: 1px solid var(--hair); border-radius: var(--r-8);
  font: 400 12.5px/1.6 var(--sans); color: var(--ink-2);
  max-width: 64ch; overflow-wrap: anywhere;
}

.opapply { grid-column: 1 / -1; }
.opfilter button[type="submit"] {
  font: inherit; font-size: var(--fs-125); padding: 6px 13px; cursor: pointer;
  color: var(--on-violet); background: var(--violet);
  border: 1px solid var(--violet); border-radius: var(--r-6);
}

/* ── A WIDE TABLE SCROLLS INSIDE ITS OWN BOX ─────────────────────────────────
 *
 * Added 2026-09-17, with the compound list's column picker. Eleven columns fit
 * a laptop and twenty-five do not, and until this rule the overflow pushed the
 * PAGE sideways: the heading, the notes and the navigation all slid out of
 * reach, and on a phone the table was unusable whatever it held.
 *
 * ON THE SECTION RATHER THAN ON A WRAPPER DIV, and that is the one thing about
 * this rule that is not the obvious shape. `.tablewrap` already exists, six
 * hundred lines above, and the tool pages put their tables inside one. The
 * operation tables are rendered by `app/flora/templates/operation_table.html`,
 * which is one shared template for every declared operation and is owned
 * elsewhere, so the wrapper cannot be added here. `:has()` selects the same box
 * without the markup: the section that holds a grid table becomes the scroll
 * container, and the table stays a real table with real column widths, which is
 * what `display: block` on the table itself would have cost.
 *
 * A browser without `:has()` renders what this surface rendered before the rule,
 * so the failure is the old behaviour rather than a broken page. */
main.wrap > section:has(> table.grid) { overflow-x: auto; }

/* THE SCROLLBAR IS DRAWN, since 2026-10-28. A Mac hides an overlay scrollbar
 * until the reader scrolls, so a table wider than its box read as a table cut
 * off at the card's edge, with nothing saying there was more to the right.
 * Styling the bar with the `::-webkit-scrollbar` pseudo-elements makes Chrome
 * and Safari draw a classic bar that stays visible. The same rules serve the
 * gene lookup page's own scroll boxes, `.omscroll` below, so a server-drawn
 * table and a script-drawn one show the same bar.
 *
 * THE THUMB IS `--edge`, the token for the boundary of something you can
 * click, because the bar is a control: `--rule-2` on `--hair` was a pale bar on
 * a paler track (2026-10-28, round C3).
 *
 * THE STANDARD PROPERTIES ONLY WHERE THE PSEUDO-ELEMENTS ARE NOT SUPPORTED.
 * From Chrome 121, an element with `scrollbar-width` or `scrollbar-color` set
 * ignores its `::-webkit-scrollbar` rules and goes back to the overlay bar,
 * so the two are never set on the same element in a browser that has both.
 * Firefox, which has only the standard pair, takes the `@supports` branch. */
main.wrap > section:has(> table.grid)::-webkit-scrollbar,
.omscroll::-webkit-scrollbar,
.ombar::-webkit-scrollbar { height: 12px; width: 12px; }
main.wrap > section:has(> table.grid)::-webkit-scrollbar-thumb,
.omscroll::-webkit-scrollbar-thumb,
.ombar::-webkit-scrollbar-thumb {
  background: var(--edge); border-radius: 6px; border: 2px solid var(--card-3);
}
main.wrap > section:has(> table.grid)::-webkit-scrollbar-track,
.omscroll::-webkit-scrollbar-track,
.ombar::-webkit-scrollbar-track { background: var(--card-3); border-radius: 6px; }
/* With the script, the gene lookup's table hides its own bar in favor of the
 * one that follows the reader (`.ombar`, below), so there are never two. */
.omscroll.mirrored::-webkit-scrollbar { display: none; }
@supports not selector(::-webkit-scrollbar) {
  main.wrap > section:has(> table.grid),
  .omscroll,
  .ombar { scrollbar-width: auto; scrollbar-color: var(--edge) var(--card-3); }
  .omscroll.mirrored { scrollbar-width: none; }
}

/* A COLUMN DECLARED `prose` is drawn on a full-width line under its row
 * (operation_table.html), so the sentence reads at a normal measure. The line
 * belongs to the row above it, so it draws no rule of its own. */
table.grid tbody tr.prose { border-top: 0; }
table.grid tr.prose td { padding-top: 0; }
table.grid tr.prose p {
  margin: 0 0 3px; max-width: 100ch;
  font-size: var(--fs-125); line-height: 1.5; color: var(--ink-2);
}
table.grid tr.prose .k { color: var(--ink-3); margin-right: var(--sp-5); }
/* On a screen narrower than the table, the line stays at the left of the
 * scroll box and as wide as the box, rather than running off with the
 * columns. 100vw less the page's padding and the cell's. */
table.grid tr.prose td > p {
  position: sticky; left: 10px; max-width: min(100ch, calc(100vw - 64px));
}

/* THE COLUMNS SAID ONCE, above a table whose page declares
 * `say_constant_once`, and above the gene lookup's script-drawn tables. */
.constline { margin: 4px 0 10px; font-size: var(--fs-125); color: var(--ink-2); }
.constline .k { color: var(--ink-3); }

/* ── the control bar under a table ───────────────────────────────────────────
 *
 * The way through a list and the choice of what the list shows, in one bar,
 * BELOW the table it controls.
 *
 * STICKY AT THE FOOT OF THE VIEWPORT, because a control below a hundred rows is
 * a control at the bottom of a long scroll. It settles into place at the end of
 * the page when the reader gets there. It is outside the scroll container above,
 * so a table scrolled sideways does not take the pager with it. */
/* BOTTOM IS THE DOCK'S HEIGHT, NOT ZERO, and that is the whole of the fix for
 * the collision. The chat dock is fixed in the shell at the bottom right of the
 * window and this bar is sticky at the bottom of the same window, so at
 * `bottom: 0` the two shared a corner and the dock, being the higher layer, took
 * the clicks. Raising the bar above the dock's own footprint means neither has
 * to win a stacking contest with the other.
 *
 * Unconditional rather than scoped to a page that draws the dock. The dock is in
 * the shell and is switched on by a deployment setting, so a rule that asked
 * whether it is there would be a rule that changes with a setting, and the gap
 * it leaves on a deployment with chat switched off reads as a floating toolbar
 * rather than as a fault. */
.tablebar {
  position: sticky; bottom: var(--askdock-h); z-index: 2;
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 10px 18px;
  margin: 10px 0 0; padding: 9px 12px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-8);
  box-shadow: var(--lift);
}

/* AND WHEN THE PANEL IS OPEN IT IS WIDER THAN THE LAUNCHER, so the bar keeps
 * its contents out of the panel's column as well. `:has()` is how the sheet
 * already makes a section into a scroll container; a browser without it renders
 * what this surface rendered before the rule, which is a pager whose right hand
 * end can sit under an open panel. Nothing is lost there, because the pager's
 * own contents are left aligned.
 *
 * ABOVE 720px ONLY, and the bound is not a taste. `--askdock-w` is a fixed
 * 416px and the panel it reserves for is `min(380px, 100vw - 36px)`, which
 * narrows with the window. On a 375px screen the bar is 331px wide, so 416px of
 * padding clamps its content box to nothing and pushes 60px of horizontal
 * scroll onto the body, which has no `overflow-x` rule anywhere in this sheet.
 * Below the breakpoint the open panel covers most of the width and there is
 * nowhere to move the bar to, so the reserve is dropped rather than scaled. */
@media (min-width: 720px) {
  body:has(.askpanel:not([hidden])) .tablebar { padding-right: var(--askdock-w); }
}

.pager { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
/* ALL THREE OF `.fine`'S FOOTNOTE PROPERTIES, for both sentences in this bar.
 * `.fine` sets `margin-top`, `padding-top` AND a `border-top`, which is right
 * for a footnote under a card and wrong for a state readout inside a control
 * bar. `.pager .fine` reset the margin alone, so the pager's own sentence has
 * been painting a hairline across the top of itself; `.colbar .fine` resets the
 * same three and its comment records the identical fault being found once
 * already. One rule for the bar covers the pager's sentence and the column
 * count beside the picker. */
.tablebar .fine { margin: 0; padding-top: 0; border-top: 0; }
.pager .fine { flex: 1 1 100%; }
/* THE SAME EDGE, BECAUSE IT WAS THE SAME DEFECT. These four links sit in the
 * same bar as the picker and carried the same `--rule` border: 1.38:1 against
 * the bar's paper. Fixing the control Patrick named and leaving the four beside
 * it at a fifth of the required contrast would be fixing the instance. */
.pager a {
  font-size: var(--fs-125); padding: 4px 10px; border-radius: var(--r-6);
  border: 1px solid var(--edge); color: var(--ink-2); text-decoration: none;
}
.pager a:hover { color: var(--ink); border-color: var(--ink-2); }
/* THE END OF THE LIST IS A WORD, NOT A DEAD LINK. Nothing that cannot be
 * clicked looks clickable, and what says so is the ABSENCE OF THE BOX: no
 * border, no fill, no pointer. It used to be said by ink alone, `--ink-3` at
 * 3.79:1 against the bar, which is below the 4.5:1 a body-size word needs and
 * asks a reader to tell a live control from a dead one by shade. The box carries
 * it now and the word is legible: same ink as the links beside it. */
.pager .off { font-size: var(--fs-125); padding: 4px 10px; color: var(--ink-2); }

/* THE PICKER IS IN THIS BAR, AND IT IS ALSO A FIELD OF THE FILTER FORM.
 *
 * It was in the bar, was moved above the table into a `.colbar` on 2026-09-17 to
 * get it out of the chat dock's corner, and Patrick has overruled the move:
 * "I want it on the floating box near 'Compounds 1 to 100 of 3,448' AND in the
 * box next to 'Compound Class', 'Skip this many rows' and 'Max compounds to
 * read' ... second because I completely missed it." So it is in both, and the
 * `.colbar` this page used is gone. The tool pages keep theirs.
 *
 * WHAT STOPS THE DOCK COLLISION COMING BACK, since the bar is the corner the
 * picker was moved out of. TWO things, neither of them the order of the markup.
 * The bar sticks at `--askdock-h` rather than at 0, so the launcher is below it
 * rather than over it. And the open panel's own width is reserved out of the
 * bar's padding, below. Both are rules here and both are order independent.
 *
 * The placement contributes the END of the bar and nothing more: the picker was
 * the thing at the right hand end, the dock is pinned to the bottom right, and
 * the picker is at the left hand end now. It is the bar's second child rather
 * than its first, since the sentence saying how many columns are showing comes
 * before the control that changes it. An earlier draft of this comment claimed
 * first child, which the markup never did.
 *
 * WHAT IS LEFT, said rather than papered over: under 720px an open chat panel
 * covers most of the width and there is nowhere to move the bar to, so it can
 * cover this control and the pager beside it. That is the state `.tablebar`'s
 * own comment already records for the pager, and closing the panel is the way
 * out of it. */
.colpick { font-size: var(--fs-125); }
/* CLOSED IT IS A CHIP BESIDE THE SENTENCE; OPEN IT TAKES THE BAR'S WHOLE WIDTH.
 * The list inside is `repeat(auto-fill, minmax(190px, 1fr))` over twenty
 * columns, and laying that out in whatever is left beside a sentence gives one
 * narrow column of tick boxes. `.tablebar` wraps, so the full-width basis puts
 * the open picker on its own line rather than squeezing the pager off the bar. */
.tablebar > .colpick[open] { flex: 1 0 100%; }
/* AND IN THE BAR IT IS BOUNDED, because the bar is `position: sticky` at the
 * foot of the viewport. A sticky box taller than the viewport has its top edge
 * pushed off the top of the screen with no way to scroll to it, so twenty tick
 * boxes in one column on a phone would put the first few of them out of reach:
 * the exact class of fault this branch exists to fix. The list scrolls inside
 * itself instead, and the bar never grows past about half the screen. */
.tablebar .collist { max-height: 40vh; overflow-y: auto; }
/* THREE CHANNELS CARRY THIS CONTROL AND NONE OF THEM IS HUE.
 *
 * It had one: a `--rule` border at 1.20:1 on the page ground, no fill and no
 * disclosure marker, because `list-style: none` and the -webkit rule below strip
 * the triangle a <summary> draws for itself. So the only thing saying "this is a
 * control you can open" was an outline at a fifth of the contrast a boundary
 * needs, and the reader it was drawn for could not see it. Patrick, 2026-09-18:
 * "a light purple box that I can barely see."
 *
 * The three now are SHAPE, a caret that turns when the control opens; EDGE, the
 * `--edge` token at 4.81:1 on the bar's own paper; and the WORD, which is
 * "Choose columns" and was always there. Delete any one and the other two still
 * say what this is. Colour states nothing that shape and text do not.
 *
 * THE CARET IS DRAWN, NOT TYPED. `content: ""` with two borders is a chevron a
 * screen reader has nothing to read out, where a "▸" in a pseudo-element gets
 * announced by name on some of them. It takes its colour from `currentColor`, so
 * it carries the summary's own ink against the summary's own fill, `--ink-2` on
 * `--card-2`, which is 7.71:1, and cannot drift from it. An earlier draft said
 * 8.22:1, which is `--ink-2` against `--paper`: the bar BEHIND the chip, not the
 * chip's own background. Every ratio quoted in this file is recomputed for its
 * named pair by tests/flora/test_control_contrast.py. */
.colpick > summary {
  /* HUGS ITS TEXT, which it does not do on its own once the rule above stretches
     the <details> to the width of the bar: a <summary> is a block box and would
     paint its border right across the page. */
  width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: var(--sp-7);
  cursor: pointer; padding: 4px 10px; border-radius: var(--r-6);
  border: 1px solid var(--edge); background: var(--card-2);
  color: var(--ink-2); list-style: none;
}
.colpick > summary::-webkit-details-marker { display: none; }
.colpick > summary::before {
  content: ""; flex: none; width: 6px; height: 6px;
  border-right: 1.5px solid; border-bottom: 1.5px solid;
  transform: rotate(-45deg); margin-top: -1px;
}
.colpick[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
.colpick[open] > summary { color: var(--ink); }
.colpick form { margin: 9px 0 0; }
.collist {
  list-style: none; margin: 0 0 9px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2px 14px;
}
.collist label { display: flex; align-items: baseline; gap: var(--sp-6); cursor: pointer; }
.collist .always { display: flex; align-items: baseline; gap: var(--sp-6); color: var(--ink-3); }
.collist .always .fine { margin: 0; }
.colpick button {
  font: inherit; font-size: var(--fs-12); padding: 4px 11px; cursor: pointer;
  color: var(--ink-2); background: var(--card-2);
  border: 1px solid var(--edge); border-radius: var(--r-6);
}
/* THE SAME WAY BACK, IN BOTH PLACES, AND ONE OF THEM CANNOT BE A BUTTON. A
 * second submit cannot override a tick-box group inside the form it belongs to:
 * `name="cols" value="<defaults>"` would be ADDED to whatever is ticked, not put
 * in its place, and a form inside a form is not markup a browser will parse. So
 * the copy that borrows the filter form is an anchor to the same query string
 * the other copy's second form submits. Styled as one thing, because it is one
 * thing, and `a.colback` rather than `.colback` so the hover rule can only reach
 * something that really does navigate. */
a.colback {
  font: inherit; font-size: var(--fs-12); padding: 4px 11px; border-radius: var(--r-6);
  display: inline-block; margin: 0 0 0 8px; text-decoration: none;
  color: var(--ink-2); background: var(--card-2);
  border: 1px solid var(--edge);
}
a.colback:hover { color: var(--ink); border-color: var(--ink-2); }
.colpick > .fine { margin: 8px 0 0; }

/* ── the picker as a field of the filter form ────────────────────────────────
 *
 * Patrick, 2026-09-18: "I want it ... in the box next to 'Compound Class',
 * 'Skip this many rows' and 'Max compounds to read', first because it makes more
 * sense". Choosing columns and filtering rows are the same kind of act, so the
 * control is a FIELD of that form rather than a form beside it: one Apply
 * submits the filter and the columns together, and neither can discard the
 * other on the way.
 *
 * `.colfield` is an `.opfield`, so the label sits where every other field's
 * label sits and the grid places it as the fourth of four. OPEN IT TAKES THE
 * WHOLE ROW, for the reason the bar's copy does: twenty tick boxes laid out in
 * a 212px grid column is one long thin list. A browser without `:has()` gets
 * exactly that list, which is the old behaviour rather than a broken page. */
.colfield > .colpick-label { font-size: var(--fs-12); color: var(--ink-2); }
/* The same three, for the same reason, on the count sentence inside the field. */
.colfield > .fine { margin: 0; padding-top: 0; border-top: 0; }
.opfilter .colfield:has(.colpick[open]) { grid-column: 1 / -1; }
/* The list follows the summary directly here, with no <form> between them to
 * carry `.colpick form`'s top margin. */
.colfield .collist { margin-top: 9px; }

/* A phone. The bar stacks, the picker stops being pushed to the right, and the
 * column list becomes one column so no label is cut off. */
@media (max-width: 640px) {
  .tablebar { flex-direction: column; }
  .collist { grid-template-columns: 1fr; }
}

/* ── status facet on the conflicts board ──────────────────────────────
   The chosen facet is marked by a filled glyph, bold type and an underline, so
   the state does not ride on colour. */
.facets { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 14px; font-size: 13px; }
.facets a { color: var(--ink-2); text-decoration: none; padding: 3px 2px; border-bottom: 2px solid transparent; }
.facets a:hover { border-bottom-color: var(--rule); }
.facets a.on { color: var(--ink); font-weight: 650; border-bottom-color: var(--ink); }
.facets .g { font-size: 10px; }
.facets .n { font: 11.5px var(--mono); color: var(--ink-3); margin-left: 3px; }
details.note summary { cursor: pointer; font-size: 11.5px; color: var(--ink-3); }
details.note p { margin: 4px 0 0; }

/* ── Provenance on hover (provenance.js): promoted knockdown numbers only ─────
   The marker is a glyph (the circled i) and the word "source", never a colour.
   With scripts off the <details> below the number carries the same lines; with
   them on, `prov-js` hides it and the popover is drawn instead. */
button.provbtn {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: help; font-variant-numeric: inherit;
  border-bottom: 1px dotted var(--ink-3);
}
button.provbtn .prov-mark { margin-left: var(--sp-5); color: var(--ink-2); font-size: .9em; }
button.provbtn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
details.prov-fallback { font-size: var(--fs-115); text-align: left; }
details.prov-fallback summary { cursor: pointer; color: var(--ink-2); }
details.prov-fallback ul { margin: 4px 0; padding-left: 16px; }
.prov-js details.prov-fallback { display: none; }
.prov-pop {
  position: fixed; z-index: 30; max-width: min(34rem, calc(100vw - 16px));
  background: var(--card); color: var(--ink); text-align: left;
  border: 1px solid var(--ink-2); border-radius: var(--r-11);
  padding: 10px 12px; font: 400 var(--fs-115)/1.4 var(--sans);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.prov-pop .prov-head { margin: 0 0 6px; font-weight: 600; }
.prov-pop dl.prov-lines { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.prov-pop dt { color: var(--ink-3); }
.prov-pop dd { margin: 0; overflow-wrap: anywhere; }
.prov-pop .prov-sib { margin: 8px 0 0; }
.prov-pop .prov-link { display: inline-block; margin-top: 8px; }

/* ── the quick switcher ───────────────────────────────────────────────
   Built entirely by switcher.js on the first "/" or Ctrl/Cmd-K, so nothing here
   matches anything on a page rendered with scripts off. The selected row is
   marked by the ▸ glyph, a background and a heavier weight, and by
   aria-selected; hue is never the only signal. */
.qs { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center;
  align-items: flex-start; padding: 12vh 16px 16px; background: rgba(35, 30, 45, .45); }
.qs[hidden] { display: none; }
.qs-box { width: min(560px, 100%); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule-2);
  border-radius: var(--r-9); box-shadow: var(--lift); overflow: hidden; }
.qs-input { font: inherit; font-size: 15px; color: var(--ink); background: var(--card);
  border: 0; border-bottom: 1px solid var(--rule-2); padding: 12px 14px; outline: none; }
.qs-input:focus-visible { box-shadow: inset 0 0 0 2px var(--edge); }
.qs-list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; }
.qs-group { padding: 8px 14px 3px; font-size: var(--fs-115); letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-2); }
.qs-empty { padding: 5px 14px 8px; font-size: var(--fs-125); color: var(--ink-2); }
.qs-item { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px;
  color: var(--ink); text-decoration: none; font-size: var(--fs-135); }
.qs-item.is-sel { background: var(--card-3); font-weight: 650; }
.qs-mark { width: 1ch; flex: none; }
.qs-main { flex: none; }
.qs-mono { font-family: var(--mono); }
.qs-sub { color: var(--ink-2); font-size: var(--fs-12); font-weight: 400; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-hint { margin: 0; padding: 6px 14px; font-size: var(--fs-115); color: var(--ink-2);
  border-top: 1px solid var(--hair); }
/* ── the well grid on the plate-map review (wellgrid.js) ──────────────
   Opaque role fills are Okabe-Ito, fixed hex set by the script (data colors,
   the same in both themes); every role also carries a letter, so no state rides
   on colour. The transparent empty cell takes its foreground from a token here
   (.wg-dashed), so the dark sheet reaches it. A review flag is an --alert outline
   AND a corner glyph, a crossed-out cell a diagonal slash. */
.wg { margin: 10px 0 14px; }
.wg-grid { display: grid; gap: 2px; width: max-content; max-width: 100%; overflow-x: auto; }
.wg-row { display: grid; gap: 2px; }
.wg-96 { --wg-cell: 34px; }
.wg-384 { --wg-cell: 22px; }
.wg-row { grid-template-columns: 22px repeat(var(--wg-cols), var(--wg-cell, 34px)); }
.wg-colhead, .wg-rowhead { font: var(--fs-11) var(--mono); color: var(--ink-3); text-align: center; align-self: center; }
.wg-cell {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: var(--wg-cell, 34px); border-radius: 4px; border: 1px solid rgba(0, 0, 0, .35);
  font: 650 12px var(--mono); cursor: default; box-sizing: border-box;
}
.wg-384 .wg-cell { font-size: 10px; border-radius: 3px; }
.wg-cell:focus { outline: 3px solid var(--ink); outline-offset: 1px; z-index: 1; }
.wg-dashed { border: 1px dashed var(--edge); color: var(--ink-2); }
.wg-absent { border: 1px dotted var(--rule-2); background: transparent; opacity: .6; }
.wg-hatch { background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 6px); }
.wg-review { border: 3px solid var(--alert); }
.wg-glyph { position: absolute; top: -1px; right: 1px; font-size: 9px; line-height: 1; }
.wg-struck::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(to top right, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
}
.wg-detail { min-height: 1.4em; margin: 8px 0 4px; font-size: var(--fs-125); color: var(--ink-2); }
.wg-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 4px 0 0; padding: 0; font-size: var(--fs-12); color: var(--ink-2); }
.wg-key { display: inline-flex; align-items: center; gap: 4px; }
.wg-swatch {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .35); font: 650 11px var(--mono);
}
.wg-flagsw { background: transparent; border: 1px solid var(--edge); color: var(--ink); }
@media (forced-colors: active) { .wg-cell { forced-color-adjust: none; } }

/* The footer link to Flora's issue channel, on every page (base.html). */
.reportfoot { padding-top: 18px; padding-bottom: 28px; font: 400 12.5px/1.4 var(--sans); }
.reportfoot a, .askfine a { color: var(--ink-3); text-decoration: underline; }
.reportfoot a:hover, .askfine a:hover { color: var(--violet); }

/* ── the proband gene lookup (gene_lookup.html, gene_lookup.js) ──────────────
 *
 * Added 2026-10-28, when Patrick said the page was "very hard to read".
 *
 * A LAYER'S STATE IS A WORD FIRST. The colour is decoration on the word, and
 * the palette is Okabe-Ito: a called layer takes the orange wash and edge,
 * a measured one the neutral chip, and a layer that did not measure the gene
 * is muted ink. No two states differ by blue against green. */
.omst {
  display: inline-block; font: 600 var(--fs-115)/1.3 var(--sans);
  padding: 2px 8px; border-radius: var(--r-11); background: var(--card-3);
  white-space: nowrap;
}
.omst-called { background: var(--warn-w); color: var(--ink); box-shadow: inset 0 0 0 1px var(--warn); }
.omst-measured_no_rule { background: var(--muted-w); }
.omst-not_measured { background: transparent; color: var(--ink-3); font-weight: 400; }
table.grid tbody tr:has(.omst-called) td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.grid tbody tr:has(.omst-not_measured) td,
table.grid tbody tr:has(.omst-not_measured) + tr.prose p { color: var(--ink-3); }

/* THE TWO LOWER ANSWERS are real cards, with the card heading and a count. */
.omics .head h2,
main.wrap > .omhead h2 { font-size: var(--fs-125); color: var(--ink-2); }
.omics .head .hint,
main.wrap > .omhead .hint { margin-left: 0; }

/* THE STATUS TABLE IS A CARD TOO, since 2026-10-28 (round C3), drawn across
 * the three boxes the shared operation_table.html gives it: the "Layers at"
 * heading (this page's `table_controls`), the view bar, and the table's own
 * section. The shared template has no element around all three and every
 * Flora operation page renders it, so the card is drawn here rather than by
 * adding a wrapper there: each box takes the card's ground and its share of
 * the border, and `clip-path` keeps each one's shadow off its neighbors.
 * `.omhead` is drawn only by gene_lookup.html, so no other page matches. */
main.wrap > .omhead,
main.wrap > .omhead + .viewbar,
main.wrap > .omhead + .viewbar + section {
  background: var(--card); border: 1px solid var(--rule); box-shadow: var(--lift);
  padding-left: 24px; padding-right: 24px; margin-bottom: 0;
}
main.wrap > .omhead {
  margin-top: 30px; padding-top: 20px; padding-bottom: 11px; border-bottom: 0;
  border-radius: 13px 13px 0 0; clip-path: inset(-30px -30px 0 -30px);
}
/* Each box starts 1px up under the one above, so a fractional height cannot
 * leave a hairline of the page ground between two parts of the card. */
main.wrap > .omhead + .viewbar {
  margin-top: -1px; padding-top: 1px; padding-bottom: 4px; border-top: 0; border-bottom: 0;
  clip-path: inset(0 -30px);
}
main.wrap > .omhead + .viewbar + section {
  margin-top: -1px; padding-top: 1px; padding-bottom: 18px; border-top: 0;
  border-radius: 0 0 13px 13px; clip-path: inset(0 -30px -30px -30px);
}
main.wrap > .omhead + .viewbar + section > .fine:first-child {
  margin-top: 0; padding-top: 0; border-top: 0;
}
.omics > .fine:first-of-type { margin-top: 0; }
.omgroup {
  margin: 18px 0 6px; font: 600 var(--fs-13)/1.3 var(--mono); color: var(--ink);
}
.omgroup .k { font-family: var(--sans); font-weight: 400; color: var(--ink-3); }

/* A TABLE WIDER THAN ITS CARD SCROLLS SIDEWAYS INSIDE ITS OWN BOX, never the
 * page, and ONLY sideways.
 *
 * NO HEIGHT CAP, since 2026-10-28 (round C3). The box was `max-height: 75vh`,
 * so a long group scrolled inside it, and the vertical bar is an overlay that
 * a Mac and headless Chrome do not draw: RBFOX1's "genomics:rarity, 192 calls"
 * showed 24 rows and then the next group, and read as a group of 24. Every
 * row of every group is now in the page's own flow, under its own heading
 * row. tests/flora/test_gene_lookup_reading_aids.py holds that no rule
 * reaching these tables sets a max-height.
 *
 * `overflow-y: hidden` clips nothing: with no height set the box is as tall as
 * its table plus the sideways bar. It is there because `overflow-x: auto`
 * alone computes `overflow-y` to `auto`, which would offer a second, empty
 * vertical scroll. The sticky heading row that went with the cap is gone:
 * in a box that never scrolls vertically it never stuck.
 *
 * Where the table is wider than the box, gene_lookup.js puts a line above it,
 * "Scroll sideways for N more columns" (`.omcue`). */
.omscroll { overflow-x: auto; overflow-y: hidden; }

/* THE BAR THAT FOLLOWS THE READER (gene_lookup.js). Sticky to the bottom of
 * the window while its table is in view, and at the table's foot once the
 * reader is past it. Its frame (`.omframe`) is what holds it to its own table.
 * The card is `overflow: clip` rather than `.statusline`'s `hidden`, because a
 * `hidden` box is a scroll container and a sticky bar inside one sticks to
 * that box, which never scrolls, instead of to the window. `clip` cuts the
 * same edge without being one; a browser without it keeps `hidden`, and the
 * bar then sits at the table's foot. */
.statusline.omics { overflow: hidden; overflow: clip; }
.ombar {
  position: sticky; bottom: 0; z-index: 1;
  overflow-x: auto; overflow-y: hidden; background: var(--card);
}
.ombar > div { height: 1px; }
.ombar[hidden] { display: none; }
.omcue { margin: 2px 0 4px; font-size: var(--fs-12); color: var(--ink-3); }
table.grid.dense th, table.grid.dense td { padding: 3px 8px; }
table.grid.dense td { white-space: nowrap; }
table.grid.dense td.wrap { white-space: normal; min-width: 24ch; }

/* THE ALPHAGENOME SECTION IS CLOSED until asked for. It is a <details>, not a
 * <section>, so it takes the gap `main.wrap > section + section` gives the rest. */
main.wrap > details.omics { margin-top: 30px; }
details.omics > summary {
  cursor: pointer; font-size: var(--fs-13); color: var(--ink-2); list-style-position: inside;
}
details.omics > summary b { color: var(--ink); font-weight: 600; }
details.omics > summary:hover { color: var(--violet); }
details.omics[open] > summary { margin-bottom: 10px; }
details.omics .omhide { display: none; }
details.omics[open] .omhide { display: inline; }
details.omics[open] .omshow { display: none; }
