/* Flows (public/flows.js): the list on Experiments and one flow's page: a quiet working area of blocks joined by thin lines, and the selected block's
   settings under it. Blocks are the lab's own cards (white, a soft ring), told apart by a small dot and their kind's name, never by a coloured frame. */
.fl-section { margin-top: 0; margin-bottom: 26px; }
.fl-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fl-section-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; }
.fl-section .panel { margin-bottom: 0; }
.fl-chip-ready { background: var(--warn-soft); color: var(--warn); }

.fl-page { display: grid; gap: 12px; min-width: 0; }
.fl-page > .head { margin-bottom: 0; align-items: flex-end; }
.fl-head-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 240px; }
.fl-name-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fl-page input.fl-name { flex: 0 1 auto; min-width: 8ch; max-width: 100%; field-sizing: content; font: inherit; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--ink);
  padding: 2px 8px; margin-left: -8px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
.fl-page input.fl-name:hover:not(:disabled) { background: var(--hover); }
.fl-page input.fl-name:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.fl-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.fl-saved:empty { display: none; }
.fl-why { margin: 0; color: var(--warn); }

/* The working area: it scrolls both ways when the blocks go past its edges; the stage is as large as the blocks need. */
.fl-area { overflow: auto; border-radius: var(--radius-lg); background: var(--field); box-shadow: inset 0 0 0 1px var(--line-soft); max-height: min(70vh, 640px); }
/* The stage is drawn at its own size and scaled to fit the area (public/flows.js fit); the sizer is the room it then takes. */
.fl-sizer { position: relative; min-width: 100%; min-height: 150px; }
.fl-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fl-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.fl-line { fill: none; stroke: rgba(17, 17, 17, 0.2); stroke-width: 1.5; stroke-linecap: round; transition: stroke 0.15s; }
.fl-line.len { stroke-dasharray: 7 5; }
.fl-line.on { stroke: var(--ink); }
.fl-line.live { stroke: var(--accent); stroke-dasharray: 3 6; animation: fl-flow 0.9s linear infinite; }
.fl-line.draft { stroke: var(--accent); stroke-dasharray: 3 5; }
@keyframes fl-flow { to { stroke-dashoffset: -9; } }

.fl-block { position: absolute; box-sizing: border-box; display: grid; align-content: center; gap: 1px; padding: 9px 16px 11px 14px; background: var(--surface); border-radius: 14px;
  box-shadow: var(--ring); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; transition: box-shadow 0.15s; }
.fl-block:hover { box-shadow: var(--lift); }
.fl-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fl-block.on { box-shadow: 0 0 0 1.5px var(--ink), var(--lift); }
.fl-block.dragging { cursor: grabbing; box-shadow: 0 0 0 1.5px var(--ink), var(--shadow); z-index: 3; transition: none; }
.fl-block-kind { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.fl-block-title { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-block-say { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-block.todo .fl-block-say { color: var(--warn); }
.fl-block.s-done .fl-block-say, .fl-block.s-sent .fl-block-say { color: var(--ink-2); }
.fl-block.s-running .fl-block-say { color: var(--accent-ink); }
.fl-block.s-ready .fl-block-say { color: var(--warn); font-weight: 500; }
.fl-block.s-error .fl-block-say, .fl-block.s-failed .fl-block-say { color: var(--danger); }
.fl-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.fl-dot.k-pieces { background: var(--ink); }
.fl-dot.k-trace { background: #8b7cf6; }
.fl-dot.k-write { background: var(--accent); }
.fl-dot.k-score { background: #12a37f; }
.fl-dot.k-review { background: #e08a3c; }
.fl-spin { width: 9px; height: 9px; margin-left: auto; border-radius: 50%; border: 1.5px solid var(--accent-soft); border-top-color: var(--accent); animation: fl-spin 0.8s linear infinite; }
@keyframes fl-spin { to { transform: rotate(360deg); } }
.fl-bar { position: absolute; left: 14px; right: 16px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.fl-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--ink); transition: width 0.4s; }
.fl-block.s-running .fl-bar > i { background: var(--accent); }
.fl-block.s-failed .fl-bar > i { background: var(--danger); }
/* The plus on a block's right edge: seen on the block the pointer is over and on the selected one. */
.fl-plus { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: var(--surface);
  box-shadow: var(--ring); color: var(--ink-2); font-size: 15px; line-height: 20px; text-align: center; cursor: pointer; opacity: 0; transition: opacity 0.12s, background 0.12s; touch-action: none; min-height: 0; }
.fl-block:hover .fl-plus, .fl-block.on .fl-plus, .fl-plus:focus-visible { opacity: 1; }
.fl-plus:hover { background: var(--ink); color: #fff; }

.fl-menu { position: absolute; z-index: 5; width: 252px; padding: 6px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.fl-menu-title { margin: 6px 10px 4px; font-size: 11.5px; color: var(--ink-3); }
.fl-menu-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 0; box-shadow: none; }
.fl-menu-item:hover, .fl-menu-item:focus-visible { background: var(--hover); }
.fl-menu-main { display: grid; gap: 1px; min-width: 0; }
.fl-menu-main b { font-size: 13px; font-weight: 600; }
.fl-menu-main span { font-size: 12px; color: var(--ink-3); }

/* The selected block's settings. */
.fl-editor { margin-bottom: 0; padding: 16px 20px 18px; }
.fl-editor-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fl-editor-head h2 { margin: 0; }
.fl-editor-about { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-did { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 13px; }
.fl-reads { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.fl-reads-k { font-size: 12px; color: var(--ink-3); margin-right: 2px; }
/* A block's name can be long ("Writing 2 · Kimi K3 · from Sam's script · refined against duplication"): the chip wraps in the room there is, so a review that reads two of them does not widen the page. */
.fl-read { max-width: 100%; white-space: normal; text-align: left; border-radius: 14px; }
.fl-x { margin: 0 -3px 0 2px; padding: 0 2px; border: 0; background: none; box-shadow: none; color: var(--ink-3); font-size: 14px; line-height: 1; cursor: pointer; min-height: 0; }
.fl-x:hover { color: var(--danger); }
.fl-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 300px)); gap: 12px 16px; margin-top: 12px; }
.fl-fields.wide { grid-template-columns: minmax(0, 1fr); }
.fl-fields select { width: 100%; }
.fl-locked { margin: 10px 0 0; }
.fl-pieces-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fl-pieces-top input { flex: 1 1 auto; max-width: 340px; min-width: 0; }
.fl-count { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.fl-pieces.cp-list { max-height: 300px; }
.fl-pieces .cp-row { cursor: pointer; }

@media (max-width: 640px) {
  .fl-page input.fl-name { font-size: 19px; }
  .fl-area { max-height: 52vh; }
  .fl-plus { opacity: 1; }
  .fl-editor { padding: 14px 14px 16px; }
  .fl-editor-about { display: none; }
  .fl-pieces-top { flex-wrap: wrap; }
  .fl-pieces-top input { max-width: none; flex-basis: 100%; }
  .fl-count { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .fl-line.live, .fl-spin { animation: none; } }

/* A block's own pieces among its parents', and a review's send-by-itself tick. */
.fl-own { margin-top: 12px; display: grid; gap: 8px; }
.fl-own-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fl-own-head .fl-reads-k { display: inline-flex; align-items: center; gap: 4px; }
.fl-own .seg { padding: 3px 11px; }
.fl-check { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 38px; font-size: 13.5px; cursor: pointer; }
.fl-check input { flex: none; }
.fl-fields input[type="number"] { width: 100%; }

/* Making a flow: a tile drawn as a small flow that ends in a plus. Quiet until the pointer is over it, when its lines and its plus take the ink. */
.fl-new { display: flex; align-items: center; gap: 18px; width: 100%; margin: 0 0 12px; padding: 14px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-lg); background: transparent;
  box-shadow: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 0; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.fl-new:hover, .fl-new:focus-visible { border-style: solid; border-color: var(--ink); background: var(--surface); box-shadow: var(--lift); outline: none; }
.fl-new-glyph { flex: none; overflow: visible; }
.fl-new-line { fill: none; stroke: rgba(17, 17, 17, 0.22); stroke-width: 1.4; stroke-linecap: round; transition: stroke 0.15s; }
.fl-new-block { fill: var(--surface); stroke: rgba(17, 17, 17, 0.16); stroke-width: 1; }
.fl-new-dot.k-pieces { fill: var(--ink); } .fl-new-dot.k-trace { fill: #8b7cf6; } .fl-new-dot.k-write { fill: var(--accent); }
.fl-new-plus { fill: var(--surface); stroke: rgba(17, 17, 17, 0.3); stroke-width: 1.4; stroke-dasharray: 3 3; transition: fill 0.15s, stroke 0.15s; }
.fl-new-cross { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; transition: stroke 0.15s; }
.fl-new:hover .fl-new-line, .fl-new:focus-visible .fl-new-line { stroke: var(--ink); }
.fl-new:hover .fl-new-plus, .fl-new:focus-visible .fl-new-plus { fill: var(--ink); stroke: var(--ink); stroke-dasharray: none; }
.fl-new:hover .fl-new-cross, .fl-new:focus-visible .fl-new-cross { stroke: #fff; }
.fl-new-words { display: grid; gap: 2px; min-width: 0; }
.fl-new-words b { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.fl-new-words span { font-size: 13px; color: var(--ink-3); }
.fl-new[disabled] { opacity: 0.6; cursor: progress; }
/* A flow's blocks in the list: a dot each, in its kind's colour; filled when finished, ringed while waiting, pulsing while it runs. */
.fl-strip { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin-right: 10px; }
.fl-strip-dot { width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid currentColor; color: var(--ink-3); background: transparent; }
.fl-strip-dot.k-pieces { color: var(--ink); } .fl-strip-dot.k-trace { color: #8b7cf6; } .fl-strip-dot.k-write { color: var(--accent); } .fl-strip-dot.k-rubrics { color: #d0559a; } .fl-strip-dot.k-review { color: #e08a3c; }
.fl-strip-dot.s-done, .fl-strip-dot.s-sent { background: currentColor; }
.fl-strip-dot.s-running { background: currentColor; animation: fl-pulse 1.1s ease-in-out infinite; }
.fl-strip-dot.s-error, .fl-strip-dot.s-failed { color: var(--danger); background: currentColor; }
.fl-strip-dot.s-ready { color: var(--warn); }
.fl-list a.fl-open { color: inherit; text-decoration: none; }
.fl-list a.fl-open:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.fl-strip-words { color: var(--ink-2); white-space: nowrap; }
@keyframes fl-pulse { 50% { opacity: 0.35; } }
@media (max-width: 640px) { .fl-new { gap: 14px; padding: 12px 14px; } .fl-new-words span { display: none; } }
@media (prefers-reduced-motion: reduce) { .fl-strip-dot.s-running { animation: none; } }

/* The settings as the step's own page shows them (Jay, 2026-11-17: as far as possible copy the UI, workflow and logic of what is already built): numbered steps, as on Send for review. */
.fl-editor.send-form > .step { margin-top: 18px; }
.fl-editor.send-form > .step + .step { margin-top: 22px; padding-top: 18px; }
.fl-editor .rw-opts { max-width: 760px; }
.fl-editor .tr-way-groups { max-width: 760px; }
.fl-dot.k-rubrics { background: #d0559a; }
.fl-strip-dot.k-rubrics { color: #d0559a; }
.fl-strip-dot.k-rubrics.s-done { background: currentColor; }
.fl-from { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; color: var(--ink-2); }
.fl-version { margin: 8px 0 0; }
.fl-every { display: inline-grid; gap: 4px; min-width: 240px; }
.fl-length { display: flex; align-items: center; gap: 8px; }
.fl-length input { width: 220px; }
.fl-length-sets { margin: 10px 0 0; }
/* Each prompt and its rubric: the approved version a link to its page, a missing one said in the warning ink. */
.fl-rubrics { margin-top: 10px; display: grid; gap: 6px; max-width: 760px; }
.fl-rubrics-sum { margin: 0; color: var(--ink-2); }
.fl-rubric-list { list-style: none; margin: 0; padding: 4px 0; border-radius: 12px; background: var(--field); max-height: 260px; overflow: auto; }
.fl-rubric-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 6px 14px; font-size: 13px; }
.fl-rubric-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-rubric-state { white-space: nowrap; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.fl-rubric-list li.none .fl-rubric-state { color: var(--warn); }
a.fl-rubric-state:hover { color: var(--ink); text-decoration: underline; }
/* A review's comparisons: A and B, each a block it reads, and how many pieces both have. */
.fl-pairs { display: grid; gap: 8px; max-width: 860px; }
.fl-pair { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fl-pair-end { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.fl-pair select { width: 100%; min-width: 0; }
.fl-pair-n { white-space: nowrap; }
.fl-pairs > .ghost { justify-self: start; }
/* Send for review for each comparison, opened in place. */
.fl-group { border-radius: 12px; background: var(--field); padding: 10px 14px; }
.fl-group + .fl-group { margin-top: 8px; }
.fl-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.fl-group-title { font-weight: 600; font-size: 13.5px; }
.fl-group-head > :last-child { margin-left: auto; }
.fl-group.open { background: transparent; padding: 10px 0 0; }
.fl-send-slot { margin-top: 12px; }
.fl-send-slot .send-form { box-shadow: none; padding: 0; background: transparent; }
.fl-send-head { display: flex; justify-content: flex-end; margin-bottom: 8px; }
@media (max-width: 640px) {
  .fl-pair { grid-template-columns: auto minmax(0, 1fr); }
  .fl-pair-end { grid-column: 2; justify-self: start; }
}
.fl-every select, .fl-judge select { max-width: 420px; }
.fl-judge { display: grid; gap: 4px; }

/* The blocks a line of the settings is about (a comparison's A and B, a block a chip names): lit in the working area, lettered when they are A and B. */
.fl-block.fl-hl { box-shadow: 0 0 0 2px var(--accent), var(--lift); z-index: 2; }
.fl-block[data-mark]::before { content: attr(data-mark); position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.fl-pair, .fl-read, .fl-group-head { border-radius: 10px; }
.fl-pair:hover { background: var(--hover); box-shadow: 0 0 0 6px var(--hover); }

/* A comparison and the pieces it compares, under it. */
.fl-pair-box { border-radius: 10px; }
.fl-pair-box:hover { background: var(--hover); box-shadow: 0 0 0 6px var(--hover); }
.fl-pair:hover { background: none; box-shadow: none; }
.fl-pair-pieces { display: grid; gap: 2px; margin: 6px 0 4px 34px; }
.fl-pair-piece { display: grid; grid-template-columns: auto minmax(0, 260px) minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 3px 0; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.fl-pair-piece input { margin: 0; }
.fl-pair-prompt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
.fl-pair-who { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-early { margin-top: 14px; }
@media (max-width: 640px) { .fl-pair-piece { grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; padding: 6px 0; } .fl-pair-piece input { grid-row: 1 / span 2; } .fl-pair-piece .fl-pair-prompt, .fl-pair-piece .fl-pair-who { grid-column: 2; } .fl-pair-pieces { margin-left: 4px; } }
.fl-early .fl-send-head { display: none; }

/* On a phone the flow's settings are compact (Jay, 2026-11-17: it need not be so wide or so big, make it more compact): the page's own controls, not the 44px ones of the long forms. */
@media (max-width: 640px) {
  .fl-page .fl-editor :is(.btn, .ghost, .linkish, .seg, .step-link, .open-link) { min-height: 32px; }
  .fl-page .fl-editor .seg { padding: 4px 10px; font-size: 13px; }
  .fl-page .fl-editor :is(.btn, .ghost) { padding: 5px 11px; font-size: 13px; }
  .fl-page .fl-editor :is(select, input:not([type=checkbox]):not([type=radio])) { min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
  .fl-page .fl-editor.send-form > .step { margin-top: 14px; }
  .fl-page .fl-editor.send-form > .step + .step { margin-top: 14px; padding-top: 12px; }
  .fl-page .fl-editor .step-head { margin-bottom: 8px; gap: 8px; }
  .fl-page .fl-editor .rw-opt { padding: 7px 12px; gap: 10px; }
  .fl-page .fl-pair { gap: 6px; }
  .fl-page .fl-pair-box:hover { box-shadow: none; background: none; }
  .fl-page .fl-pairs { gap: 10px; }
  .fl-page .fl-actions :is(.btn, .ghost) { min-height: 32px; padding: 5px 12px; font-size: 13px; }
  .fl-page .fl-editor-head .ghost { margin-left: auto; }
  .fl-page .fl-reads .chip { font-size: 12px; padding: 2px 8px; }
  .fl-page .fl-group { padding: 8px 12px; }
}

/* The settings' head: the block's kind and number, then its own title. */
.fl-editor-head .hint { margin-right: auto; }
.fl-editor-title { min-width: 0; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-editor-head > .ghost { margin-left: auto; flex: none; }
/* No indent of its own: wrapped onto a line of its own (a phone) it starts at the same edge as everything else (alignment audit, 2026-11-18). */
.fl-reads-own { margin-left: 0; }
.fl-reads { column-gap: 10px; }
.fl-reads-own .seg { padding: 3px 11px; }
.fl-own { margin-top: 10px; }
.fl-editor-head h2 { flex: none; white-space: nowrap; }
.fl-editor-title { flex: 0 1 auto; }

/* One finger moves the working area (or a block it is on); two pinch it larger or smaller (public/flows.js zoomAt), not the page. */
.fl-area { touch-action: pan-x pan-y; overscroll-behavior: contain; }

/* A comparison of an AI text with a writer's piece: each line its prompt, A (the AI text) and B (the writer's piece, chosen in place). */
.fl-pair-pieces.ab .fl-pair-piece { grid-template-columns: minmax(0, 240px) minmax(0, 1fr) minmax(0, 1.2fr); cursor: default; gap: 4px 14px; }
.fl-pair-tick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; cursor: pointer; }
.fl-pair-side { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; }
.fl-pair-side .cmp-letter { transform: scale(0.85); }
.fl-pair-b { width: 100%; min-width: 0; padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }
.fl-pair-piece.off .fl-pair-side { opacity: 0.45; }
@media (max-width: 640px) {
  .fl-pair-pieces.ab .fl-pair-piece { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 0; }
  .fl-pair-pieces.ab .fl-pair-side { margin-left: 28px; }
  .fl-page .fl-editor .fl-pair-b { font-size: 16px; }
}
.fl-pair-none { color: var(--warn); }
.fl-send-err { margin: 8px 0 0; }
.fl-step-send > .segs { margin-bottom: 4px; }
.fl-grids { display: grid; gap: 8px; }
.fl-grids .fl-group + .fl-group { margin-top: 0; }
.fl-grids .fl-send-head { display: none; }

/* The settings' head stays in view while they scroll: which block they are of, how far it has got, and its one action (Send, Run again). */
.fl-top-mark { height: 1px; margin: -16px 0 15px; }
.fl-editor-top { position: sticky; top: 0; z-index: 6; margin: -16px -20px 0; padding: 14px 20px 10px; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; transition: box-shadow .15s; }
.fl-editor-top.stuck { border-radius: 0; box-shadow: 0 10px 16px -14px rgba(17, 17, 17, .45); }
.fl-editor-top .fl-did { margin-top: 6px; }
.fl-editor-top .fl-send-all { margin: 0 0 0 auto; }
@media (max-width: 640px) {
  .fl-top-mark { margin: -14px 0 13px; }
  .fl-editor-top { margin: -14px -14px 0; padding: 10px 14px 8px; }
}
/* Writers and staff of a comparison: a line each, under its name, what went on the left and what can be done on the right. */
.fl-group-kinds { display: grid; gap: 4px; flex: 1 1 100%; }
.fl-group-kind { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.fl-group-kind > .muted { min-width: 0; }
/* Writing: the trace each piece reads; one made before this flow is marked, the flow's own is plain. */
.fl-traces { display: grid; gap: 6px; }
.fl-trace-sum { margin: 0 0 2px; color: var(--ink-2); }
.fl-trace-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: center; gap: 4px 14px; padding: 6px 12px; border-radius: 10px; background: var(--field); }
.fl-trace-row.earlier { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.fl-trace-piece { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fl-trace-read { font-size: 13px; color: var(--ink-2); }
.fl-trace-row.earlier .fl-trace-read { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .fl-trace-row { grid-template-columns: 1fr; } }
.fl-group-acts { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; }
.fl-drop { color: var(--ink-2); }
.fl-drop-all { margin: 8px 0 10px; }
/* How a review is going: a line of totals, a line a reviewer, and what did not go. */
.fl-rs { margin: 12px 0 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.fl-rs-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; }
.fl-rs-top .fl-rs-sum { margin: 0; }
.fl-rs-refresh { white-space: nowrap; }
.fl-rs-sum { margin: 0 0 6px; font-weight: 600; }
/* The counts are the lab's last saved ones (EQ Artists could not be asked just now): said quietly, beside them. */
.fl-rs-stale { font-weight: 400; font-size: 12px; }
.fl-rs-people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.fl-rs-people li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
/* The comparisons a reviewer has submitted, under their count: each a link to its two stories, its prompt before it. */
.fl-rs-people .fl-rs-reviews { flex: 1 1 100%; min-width: 0; max-width: 100%; list-style: none; margin: 2px 0 0; padding: 0 0 0 14px; border: 0; }
/* A grid, not a row: the prompt's title is the room that gives (minmax(0, 1fr) takes nothing of the page's width), the link keeps its own. */
.fl-rs-reviews li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; min-width: 0; padding: 3px 0; border: 0; font-size: 12.5px; }
.fl-rs-of { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-rs-reviews a { flex: none; white-space: nowrap; }
@media (max-width: 560px) { .fl-rs-reviews li { grid-template-columns: minmax(0, 1fr); } }
.fl-rs-n { color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fl-rs-k { margin: 12px 0 4px; font-size: 12px; color: var(--ink-2); }
.fl-rs-n.fl-rs-why { white-space: normal; text-align: right; max-width: 45%; }
/* On a phone a batch's long name and its count do not share a line (the name was four lines of two words): the count goes under it. */
@media (max-width: 560px) { .fl-rs-batches li { flex-direction: column; gap: 1px; } .fl-rs-batches .fl-rs-n { white-space: normal; } }
.fl-rs-batches a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; min-width: 0; }
.fl-send-ask { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.fl-flag-ask { margin-left: auto; }
.fl-rs-stuck { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; }
.fl-rs-stuck .fl-bt-all { display: inline; margin: 0 0 0 auto; }
/* A text read in place: a quiet underline, the window opens over the page. */
.fl-read-text { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.fl-read-text:hover { text-decoration-color: currentColor; }
.fl-pair-side .fl-read-text[title^="Read this AI"], .fl-pair-side > .fl-read-text { margin-left: 6px; }
/* What a block made, in the block: a row a piece (the piece, how much is the writer's own, how long), and under an opened row what it made. */
.fl-made { display: grid; gap: 6px; }
/* What the block made, counted by name, and the way to download its exact traces (Greg, 2026-11-19): one quiet line over the rows, on their edges. */
.fl-made-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; padding: 0 12px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fl-made-down { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.fl-made-item { border-radius: 12px; background: var(--field); }
.fl-made-item.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft), 0 6px 20px rgba(17, 17, 17, 0.06); }
.fl-made-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 16px; min-height: 40px; padding: 4px 12px; border-radius: 12px; font-size: 13px; cursor: pointer; }
.fl-made.wrote .fl-made-row { grid-template-columns: minmax(0, 1fr) 150px auto; }
.fl-made-item.failed .fl-made-row { cursor: default; }
.fl-made-item.failed .fl-made-row:hover { background: none; }
.fl-made-item.failed .fl-made-words { color: var(--danger); grid-column: 2 / -1; white-space: normal; }
.fl-made-row:hover { background: var(--hover); }
.fl-made-item.on > .fl-made-row { background: none; font-weight: 600; }
.fl-made-row:focus-visible { outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.fl-made-piece { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.fl-made-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-made-who { flex: none; color: var(--ink-3); font-weight: 400; }
.fl-made-share, .fl-made-words { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 400; text-align: right; }
.fl-made-open { display: grid; gap: 0 28px; padding: 4px 12px 14px; }
.fl-made-open.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fl-made-open:not(.two) > .fl-made-col { max-width: 760px; }
.fl-made-sides { display: none; grid-column: 1 / -1; padding-bottom: 8px; }
.fl-made-col { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; min-width: 0; }
.fl-made-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.fl-made-text { max-height: min(62vh, 560px); overflow: auto; overscroll-behavior: contain; padding-right: 10px; font-size: 14.5px; line-height: 1.62; color: var(--ink); }
.fl-made-text:focus-visible { outline: none; }
.fl-made-text p { margin: 0 0 0.85em; white-space: pre-line; }
.fl-made-text > :last-child { margin-bottom: 0; }
.fl-made-draft { margin: 0.2em 0 1em; padding: 10px 14px; border-radius: 10px; background: var(--field); color: var(--ink-2); white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
@media (max-width: 760px) {
  .fl-made-row, .fl-made.wrote .fl-made-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .fl-made.wrote .fl-made-share { display: none; }
  .fl-made-item.failed .fl-made-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 8px; }
  .fl-made-item.failed .fl-made-words { grid-column: 1; text-align: left; }
  .fl-made-piece { display: grid; gap: 0; padding: 4px 0; }
  .fl-made-open.two { grid-template-columns: minmax(0, 1fr); }
  .fl-made-sides { display: block; }
  .fl-made-open.two.show-text > .fl-made-col:nth-of-type(2), .fl-made-open.two.show-trace > .fl-made-col:nth-of-type(3) { display: none; }
}

/* A block's settings like Generate pieces' (2026-11-18): small fields in a row, the long texts under them. */
.fl-sets { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px }
.fl-set { display: flex; flex-direction: column; gap: 4px; min-width: 120px }
.fl-set > span { font-size: 12px; color: var(--muted, #6b6b6b) }
.fl-set input, .fl-set select { width: 140px; max-width: 160px }
.fl-area-text { width: 100%; min-height: 64px; font: inherit; font-size: 13px }
.fl-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px }

/* A comparison's lines, each in one row: the prompt, A, then B with its choice and its Read beside it (Jay, 2026-11-18, on an iPad: the B's letter, its choice
   and a stray "›" stood on two rows, out of line with A). */
.fl-pair-pieces.ab .fl-pair-piece { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.3fr); gap: 6px 18px; padding: 6px 0; font-size: 13px; }
.fl-pair-side.b { grid-template-columns: auto minmax(0, 1fr) auto; }
.fl-pair-side.b > .fl-read-text { margin-left: 2px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) { .fl-pair-pieces.ab .fl-pair-piece { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; } }

/* Sources as rows; two choices side by side at one width, one under the other on a phone (2026-11-18). */
.fl-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-width: 720px; }
.fl-check-cell { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 12px; background: var(--field); font-size: 14px; font-weight: 600; cursor: pointer; }
.fl-check-cell.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.fl-check-cell.off { opacity: 0.6; cursor: default; }
.fl-check-cell input { margin: 0; flex: none; }
.fl-sets-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px 18px; }
.fl-sets-2 .fl-set select { width: 100%; max-width: none; }
@media (max-width: 640px) { .fl-sets-2 { grid-template-columns: minmax(0, 1fr); } .fl-sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .fl-sets .fl-set input, .fl-sets .fl-set select { width: 100%; max-width: none; } }

/* A comparison is one grid (Jay, 2026-11-18: many places are not aligned): a column of marks (the letters, a line's tick), what is A, a column of marks, what is B, and
   the end. The row that chooses A and B and every line under it stand on the same columns, so a line's tick is under A's letter, its text under A's choice,
   its B under B's. On a phone: the marks, then everything else, one under the other on the same two columns. */
.fl-pair-box { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px minmax(0, 1.1fr) auto; column-gap: 8px; row-gap: 4px; align-items: center; }
.fl-pair-box > .fl-pair, .fl-pair-box > .fl-pair-pieces.ab, .fl-pair-pieces.ab > .fl-pair-piece { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; column-gap: 8px; }
.fl-pair-box > .fl-pair { align-items: center; row-gap: 6px; }
.fl-pair-box > .fl-pair > .cmp-letter { justify-self: center; }
.fl-pair-box > .fl-pair-pieces.ab { margin: 2px 0 4px; row-gap: 0; }
.fl-pair-pieces.ab > .fl-pair-piece { align-items: center; row-gap: 1px; padding: 6px 0; font-size: 13px; }
.fl-pair-pieces.ab .fl-pair-tick { display: grid; grid-column: 1 / 3; grid-row: 1; grid-template-columns: subgrid; column-gap: 8px; align-items: center; }
.fl-pair-pieces.ab .fl-pair-tick input { justify-self: center; grid-row: auto; margin: 0; }
.fl-pair-pieces.ab .fl-pair-prompt { font-size: 11.5px; }
.fl-pair-pieces.ab .fl-pair-side:not(.b) { display: block; grid-column: 2; grid-row: 2; margin: 0; }
.fl-pair-pieces.ab .fl-pair-side:not(.b) > .cmp-letter { display: none; }
.fl-pair-pieces.ab .fl-pair-side:not(.b) > .fl-pair-who { display: block; }
.fl-pair-pieces.ab .fl-pair-side.b { display: grid; grid-column: 3 / -1; grid-row: 1 / span 2; grid-template-columns: subgrid; column-gap: 8px; align-items: center; margin: 0; }
.fl-pair-pieces.ab .fl-pair-side.b > .cmp-letter { justify-self: center; }
.fl-pair-pieces.ab .fl-pair-side.b > .fl-pair-who { grid-column: 2 / -1; }
.fl-pair-side.b > .fl-read-text { margin-left: 0; }
@media (max-width: 640px) {
  .fl-pair-box { grid-template-columns: 24px minmax(0, 1fr); row-gap: 6px; }
  .fl-pair-box > .fl-pair > .fl-pair-end { grid-column: 2; }
  .fl-pair-pieces.ab > .fl-pair-piece { row-gap: 6px; padding: 10px 0; }
  .fl-pair-pieces.ab .fl-pair-tick { grid-column: 1 / -1; grid-row: auto; }
  .fl-pair-pieces.ab .fl-pair-prompt { font-size: 12.5px; }
  .fl-pair-pieces.ab .fl-pair-side:not(.b) { display: grid; grid-column: 1 / -1; grid-row: auto; grid-template-columns: subgrid; column-gap: 8px; align-items: center; }
  .fl-pair-pieces.ab .fl-pair-side:not(.b) > .cmp-letter { display: inline-grid; justify-self: center; }
  .fl-pair-pieces.ab .fl-pair-side.b { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 24px minmax(0, 1fr) auto; }
}

/* The list of pieces on three columns (alignment audit, 2026-11-18): a prompt's tick; its chevron, and under it each piece's tick; then everything read — the
   prompt, what is chosen, each piece, its rubrics — from one left edge. Each mark is level with the first line of what it marks. */
.fl-pieces .cp-gen-head { grid-template-columns: 20px minmax(0, 1fr); }
.fl-pieces .cp-gen-head .cp-all { justify-self: center; width: 18px; height: 18px; margin: 10.5px 0 0; }
.fl-pieces .cp-prompt > .pg-chevron { align-self: flex-start; margin-top: 2.5px; }
.fl-pieces .cp-row { grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding-left: 16px; }
.fl-pieces .cp-row input { justify-self: center; width: 18px; height: 18px; margin: 0; }
.fl-pieces .cp-rub-k { margin-left: 42px; }
.fl-pieces .cp-rub { padding-left: 42px; }

/* Several blocks chosen with a frame (2026-11-18): the frame a hairline of the accent over a faint wash, a chosen block a plain ring; no glow. */
.fl-frame { position: absolute; z-index: 5; border: 1px solid var(--accent); background: rgba(37, 99, 235, 0.07); border-radius: 4px; pointer-events: none; }
.fl-block.picked { box-shadow: 0 0 0 2px var(--accent); }
.fl-area.fits { touch-action: none; }
.fl-hold { height: 0; pointer-events: none; }
.fl-area-wrap { position: relative; min-width: 0; max-width: 100%; }
/* A frame drawn across the area ends where it ends: over the bar, its words are not selected. */
.fl-picked, .fl-area { -webkit-user-select: none; user-select: none; }
.fl-picked { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin: 0;
  max-width: calc(100% - 24px); padding: 8px 10px 8px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--lift); color: var(--ink); }

/* The Pieces picker's filter (public/flow_pieces.js): Samples' own controls, already set, with what they hide and why beside them; the rest of a long list comes with its button. */
.fl-filter { padding: 0 0 10px; }
.fl-more { display: block; margin: 8px auto 4px; }
/* A comparison's lines and what a block made come a page at a time: the button for the rest on a line of its own. */
.fl-pair-pieces > .fl-more, .fl-made > .fl-more { grid-column: 1 / -1; justify-self: start; margin: 8px 0 4px; max-width: 100%; text-align: left; }
/* A piece outside the filter says why after its words; on a narrow screen under its name, where it is not cut off. */
.fl-pieces .gl-out { white-space: nowrap; }
.fl-pieces .gl-out::before { content: " \00b7  "; white-space: pre; }
@media (max-width: 640px) { .fl-pieces .gl-out { display: block; white-space: normal; } .fl-pieces .gl-out::before { content: none; } }
