/* Reviewer Selection Portal — editorial console.
   System font stacks only: this ships to an on-prem network where a webfont request
   would either hang or fail. */

:root {
  --paper: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1c1a17;
  --ink-2: #57514a;
  /* 6.5.0 (the 11-10 audit, A1): was #8b847a — 3.28–3.70 : 1 on white, paper and surface-2; now 4.87–5.50 (WCAG AA 4.5). */
  --ink-3: #6f685f;
  --rule: #e4dfd6;
  --rule-2: #d3ccc0;
  /* Primary action. Taken from the Integra logo's own blue. It was a burgundy, which sat 7
     degrees of hue from --bad: the primary action and the error state were effectively the
     same colour, and a red "go" button reads as "stop". Blue frees red for errors alone. */
  --accent: #3f52a2;
  --on-accent: #ffffff;
  --accent-soft: #eceffb;
  --ok: #2c6a4a;
  --ok-soft: #e7f1ea;
  --warn: #8a5600;
  --warn-soft: #fbf0dc;
  --bad: #9e2f2f;
  --bad-soft: #f8e8e7;
  --shadow: 0 1px 2px rgba(28, 26, 23, .06), 0 4px 12px rgba(28, 26, 23, .04);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --radius: 6px;
  --rail: 264px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16151300;
    --paper: #151412;
    --surface: #1d1b19;
    --surface-2: #232120;
    --ink: #eeeae4;
    --ink-2: #b3aca3;
    --ink-3: #938c82; /* 6.5.0: was #857e75 (4.00–4.59 : 1); now 4.82–5.54 */
    --rule: #302d2a;
    --rule-2: #413d38;
    --accent: #9fadf0;
    --on-accent: #131832;
    --accent-soft: #1e2440;
    --ok: #7bbd96;
    --ok-soft: #1c2a22;
    --warn: #dcac5e;
    --warn-soft: #2c2418;
    --bad: #e08a86;
    --bad-soft: #2e1e1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .2);
  }
}

:root[data-theme="dark"] {
  --paper: #151412;
  --surface: #1d1b19;
  --surface-2: #232120;
  --ink: #eeeae4;
  --ink-2: #b3aca3;
  --ink-3: #938c82; /* 6.5.0: was #857e75 (4.00–4.59 : 1); now 4.82–5.54 */
  --rule: #302d2a;
  --rule-2: #413d38;
  --accent: #9fadf0;
  --on-accent: #131832;
  --accent-soft: #1e2440;
  --ok: #7bbd96;
  --ok-soft: #1c2a22;
  --warn: #dcac5e;
  --warn-soft: #2c2418;
  --bad: #e08a86;
  --bad-soft: #2e1e1d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }

/* Any rule that sets `display` outranks the UA stylesheet's `[hidden] { display: none }`,
   so an element with a display of its own stays on screen while claiming to be hidden.
   This bit the publisher marks: both were rendered at once regardless of the selection. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icons inherit colour and sit on the text baseline wherever they are dropped. */
.ico { display: inline-flex; align-items: center; flex: none; }
.ico svg { display: block; }
.card > h3 .ico { color: var(--ink-3); }
.tab .ico { opacity: .65; }
.tab[aria-selected="true"] .ico { opacity: 1; color: var(--accent); }
.btn .ico { opacity: .8; }
.btn.primary .ico { opacity: 1; }
.banner > .ico { margin-top: 1px; align-self: flex-start; }
.banner.bad > .ico { color: var(--bad); }
.banner.warn > .ico { color: var(--warn); }
.banner.ok > .ico { color: var(--ok); }
.banner.info > .ico { color: var(--accent); }

/* ---------------------------------------------------------------- shell -- */

.shell { display: flex; flex-direction: column; min-height: 100%; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; }
.topbar h1 small { display: block; font: 400 11px/1.3 var(--sans); color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }

/* Brand mark.
   Drop a replacement at public/img/logo.png and it picks it up — the slot sizes by height and
   keeps the asset's own aspect ratio, so any reasonable logo fits.

   The wordmark is black ink on a transparent background, which disappears against a dark
   header. It sits on a white plate in dark mode rather than being inverted: a filter would
   flip the orange "in" to blue and the three brand dots to their complements, which is worse
   than a plate. If a reverse/white version of the logo ever exists, swap it in under the
   dark-mode rules and drop the plate. */
.brand {
  display: flex;
  align-items: center;
  flex: none;
  padding: 4px 7px;
  border-radius: 5px;
  line-height: 0;
  background: transparent;
  transition: background .15s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand { background: #fff; }
}
:root[data-theme="dark"] .brand { background: #fff; }
.brand img {
  height: 26px;
  width: auto;
  display: block;
}
.topbar h1 {
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid var(--rule);
}
@media (max-width: 560px) {
  /* 2.1.1: at phone width "engine ok" broke over two lines and the header ran off the right edge. */
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
  .topbar h1, .mode, .verbadge { white-space: nowrap; }
  .brand img { height: 20px; }
  .topbar h1 { padding-left: 10px; font-size: 15px; }
  .topbar h1 small { display: none; }
}

.mode {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2);
  padding: 4px 10px; border: 1px solid var(--rule-2); border-radius: 100px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.live { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; color: var(--ok); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(44,106,74,.45); } 70% { box-shadow: 0 0 0 6px rgba(44,106,74,0); } 100% { box-shadow: 0 0 0 0 rgba(44,106,74,0); } }
@media (prefers-reduced-motion: reduce) { .dot.live { animation: none; } }

.body { display: flex; flex: 1; min-height: 0; align-items: flex-start; }

/* ------------------------------------------------------------------ rail -- */

.rail {
  width: var(--rail); flex: none;
  border-right: 1px solid var(--rule);
  background: var(--surface);
  align-self: stretch;
  display: flex; flex-direction: column;
  position: sticky; top: 49px; max-height: calc(100vh - 49px);
}
.rail header {
  padding: 14px 16px 8px;
  display: flex; align-items: baseline; gap: 8px;
}
.rail header h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; font-family: var(--sans); font-weight: 600; color: var(--ink-3); }
.rail .list { overflow-y: auto; padding: 0 8px 12px; flex: 1; }
.rail .empty { padding: 12px 16px; color: var(--ink-3); font-size: 13px; }

.runcard {
  width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
  padding: 9px 10px; margin-bottom: 2px; display: block;
}
.runcard:hover { background: var(--surface-2); }
.runcard[aria-current="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.runcard .t { font-size: 13px; line-height: 1.35; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.runcard .m { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); }

.state { font-size: 11px; padding: 1px 7px; border-radius: 100px; border: 1px solid; white-space: nowrap; }
.state.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.state.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.state.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); }
.state.idle { color: var(--ink-3); border-color: var(--rule-2); background: var(--surface-2); }

/* ------------------------------------------------------------------ main -- */

/* 6.2.2: the list's own width (the .wrap's 1060 + 48) is .main's first claim; the round panel beside it grows only into what
   is left (.workpanel). Without the panel .main fills the row exactly as before. */
.main { flex: 1 1 1108px; min-width: 0; padding: 0 0 64px; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: 0 0 22px; position: sticky; top: 49px; background: var(--paper); z-index: 20; padding-top: 14px; }
/* 6.0.0: the tab row never makes the page scroll sideways, at any width, and no label wraps to a second
   line (below ~1100 px "All eligible" and "Developer log" did both, and the row grew from 55 to 76 px — the sticky
   stack is 104 px). Narrower, it tightens first, then the Developer log keeps only its icon (its name stays in the
   hover and for screen readers); past that the row scrolls within itself, as it always did on a phone. */
.tabs { container: tabs / inline-size; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 8px 14px; cursor: pointer; color: var(--ink-3); font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  flex: none; white-space: nowrap;
}
@container tabs (max-width: 900px) {
  .tab { padding-inline: 10px; gap: 6px; }
  .aside-tab { padding-left: 12px; }
}
@container tabs (max-width: 780px) {
  .aside-tab .tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab .n { font-size: 11px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 100px; padding: 0 6px; color: var(--ink-2); }
.tab:disabled { opacity: .4; cursor: not-allowed; }

/* The Developer log is diagnostics, not part of choosing reviewers. Pushed to the far end of
   the bar and set in a quieter register so the four working tabs read as the actual flow. */
.aside-tab {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-3);
  border-left: 1px solid var(--rule);
  padding-left: 16px;
}
.aside-tab:not(:disabled):hover { color: var(--ink-2); }
.aside-tab[aria-selected="true"] { color: var(--ink-2); font-weight: 500; }

.devnote {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 9px 13px;
  margin: 0 0 16px;
  max-width: 78ch;
}
.devnote strong { color: var(--ink); font-weight: 600; }

.view { display: none; }
.view.on { display: block; }

.lede { font-family: var(--serif); font-size: 15px; color: var(--ink-2); max-width: 66ch; margin: 0 0 22px; }

/* Manuscript tab: form body on the left, readiness and the search button pinned on the
   right, so what the engine will make of the intake is visible while it is being typed
   rather than only after scrolling to the bottom. */
.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.intake-main { min-width: 0; }
.intake-side { position: sticky; top: 104px; min-width: 0; }
.intake-side .card { margin-bottom: 12px; }
.intake-side .card.initiate .inner { display: grid; gap: 12px; }
.intake-side .card.initiate #submitBtn { justify-content: center; }

/* Controls that live inside a card heading: the manuscript id and the publisher. They sit
   with the title because they identify the manuscript rather than describe it. */
/* input[type=text] is (0,1,1) and beats a bare class, so this selector has to out-specify
   the global field width rather than rely on source order. */
input[type=text].hdr-input {
  /* Flexible, not fixed (3.3.2): when the heading runs short it gives up width before anything
     wraps, and takes spare width when there is room. 110px still shows a generated MS id. */
  flex: 1 1 110px;
  min-width: 110px;
  max-width: 170px;
  width: auto;
  font: 12px var(--mono);
  padding: 4px 8px;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  background: var(--paper);
}
.hdr-input::placeholder { font-family: var(--sans); letter-spacing: .01em; }

.hdr-pub {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  background: var(--paper); padding: 2px 6px 2px 8px;
}
.hdr-pub .pubmark { color: var(--ink-3); display: flex; }
.hdr-pub .publogo { height: 13px; width: auto; display: block; }
:root[data-theme="dark"] .hdr-pub .publogo,
:root:not([data-theme="light"]) .hdr-pub .publogo { filter: brightness(2.4) saturate(.6); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hdr-pub .publogo { filter: none; }
}
.hdr-pub select {
  width: auto; border: 0; background: none; padding: 2px 2px 2px 0;
  /* Size to the CHOSEN option, not the longest (3.3.2): "Default rules" made the closed menu
     33px wider than "Sage rules" needs, and the heading wrapped at a 1512px window. */
  field-sizing: content;
  font: 13px var(--sans); color: var(--ink); cursor: pointer;
}

.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.runcard .t2 {
  font-size: 11px; color: var(--ink-3); margin: -2px 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Build badge. Small and permanent: every screenshot, bug report and CSV can be tied back to
   the build that produced it. */
.verbadge {
  font: 500 11px var(--mono);
  color: var(--ink-3);
  border: 1px solid var(--rule-2);
  border-radius: 100px;
  padding: 3px 9px;
  white-space: nowrap;
  flex: none;
}

/* Who is signed in, and the way out. Hidden entirely when sign-in is not configured, so a
   local run without credentials looks exactly as it did before Entra existed.
   ⚠️ NOT `.who` — that class already belongs to the identity block inside a reviewer card
   (`.rev .who`), which is a block column. A bare `.who { display: flex }` here reached into
   every card and laid name, affiliation, ORCID and email out side by side. Keep topbar
   classes namespaced; the card had the name first. */
.session {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--rule);
}
.session-name {
  font: 500 12px var(--sans);
  color: var(--ink-2);
  white-space: nowrap;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The name is the least important thing in the topbar — on a narrow screen the sign-out
   control is what has to survive. */
@media (max-width: 900px) {
  .session-name { display: none; }
  .session { padding-left: 6px; }
}

/* Same shell as the publisher control so the header reads as one row of fields rather than
   a field, a field and a stray link. A bare <select> also sizes itself to its longest option,
   which left a wide gap between the label and the arrow — the wrapper fixes the width and the
   select fills it. */
.hdr-example {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  background: var(--paper); padding: 2px 6px 2px 8px;
}
.hdr-example .exmark { color: var(--ink-3); display: flex; }
.hdr-example select {
  width: 118px;
  border: 0; background: none; padding: 2px 2px 2px 0;
  font: 13px var(--sans); color: var(--ink); cursor: pointer;
}

/* Where the browser can size a menu to its chosen option (Chrome 123+), header menus do; others
   keep the fixed width above. */
@supports (field-sizing: content) {
  .hdr-example select { width: auto; field-sizing: content; }
}
.titlemark { display: flex; align-items: center; color: var(--accent); flex: none; }
.topbar h1 { padding-left: 10px; border-left: 0; margin-left: 0; }
.intake-side #readyList { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }

@media (max-width: 1080px) {
  .intake-grid { grid-template-columns: 1fr; }
  .intake-side { position: static; }
  .intake-side #readyList { max-height: none; }
}

/* ----------------------------------------------------------------- forms -- */

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h3 { font-size: 15px; padding: 13px 16px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 8px; }
/* A card heading adapts to its OWN width, not the window's (3.3.2). Controls in a heading (the
   Manuscript id, publisher, Load example, Clear) had one layout; when a label grew or the window
   narrowed, the last group broke onto a second line on its own. Now, as the heading tightens:
   first Clear drops to its icon (the title and the accessible name keep the word), then the
   heading becomes two deliberate rows — title + id, then publisher … tools. */
.card > h3 { container: cardhead / inline-size; }
@container cardhead (max-width: 630px) {
  .card > h3 #clearBtn { font-size: 0; gap: 0; padding-inline: 7px; }
}
@container cardhead (max-width: 520px) {
  /* Two deliberate rows: the title and the id (the id takes the rest of the line), then the
     publisher on the left and the tools on the right, like a toolbar. */
  .card > h3 input[type=text].hdr-input { flex: 1 1 60%; max-width: none; }
}
.card > h3 .hint { font: 400 12px var(--sans); color: var(--ink-3); margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.card .inner { padding: 16px; }

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 5px; }
/* 6.6.0: a field's name where there is no input to label (the AI's subject chips): the label's look, without a <label>. */
.field > .field-name { display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 5px; }
.field .help { font-size: 12px; color: var(--ink-3); margin: 4px 0 0; }
/* The rules the chosen publisher runs (engine 1.3.0 lanes), under the form header. */
.lanehelp { font-size: 12.5px; color: var(--ink-2); margin: 0 0 12px; }
.lanehelp b { font-weight: 600; color: var(--ink); }

input[type=text], input[type=email], textarea, select {
  width: 100%; padding: 8px 10px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--radius);
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, .runcard:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }

.row { display: grid; gap: 10px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: 1fr 1fr 1fr; }

.err { color: var(--bad); font-size: 12px; margin-top: 4px; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--paper); }
.chips input { border: 0; background: none; flex: 1; min-width: 120px; padding: 3px 4px; outline: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 100px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--ink-3); line-height: 1; padding: 2px 4px; border-radius: 50%; }
.chip button:hover { color: var(--bad); background: var(--bad-soft); }
/* Primary-keyword star (engine 1.4.0, Sage rules — 3.3.0). Scoped to the chip; the remove button
   keeps its own hover. */
.chip button.star { color: var(--ink-3); font-size: 14px; padding: 0 3px 0 0; margin-left: -4px; }
.chip button.star:hover { color: var(--warn); background: none; }
.chip button.star[aria-pressed="true"] { color: var(--warn); }
.chip.primary { border-color: color-mix(in srgb, var(--warn) 45%, var(--rule)); }
.chip button.star:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 6.3.0, a mock for production: the AI's keywords on the search form — a small button on the Keywords label's line, an "AI" tag
   on each chip it added (kept, starred or removed like any other), a note with "Remove the AI keywords", and the subject (shown only). */
.field:has(> #kwAiBtn) { position: relative; }
/* An action that reads as the AI's: a soft blue pill, the sparkle, a verb ("Suggest with AI" → "Suggesting…" → "Suggest again"). */
#kwAiBtn { position: absolute; top: -4px; right: 0; padding: 3px 12px 3px 10px; gap: 6px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 18%, transparent); }
#kwAiBtn .ico { opacity: 1; }
#kwAiBtn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: var(--accent); }
#kwAiBtn.kw-ai-going { cursor: progress; opacity: 1; }
#kwAiBtn.kw-ai-going .ico { animation: kw-ai-pulse 1s ease-in-out infinite; }
@keyframes kw-ai-pulse { 50% { opacity: .25; } }
.chip.kw-aichip { border-color: color-mix(in srgb, var(--accent) 35%, var(--rule)); }
.kw-ai-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); border-radius: 4px;
  padding: 0 4px; line-height: 1.6; cursor: help; }
.kw-ai-note { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.kw-ai-note.bad { color: var(--bad); }
.kw-ai-undo { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.kw-ai-undo:hover { text-decoration: underline; }
.kw-ai-subject { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-ai-subj { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 100px;
  background: var(--surface-2); font-size: 13px; }
.kw-ai-subj small { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kw-ai-subj.kw-ai-main { font-weight: 600; border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.kw-ai-wait { font-size: 12.5px; color: var(--ink-3); }

.author { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; background: var(--paper); }
.author .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.author .head strong { font-size: 13px; }
.author .head .spacer { flex: 1; }
.corr { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
/* "No ORCID available" — the corresponding author's deliberate opt-out. Same rhythm as .corr,
   one step quieter, so it reads as an answer to the field above rather than a new field. */
/* Scoped as `.field > label.noorcid` on purpose: `.field > label` (0,1,1) is the uppercase
   field-label style and would otherwise win over a bare class (0,1,0) — the specificity trap
   in capsule 09. */
.field > label.noorcid { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-2); cursor: pointer; margin: 8px 0 0; }
.field > label.noorcid input { margin: 0; flex: none; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: var(--radius); border: 1px solid var(--rule-2); background: var(--surface); cursor: pointer; font-size: 14px; }
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------- readiness -- */

.readiness { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.readiness .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.readiness .score { font-family: var(--serif); font-size: 26px; line-height: 1; }
.readiness .meter { flex: 1; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.readiness .meter i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.readiness.thin .meter i { background: var(--warn); }
.readiness.bad .meter i { background: var(--bad); }

.advice { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.advice:first-of-type { border-top: 0; }
.advice .ic { flex: none; width: 18px; height: 18px; border-radius: 50%; margin-top: 1px; display: grid; place-items: center; }
.advice.high .ic { background: var(--bad-soft); color: var(--bad); }
.advice.medium .ic { background: var(--warn-soft); color: var(--warn); }
.advice.low .ic { background: var(--surface-2); color: var(--ink-3); }
.advice b { display: block; font-weight: 600; }
.advice p { margin: 2px 0 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- banner -- */

.banner { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; border: 1px solid; display: flex; gap: 12px; }
.banner.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.banner.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
/* 5.0.0: waiting in the gateway's queue — information, not a warning; nothing is wrong. */
.banner.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
/* 6.5.0: above the form while it shows an opened run's details — whose they are, what its "Suggest with AI" did (intake.js runNote). */
#runFormNote .runform { margin-bottom: 14px; }
#runFormNote .runform-ai { color: var(--ink); }
#runFormNote .runform-which summary { cursor: pointer; font-size: 13px; color: var(--ink-2); width: fit-content; }
#runFormNote .runform-which ul { margin: 4px 0 6px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
#runFormNote .runform-which li .kw { color: var(--ink); }
#runFormNote .runform-which li.ai-removed .kw { text-decoration: line-through; color: var(--ink-3); }
/* The kept list: every form never searched, each with Back to it and Drop (app.js keepForm; Test -f4's B1). */
#runFormNote .keptlist { border: 1px dashed var(--rule-2); border-radius: var(--radius); background: var(--surface-2); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
#runFormNote .keptlist .kept-head { margin: 0 0 6px; }
#runFormNote .keptlist ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
#runFormNote .keptlist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#runFormNote .keptlist .kept-label { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
#runFormNote .keptlist .kept-at { color: var(--ink-3); }
.banner .mark { font-size: 18px; line-height: 1.2; flex: none; }
/* 6.5.0: a banner at the top of a view is an h3 (beside the cards), one inside a card an h4 — both look like this. */
.banner :is(h3, h4) { font-size: 14px; font-family: var(--sans); font-weight: 700; margin-bottom: 3px; }
.banner p { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); max-width: 78ch; }
/* A list in a banner reads as the paragraph does — without this it took the body's 15px and ran
   larger than the banner's own heading (the engine's anchor-confidence signals, 3.1.1). */
.banner ul { margin: 0 0 6px; padding-left: 18px; font-size: 13px; color: var(--ink-2); max-width: 78ch; }
.banner li { margin: 1px 0; }
.banner .fix { font-size: 13px; }
.banner .fix b { font-weight: 600; }
.banner code { font: 12px var(--mono); background: rgba(0,0,0,.05); padding: 1px 4px; border-radius: 3px; }
/* Engine 1.6.0 abort: the searches that ran. A query is one long word, so it wraps inside the banner. */
.banner details.searched { margin: 2px 0 6px; }
.banner details.searched ul { margin: 4px 0 0; }
.banner details.searched code { word-break: break-word; }

.ack { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; padding-top: 9px; border-top: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); }

/* 6.6.0: the corresponding author's affiliation, asked on "Run reviewer search" (intake.js affiliationDialog) — a native modal
   dialog drawn as one of the app's cards. Scoped to dialog.affdlg; no `display` on the dialog itself, so a closed one stays shut.
   The two overscroll rules keep a scroll over the dialog or its backdrop from moving the page behind it. */
dialog.affdlg {
  width: min(520px, calc(100vw - 32px)); padding: 20px 22px 18px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow), 0 16px 48px rgba(0, 0, 0, .22);
}
dialog.affdlg:modal { overscroll-behavior: contain; }
dialog.affdlg::backdrop { background: rgba(20, 18, 16, .42); overflow: hidden; overscroll-behavior: contain; }
dialog.affdlg h2 { font-size: 18px; margin-bottom: 10px; }
dialog.affdlg p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
dialog.affdlg p.affdlg-said { color: var(--ink); overflow-wrap: anywhere; }
dialog.affdlg .affdlg-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ----------------------------------------------------------------- stats -- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-family: var(--serif); font-size: 27px; line-height: 1.1; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-top: 3px; }
.stat .s { font-size: 12px; color: var(--ink-2); margin-top: 5px; }
.stat.accent .v { color: var(--accent); }
.stat.muted .v { color: var(--ink-3); }
.stat.val .v { color: var(--accent); }

/* --------------------------------------------------------------- stages -- */

.stages { display: flex; flex-wrap: wrap; gap: 6px; }
.stagechip { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 8px 11px; min-width: 104px; }
.stagechip .n { font-size: 12px; font-weight: 600; text-transform: capitalize; display: flex; align-items: center; gap: 5px; }
.stagechip .c { font: 11px var(--mono); color: var(--ink-3); margin-top: 4px; }
.stagechip.done { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.stagechip.active { border-color: var(--accent); background: var(--accent-soft); }

/* The sticky "which manuscript is this?" strip under the tabs. Sticky rather than a right-
   hand panel: the shortlist is a vertical read of dense cards, and a side panel would take
   width from them exactly when we want to show more of them — and vanish at the widths where
   that squeeze is worst. */
.runctx {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 9px 2px 10px;
  margin-bottom: 4px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
/* 2.1.1: the title is what identifies the run, so it keeps at least ~34 characters; keyword chips
   and the meta block wrap to a second line instead of squeezing it to "Intrat…". */
.runctx .ctx-title { display: flex; align-items: baseline; gap: 9px; min-width: min(34ch, 100%); flex: 1 1 34ch; }
.runctx .ctx-title b { font: 600 13px var(--mono); color: var(--ink); flex: none; }
.runctx .ctx-title span {
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.runctx .ctx-kw { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; flex: none; }
.runctx .ctx-more { font: 11px var(--sans); color: var(--ink-3); }
/* A primary keyword the engine applied (1.4.0 echo). */
.runctx .ctx-kw .pill.kwp { border-color: color-mix(in srgb, var(--warn) 45%, var(--rule-2)); }
.runctx .ctx-kw .pill.kwp b { color: var(--warn); font-weight: 700; }
.runctx .ctx-meta { display: flex; align-items: center; gap: 10px; flex: none; font-size: 12px; color: var(--ink-3); }
/* How the conflict check was built. A pill, not a banner — it is a property of the run. */
.runctx .ctx-meta .pill.basis,
.runctx .ctx-meta .pill.lane { font-size: 11.5px; padding: 1px 8px; white-space: nowrap; }
.pickn { font: 500 11px var(--sans); color: var(--accent); }
/* Below this the title alone fills the row; keywords wrap under it rather than squeezing it. */
@media (max-width: 1080px) {
  .runctx .ctx-title { flex: 1 0 100%; }
}
/* 3.0.0: the lane chip ("Sage rules not applied") is longer than the plain publisher name it
   replaced, so on a phone the meta row wraps instead of pushing "Full intake" off the screen. */
@media (max-width: 640px) {
  .runctx .ctx-meta { flex: 1 1 100%; flex-wrap: wrap; row-gap: 6px; }
  /* Found by the same sweep, older than 3.0.0: long keywords (CIX-26-0146.R1) held the chip row
     at its full width, and the page scrolled sideways on a phone. */
  .runctx .ctx-kw { flex: 1 1 100%; min-width: 0; }
}

/* Collapsing the run list. Deliberately a labelled stub, not an icon rail — see the comment
   on #railToggle in index.html. */
.rail { transition: width .16s ease; }
.rail .railtoggle { font-size: 11px; line-height: 1; padding: 4px 7px; }
.rail .railstub { display: none; }
.rail.collapsed { width: 44px; overflow: hidden; }
.rail.collapsed > header,
.rail.collapsed > .list { display: none; }
.rail.collapsed .railstub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  font: 500 11px var(--sans);
}
.rail.collapsed .railstub:hover { color: var(--ink); background: var(--surface-2); }
.rail.collapsed .railstub .lab {
  writing-mode: vertical-rl;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.rail.collapsed .railstub .n {
  font: 11px var(--mono);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 1px 5px;
}

/* A manuscript keyword found in the matched paper's title. This is the one place the card
   answers "why is this person here?" without the editor holding the manuscript in their
   head — and a single hit on a five-keyword manuscript reads as the thin match it is. */
/* Country flags. The flag is the INSTITUTION's country — parsed from the affiliation on the
   matching paper — so it sits with the institution, never with the person's name. Country
   spread is a policy the engine enforces, and a flag answers "how concentrated is this slate"
   in peripheral vision, which a country name cannot. */
/* Chrome on Windows has no flag glyphs and prints the two regional-indicator letters ("US")
   instead. This bundled font — the Twemoji country-flag subset, 78 KB, served from our own
   origin with no network — draws them on every platform, so a slate looks the same to every
   editor. unicode-range limits it to regional indicators and the tag sequences, so the browser
   fetches it only when a flag is on the page and never uses it for any other character.
   Art: Twemoji, CC-BY 4.0 — see /fonts/TwemojiCountryFlags.LICENSE.md and the README. */
@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
    U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url("/fonts/TwemojiCountryFlags.woff2") format("woff2");
  font-display: swap;
}
.flag {
  flex: none;
  font-size: 14px;
  line-height: 1;
  /* The bundled flag font first, deliberately on every platform: macOS draws the same Twemoji
     flag as Windows rather than Apple's own. The system emoji fonts stay as the fallback in
     case the font file fails to load. */
  font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
/* Unrecognised or mis-parsed country: a muted marker rather than a wrong flag. The engine's
   country field is parsed text and does produce junk, and surfacing that is the honest move. */
.flag.noflag { font-size: 12px; color: var(--ink-3); font-family: var(--sans); }
/* 6.5.0: the spread card's two column headings are h4s under its h3 (they were h5s, a skipped level) — the look they had as
   h5s, from the inline style and the browser's own h5 top margin (1.67em), kept exactly. */
.rev-spread-cols h4 { font-size: 11px; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 1.67em 0 6px; }

/* "About every card on this run" (2.1.0): what used to repeat on every card, said once. Quiet
   on purpose — it is context for the list, not an alarm — so it is a ruled note, not a banner. */
.runnotes { border: 1px dashed var(--rule-2); border-radius: var(--radius); background: var(--surface-2); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
/* 6.5.0: its heading is an h3 (a block of its own above the list; it was an h5, a skipped level) — the same look. */
.runnotes h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-family: var(--sans); font-weight: 700; margin: 0 0 4px; }
.runnotes ul { margin: 0; padding-left: 18px; }
.runnotes .method { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }
.runnotes .method details.note { margin: 0; }
/* Passed checks, collapsed: one "Clear" line, each reason one click away. */
details.note.passed > div { display: grid; gap: 8px; margin-top: 6px; }
.passed-one > b { display: block; font-size: 12.5px; }

.rev .aff { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.rev .aff .cty { color: var(--ink-3); font-size: 12px; }

/* Where to go and check this person, under the address you would write to — the order an
   editor actually works in. Labelled "Verify on" rather than "sources": ORCID and OpenAlex
   are records of the PERSON, PubMed is the PAPER that matched. */
.rev .verify {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 5px;
  font: 12px var(--sans);
}
.rev .verify .vlabel {
  font: 600 10.5px var(--sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.rev .verify .plink {
  color: var(--ink-2);
  /* 6.5.0 (the class of the 11-10 audit's A2 — card links of 24 px): the dotted line is now an underline under the text (it
     was the box's bottom border), so the box reaches down to 24 px without moving it; the negative margin keeps the card's
     height. Nothing clickable sits within 10 px below these two links (measured on the demo at 1512 / 1440 / 1280 / 1024). */
  text-decoration: underline dotted var(--rule-2);
  text-decoration-thickness: 1px;
  text-underline-position: under;
  padding-bottom: 10px;
  margin-bottom: -10px;
}
.rev .verify .plink:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Spread panel rows.
   The count sits IMMEDIATELY after the name, not right-aligned. Right-aligning it invented a
   numeric column that does not exist, and left the institutions' count sitting against the
   countries' flag — so two independent lists read as one four-column matrix. "Ferrara ×3" is
   one phrase; keeping it one phrase keeps this a list. */
ul.spreadlist { margin: 0; padding: 0; list-style: none; }
ul.spreadlist li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 3px 0;
  font-size: 13px;
  color: var(--ink-2);
}
ul.spreadlist li .lbl { min-width: 0; }
ul.spreadlist li b {
  flex: none;
  font: 600 11px var(--mono);
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 7px;
}
/* And give the two lists a real gutter, so they read as two things rather than one grid. */
.rev-spread-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.rev-spread-cols > div + div { border-left: 1px solid var(--rule); padding-left: 34px; }

/* Further work by this reviewer. One or two DOIs is what the engine returns, so it is
   labelled as a sample and never as a publication list. */
.rev .alsowrote { margin: 6px 0 0; font: 12px var(--mono); color: var(--ink-3); line-height: 1.6; }
.rev .alsowrote .k {
  font: 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 7px;
}
.rev .alsowrote a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.rev .alsowrote a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* Engine 1.4.0 recent papers (3.3.0): the list in Evidence, and the count chip on the card face. */
.rev .works { margin: 8px 0 0; font-size: 13px; }
.rev .works .k { font: 11px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 3px; }
.rev .works ul { margin: 0; padding-left: 18px; }
.rev .works li { margin: 2px 0; overflow-wrap: anywhere; }
.rev .works .y { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.rev .works .j { color: var(--ink-3); }
.rev .works a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.rev .works a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.rev .works .na { font-size: 12px; margin: 4px 0 0; }
/* 6.4.0 — the latest papers by ORCID (engine 1.7.12): the same look as the papers this search came across, under them. */
.rev .latestp { margin: 10px 0 0; font-size: 13px; }
.rev .latestp .k { font: 11px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 3px; }
.rev .latestp ul { margin: 0; padding-left: 18px; }
.rev .latestp li { margin: 2px 0; overflow-wrap: anywhere; }
.rev .latestp .y { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.rev .latestp .j { color: var(--ink-3); }
.rev .latestp a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.rev .latestp a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.rev .latestp .na { font-size: 12px; margin: 4px 0 0; }
.rev .latestp .ptag { white-space: normal; }
.rev .ptag.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.rev.simple .facts.latestl.ok .yearbtn { color: var(--ok); }
.rev.simple .facts.latestl.warn .yearbtn { color: var(--warn); }
.rev.simple .facts.latestl.mute .yearbtn { color: var(--ink-2); font-weight: 500; }
/* 6.4.0 (the owner, 11-09): each latest paper on the card face, one per line — year · title (its PubMed page) · on/off keywords.
   A long title ends in "…" on one line (the whole title in its tooltip and in Evidence), so a card grows one line per paper. */
.rev.simple .facts.latestl .lpcard { list-style: none; margin: 1px 0 0; padding: 0; }
.rev.simple .facts.latestl .lpcard li { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin: 2px 0 0; }
.rev.simple .facts.latestl .lpcard .lpy { flex: none; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* 6.9.0 (engine 1.7.16): after the year, the paper's subject chip + title (.lphead) and its tags, wrapping under the title — never
   under the year — when the line is too short for all of them (replaces 6.6.1's 520 px rule). The head is never split: a long title
   ends in "…" before a subject or a tag pushes it off its line. */
.rev.simple .facts.latestl .lpcard .lpbody { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.rev.simple .facts.latestl .lpcard .lphead { flex: 0 1 auto; min-width: 0; max-width: 100%; display: flex; align-items: baseline; gap: 8px; }
.rev.simple .facts.latestl .lpcard .lpt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rev.simple .facts.latestl .lpcard a.lpt { text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
.rev.simple .facts.latestl .lpcard a.lpt:hover { color: var(--accent); border-bottom-color: var(--accent); }
.rev.simple .facts.latestl .lpcard .ptag { flex: none; margin: 0; } /* 6.6.1: the line's 8 px gap spaces its tags (type · keywords · Retracted), not their own margins too */
/* 6.9.0: one paper's tags as one group — after the title when they all fit, else together under it */
.rev.simple .facts.latestl .lpcard .lptags { flex: 0 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
/* the subject keeps its whole name (up to 45 % of the line, then "…"); the title gives way first */
.rev.simple .facts.latestl .lpcard .lphead .ptag.subj { flex: 0 0 auto; min-width: 3em; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
/* 6.9.0: a paper's subject — its MeSH heading in PubMed — in the accent colour, apart from the grey type tags and the green/grey
   keyword tags; it opens the heading's MeSH page. "+1" / "+2": more subjects, named in its tooltip (and listed in Evidence). */
.rev .ptag.subj { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); border-color: color-mix(in srgb, var(--accent) 38%, transparent); text-decoration: none; }
.rev a.ptag.subj:hover { background: color-mix(in srgb, var(--accent) 17%, transparent); }
.rev a.ptag.subj:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rev .ptag.subj .subjmore { font-weight: 500; }
.rev.simple .facts.latestl .lpcard .lpt.same { font-style: italic; color: var(--ink-2); }
.rev .sig button.worksbtn { cursor: pointer; font: inherit; font-size: 12px; }
.rev .sig button.worksbtn:hover { color: var(--accent); border-color: var(--accent); }
.rev .sig button.worksbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

mark.kwhit {
  background: var(--accent-soft);
  color: var(--ink);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 500;
}

/* "What was searched" — the intake a finished run was submitted with. Collapsed by default:
   it answers a question you only sometimes ask, and expanded by default it would push the
   stage funnel below the fold. Every selector here is scoped under .recap — the topbar
   `.who` incident came from a bare class in this file reaching into a component that had
   the name first. */
details.recap {
  margin: 0 0 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
details.recap > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  font: 500 13px var(--sans);
  color: var(--ink-2);
  list-style: none;
}
details.recap > summary::-webkit-details-marker { display: none; }
details.recap > summary:hover { color: var(--ink); }
details.recap[open] > summary { border-bottom: 1px solid var(--rule); }
details.recap > *:not(summary) { padding: 0 13px; }
details.recap > *:not(summary):first-of-type { padding-top: 11px; }
details.recap > *:not(summary):last-child { padding-bottom: 12px; }

.recap-row { display: flex; gap: 14px; padding: 5px 0; align-items: baseline; }
.recap-row + .recap-row { border-top: 1px solid var(--rule); }
.recap-k {
  flex: none;
  width: 108px;
  font: 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.recap-v { flex: 1; min-width: 0; font-size: 13px; color: var(--ink); line-height: 1.5; }
.recap-v .mono { font: 12px var(--mono); }
.recap-v .na { color: var(--ink-3); font-style: italic; }
/* The abstract is the one field that can run long. Cap it and let it scroll inside itself
   rather than turning the panel into a wall of text. */
.recap-abs { margin: 0; max-height: 132px; overflow: auto; color: var(--ink-2); }
.recap-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.recap-author { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; padding: 2px 0; }
.recap-author .s { font-size: 12px; color: var(--ink-3); }

details.note { margin-top: 10px; }
details.note summary { cursor: pointer; font-size: 12px; color: var(--ink-2); padding: 4px 0; }
details.note summary:hover { color: var(--ink); }
details.note pre { font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 11px; margin: 6px 0 0; max-height: 340px; overflow: auto; color: var(--ink-2); }

/* ------------------------------------------------------------- reviewers -- */

.rev { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); }
.rev.shortlisted { border-color: var(--accent); }
.rev > .top { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; }
.rev .pos { font-family: var(--serif); font-size: 19px; color: var(--ink-3); min-width: 26px; text-align: right; flex: none; padding-top: 1px; }
/* 3.1.0: the number says what it is, like "fit / 100" under the score. */
.rev .pos small { display: block; font: 600 9.5px/1.2 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
/* The score rank under "place" when the engine's order differs from it (4.0.0, the owner's C1). */
.rev .pos small.srank { font-weight: 500; margin-top: 1px; }
/* Where each of the engine's groups starts, in the engine's order only (4.0.0, the owner's B1). */
#slList > h3.ghead, #slList > .pickedcards > h3.ghead { font: 600 11px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); text-wrap: balance; }
/* Why a better-ranked reviewer sits in Consider (3.1.0). Read with the name, not buried below. */
.rev .whynot { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--warn); }
.rev .whynot .ico, .rev .whynot svg { flex: none; }
.rev .who { flex: 1; min-width: 0; }
.rev .who h4 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rev .who .aff { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.rev .who .ids { font: 11px var(--mono); color: var(--ink-3); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
/* 6.5.0 (the 11-10 audit, A2 — WCAG 2.2 AA 2.5.8, targets of 24 px): the ORCID link, the check an editor makes on almost every
   card, was 12.5 px tall to the pointer. The padding gives it the height; the matching negative margin takes it back out of the
   line, so no card grows. More above than below: the card's OpenAlex / PubMed links sit 5 px under it, and its box must not
   reach over them (measured on the demo at 1512 / 1440 / 1280 / 1024: no overlap, 24.5 px). */
.rev .who .ids a { padding-block: 7px 5px; margin-block: -7px -5px; }

/* Address sits with the name, not behind a button: it is what an editor reads first and
   copies most often. */
.rev .who .mail { display: flex; align-items: center; gap: 6px; margin-top: 5px; font: 12px var(--mono); min-width: 0; }
.rev .who .mail .mi { color: var(--ink-3); display: flex; flex: none; }
.rev .who .mail a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev .who .mail a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.rev .who .mail.guess a { color: var(--ink-2); }
.rev .who .mail .tag {
  font: 600 9px/1.6 var(--sans); text-transform: uppercase; letter-spacing: .06em;
  color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: 3px; padding: 0 5px; flex: none;
}

button.copy {
  border: 0; background: none; padding: 2px; margin: 0; cursor: pointer; flex: none;
  color: var(--ink-3); border-radius: 4px; display: flex; align-items: center;
}
button.copy:hover { color: var(--accent); background: var(--surface-2); }
button.copy.done { color: var(--ok); }
.rev .score { text-align: right; flex: none; }
.rev .score .v { font-family: var(--serif); font-size: 22px; line-height: 1; }
.rev .score .k { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

.sig { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.pill { font-size: 12px; border-radius: 100px; padding: 2px 9px; border: 1px solid; display: inline-flex; align-items: center; gap: 5px; }
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pill.bad { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.pill.mute { color: var(--ink-3); background: var(--surface-2); border-color: var(--rule); }
/* Engine 1.5.0, Sage rules: Validated — portal blue, never a second green "Recommended" (4.0.0). */
.pill.val { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

.evidence { border-top: 1px solid var(--rule); padding: 12px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.evidence .blk h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-family: var(--sans); font-weight: 700; margin-bottom: 5px; }
.evidence .blk p { margin: 0; font-size: 13px; color: var(--ink-2); }
.evidence .paper { font-style: italic; }
.evidence .paper a { font-style: normal; }
.evidence ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--ink-2); }
.evidence li { margin-bottom: 3px; }
.evidence .na { color: var(--ink-3); font-style: italic; }

.bars { display: grid; gap: 5px; }
/* 2.1.1: the value column was 34px, so "22.67/40" was clipped into the Standing column (107 bar
   values across 100 cards), and "Identity confidence" wrapped. Both columns now size to their text. */
.bar { display: grid; grid-template-columns: 132px minmax(40px, 1fr) max-content; gap: 8px; align-items: center; font-size: 12px; }
.bar .t { white-space: nowrap; }
.bar .t { color: var(--ink-2); }
.bar .track { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--accent); }
.bar .n { text-align: right; font: 11px var(--mono); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.gates { border-top: 1px solid var(--rule); padding: 10px 16px 14px; }
.gate { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; font-size: 13px; border-top: 1px dotted var(--rule); }
.gate:first-child { border-top: 0; }
.gate .v { flex: none; font-size: 11px; padding: 1px 7px; border-radius: 3px; border: 1px solid; min-width: 82px; text-align: center; }
.gate .v.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: var(--ok-soft); }
.gate .v.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); }
.gate .v.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: var(--bad-soft); }
.gate .d { min-width: 0; }
.gate .d b { font-weight: 600; }
.gate .d p { margin: 1px 0 0; color: var(--ink-2); }
/* Evidence as lines (3.0.0): the subject check and the namesake flag, where the evidence is the
   finding — what each matched paper is about, which forename each byline gives. */
.gate .d ul.ev { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.gate .d ul.ev li { margin: 1px 0; overflow-wrap: anywhere; }
.gate .d ul.ev a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 2px; }

/* Evidence disclosure.
   The panel is height-capped and scrolls INSIDE itself. On a ranked shortlist, expanding one
   reviewer must not push the ranking below off screen — you need to keep reading down the
   list while inspecting one person. So the card grows by at most --panel-max, and the
   evidence scrolls within that. */
.rev .detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .24s ease;
}
.rev.open .detail { grid-template-rows: 1fr; }
.rev .detail > .panel { overflow: hidden; min-height: 0; }
.rev.open .detail > .panel {
  --panel-max: 340px;
  max-height: var(--panel-max);
  overflow-y: auto;
  overscroll-behavior: contain;       /* scrolling the panel does not scroll the page behind */
  border-top: 1px solid var(--rule);
  /* Shadows that appear only when there is more to scroll to. */
  background:
    linear-gradient(var(--surface) 30%, transparent) top / 100% 22px no-repeat,
    linear-gradient(transparent, var(--surface) 70%) bottom / 100% 22px no-repeat,
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.12), transparent) top / 100% 7px no-repeat,
    radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.12), transparent) bottom / 100% 7px no-repeat;
  background-attachment: local, local, scroll, scroll;
}
.rev.open .detail > .panel > *:first-child { border-top: 0; }

/* Minimize bar: sticks to the top of the evidence panel so it is reachable from anywhere
   inside the scroll, without scrolling back down to the footer toggle. */
.panelbar {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 5px 16px;
  display: flex;
  justify-content: flex-end;
}
.minimize {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--rule-2); background: var(--surface-2); cursor: pointer;
  padding: 2px 9px 2px 7px; border-radius: 100px;
  font-size: 11px; color: var(--ink-2); line-height: 1.7;
}
.minimize:hover { color: var(--accent); border-color: var(--accent); }
.minimize .chev { display: flex; transform: rotate(180deg); }
.rev .detail > .panel::-webkit-scrollbar { width: 9px; }
.rev .detail > .panel::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 5px; border: 2px solid var(--surface); }
.rev .detail > .panel::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .rev .detail { transition: none; }
}

.evtoggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; background: none; cursor: pointer;
  padding: 4px 9px 4px 10px; border-radius: var(--radius);
  font-size: 13px; color: var(--ink-2);
}
.evtoggle:hover { background: var(--surface); border-color: var(--rule-2); color: var(--ink); }
.evtoggle .chev { display: flex; transition: transform .24s ease; }
.rev.open .evtoggle { color: var(--accent); font-weight: 600; }
.rev.open .evtoggle .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .evtoggle .chev { transition: none; } }

.rev .foot { border-top: 1px solid var(--rule); padding: 9px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.rev .foot .spacer { flex: 1; }
.rev .foot .why { font-size: 12px; color: var(--ink-3); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=text] { width: auto; flex: 1; min-width: 180px; text-overflow: ellipsis; }
/* The toolbar adapts to its OWN width too (3.3.2, same treatment as the card headings): at a 1000px
   window Export CSV broke onto a line of its own. Tight: the filter gives up width and Expand all
   drops to its icon (its title keeps the word). Narrow: the filter takes a full row, the controls
   the next — a layout, not an accident. */
.toolbar { container: toolbar / inline-size; }
@container toolbar (max-width: 760px) {
  .toolbar input[type=text] { min-width: 140px; }
  .toolbar #expandAll { font-size: 0; gap: 0; padding-inline: 8px; }
}
@container toolbar (max-width: 600px) {
  .toolbar input[type=text] { flex: 1 0 100%; }
}
.toolbar .seg { display: flex; border: 1px solid var(--rule-2); border-radius: var(--radius); overflow: hidden; }
.toolbar .seg button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; font-size: 13px; border-left: 1px solid var(--rule); }
.toolbar .seg button:first-child { border-left: 0; }
.toolbar .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty-state h3 { font-size: 17px; color: var(--ink-2); margin-bottom: 6px; }
.empty-state p { margin: 0 auto; max-width: 46ch; font-size: 14px; }

.toast { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; }
.toast div { background: var(--surface); border: 1px solid var(--rule-2); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); font-size: 13px; max-width: 360px; }
.toast div.bad { border-left-color: var(--bad); }
.toast div.ok { border-left-color: var(--ok); }
/* 5.3.3: a mark before the words — a pick says so in green with a tick, an unpick in grey with a minus. */
.toast div { display: flex; align-items: flex-start; gap: 8px; }
.toast div .ico { flex: none; margin-top: 2px; }
.toast div.ok .ico { color: var(--ok); }
.toast div.mute { border-left-color: var(--ink-3); }
.toast div.mute .ico { color: var(--ink-3); }

table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain th, table.plain td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.plain td { overflow-wrap: anywhere; }
table.plain th { white-space: nowrap; width: 1%; }
table.plain th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
table.plain td.n { font: 12px var(--mono); color: var(--ink-2); }

@media (max-width: 900px) {
  .rail { display: none; }
  .evidence { grid-template-columns: 1fr; }
  .row.c2, .row.c3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .rev > .top { flex-wrap: wrap; }
}

/* ------------------------------------------------- Upload JSON (5.1.0) -- */
/* A Content Pilot export of the ScholarOne manuscript page fills the form (public/js/contentpilot.js).
   Every class here is prefixed cp- (09: a bare class once reached into the reviewer cards). */

/* The button sits with the form's other tools in the Manuscript heading. It is production's way in, so it
   keeps its words longest: when the heading runs short (from about 700 px, a 1512 px window), Load example
   (a demo tool) drops to its ▶ first, its menu still opening from the icon; then Clear (630 px, as before);
   the heading's two deliberate rows at 520 px; and only on a phone-narrow heading does Upload JSON lose its
   words. The accessible names and titles keep them throughout. */
.card > h3 .cp-upload { flex: none; }
@container cardhead (max-width: 700px) {
  .card > h3 .hdr-example { position: relative; padding: 4px 7px; }
  .card > h3 .hdr-example select { position: absolute; inset: 0; width: 100%; opacity: 0; }
  .card > h3 .hdr-example:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
}
@container cardhead (max-width: 380px) {
  .card > h3 #importJsonBtn { font-size: 0; gap: 0; padding-inline: 7px; }
}

/* A field the export left empty or wrong, until the editor fills it: amber, the portal's "needs you".
   (0,2,1) to beat input[type=text]; a red error state still wins over it. */
input[type].cp-need, textarea.cp-need, .chips.cp-need {
  border-color: var(--warn);
  background: var(--warn-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent);
}
input[type].cp-need[aria-invalid="true"], textarea.cp-need[aria-invalid="true"] {
  border-color: var(--bad); background: var(--bad-soft); box-shadow: none;
}
#authorList.cp-need .author .corr { color: var(--warn); font-weight: 600; }

/* The tooltip that asks for it: in the page's flow under its field (never over the next one), with an
   arrow pointing up at the field. */
.cp-tip {
  position: relative;
  /* Hugs its words, like a tooltip; a long message wraps at its field's width. */
  width: fit-content; max-width: 100%;
  display: flex; align-items: flex-start; gap: 7px;
  margin: 9px 0 0; padding: 7px 11px;
  font: 400 12.5px/1.45 var(--sans); letter-spacing: 0; text-transform: none;
  color: var(--ink);
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cp-tip::before {
  content: '';
  position: absolute; top: -6px; left: var(--cp-arrow, 14px);
  width: 10px; height: 10px;
  background: var(--warn-soft);
  border: solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-width: 1px 0 0 1px;
  transform: rotate(45deg);
}
.cp-tip > .ico { color: var(--warn); flex: none; margin-top: 2px; }
/* Above its target (the author list), pointing down. */
.cp-tip.cp-above { margin: 0 0 12px; }
.cp-tip.cp-above::before { top: auto; bottom: -6px; border-width: 0 1px 1px 0; }
/* Under the Manuscript heading, pointing up at the ID field in it. */
.cp-tip.cp-under-head { margin: 12px 16px 0; }
@media (prefers-reduced-motion: no-preference) {
  .cp-tip.cp-new { animation: cp-pop .28s ease-out both; }
}
@keyframes cp-pop { from { opacity: 0; transform: translateY(-4px); } }

/* The import's note above the form. */
.banner.cp-import { align-items: flex-start; }
.cp-import-body { flex: 1; min-width: 0; }
.cp-import-body > p { margin: 0; }
.cp-import-meta { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
/* One fact never breaks inside itself ("4 authors" stays together); the line breaks between facts. */
.cp-import-meta .cp-fact { white-space: nowrap; }
.cp-import-body > .cp-import-lede { margin-top: 8px; font-size: 13px; font-weight: 600; }
/* .banner ul is (0,1,1): these lists are scoped under .banner to outrank it. */
.banner .cp-needlist { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cp-jump {
  font: 500 12.5px var(--sans); color: var(--ink);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--rule));
  border-radius: 100px; padding: 3px 11px; cursor: pointer;
}
.cp-jump:hover { border-color: var(--warn); background: var(--paper); }
.banner .cp-notes { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.banner .cp-dismiss { flex: none; align-self: flex-start; margin: -4px -6px 0 0; }

/* ------------------------------------------------- Phase 1 (5.2.0, Sage runs) -- */
/* Every rule is scoped under the component that owns it: the Sage card (.rev.simple), the filter card
   (.fcard), All eligible (#view-eligible), the form's new notes. A bare class once reached into the
   reviewer cards (09, the .who incident). */

/* A link-styled button, for "Clear filters", "Show here", "See all …". */
button.lnk { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
button.lnk:hover { text-decoration-thickness: 2px; }

/* --- the Sage card (P5 B + P4's facts + P2's chip) --- */
.rev.simple .who .mail.addr { flex-wrap: wrap; row-gap: 4px; font-size: 13px; }
.rev.simple .who .aff { margin-bottom: 0; }
.rev.simple .who .mail.addr .pill { font-family: var(--sans); }
.rev.simple .who .mail.addr.none { font-family: var(--sans); }
.rev.simple .facts { margin: 5px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
/* 6.5.0 "Keyword paper in": the ticked years' keyword papers, one line each, spaced like one facts line. */
.rev.simple .facts.kw .kwline { margin: 0; }
.rev.simple .facts.kw .kwline + .kwline { margin-top: 2px; }
.rev.simple .facts .yearbtn { border: 0; background: none; padding: 0; font: 600 12.5px var(--sans); color: var(--ink); cursor: pointer; border-bottom: 1px dotted var(--ink-3); }
/* 6.5.0 (the same class): "Latest papers" opens Evidence at the reviewer's latest papers — a 24 px target, reaching up into the
   space above it, so its dotted line stays where it is and no card grows. The paper titles below it are NOT made 24 px: they
   sit 21.8 px apart, so 24 px boxes would overlap one another or add ~2 px to every paper line of every card (an impact,
   08 #253); their height is the list's own line height (WCAG 2.5.8's inline exception), and editors use a mouse. */
.rev.simple .facts.latestl .yearbtn { padding-top: 8.5px; margin-top: -8.5px; }
.rev.simple .facts .yearbtn:hover, .rev.simple .facts button.more:hover { color: var(--accent); border-bottom-color: var(--accent); }
.rev.simple .facts button.more { border: 0; background: none; padding: 0 0 0 6px; font: 12px var(--sans); color: var(--ink-3); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.rev.simple .facts .pj { color: var(--ink-3); }
.rev.simple .facts.counts .short { display: none; }
.rev.simple .facts.counts.na, .rev.simple .facts.counts.est { color: var(--ink-3); }
.rev.simple .ids .cue { font-family: var(--sans); font-size: 11.5px; padding: 0 6px; border-radius: 3px; border: 1px solid; }
.rev.simple .ids .cue.warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.rev.simple .ids .cue.mute { color: var(--ink-3); background: var(--surface-2); border-color: var(--rule); }
.rev.simple .whynot.aside { color: var(--warn); }
.rev .ptag { display: inline-block; font: 600 10.5px/1.5 var(--sans); padding: 0 6px; margin-left: 6px; border-radius: 3px; border: 1px solid; vertical-align: 1px; white-space: nowrap; }
.rev .ptag.mute { color: var(--ink-2); background: var(--surface-2); border-color: var(--rule); }
.rev .ptag.warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.rev .ptag.bad { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); margin: 0 6px 0 0; }
.rev .sig button.cochip { cursor: pointer; font: inherit; font-size: 12px; }
.rev .sig button.cochip:hover { border-color: var(--accent); color: var(--accent); }
.rev .pill.tiny { font-size: 10.5px; padding: 0 6px; }
.rev.flash { outline: 3px solid var(--accent); outline-offset: 2px; transition: outline-color .4s; }
/* Evidence on the Sage card: right column blocks, then the co-authors across the full width. */
.rev.simple .evidence .rp h5, .rev.simple .evidence .pubs h5, .rev.simple .evidence .likely h5 { margin-top: 0; }
.rev.simple .evidence .pubs, .rev.simple .evidence .likely { margin-top: 12px; }
.rev.simple .evidence .rp p .pill { vertical-align: 1px; }
.rev.simple .evidence.full { grid-template-columns: 1fr; }
.rev.simple .coauthors .corow { padding: 5px 0; border-top: 1px dotted var(--rule); font-size: 13px; }
.rev.simple .coauthors .corow:first-of-type { border-top: 0; }
.rev.simple .coauthors .cohead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.rev.simple .coauthors .goto { margin-left: auto; border: 1px solid var(--rule-2); background: var(--surface); border-radius: 100px; padding: 0 9px; font: 12px var(--sans); color: var(--accent); cursor: pointer; }
.rev.simple .coauthors ul.copapers { margin: 3px 0 0; padding-left: 18px; font-size: 12.5px; }
.rev.simple .coauthors ul.copapers .y, .rev.simple .coauthors ul.copapers .j { color: var(--ink-3); }
.rev.simple .coauthors p.na { margin-top: 6px; }
/* Phone: place · name · score stay on top, and every line under them runs the full card width. */
@media (max-width: 560px) {
  .rev.simple > .top { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; }
  .rev.simple > .top > .who { display: contents; }
  .rev.simple > .top > .who > h4 { grid-column: 2; grid-row: 1; }
  .rev.simple > .top > .score { grid-column: 3; grid-row: 1; }
  .rev.simple > .top > .pos { grid-row: 1; }
  .rev.simple > .top > .who > :not(h4) { grid-column: 1 / -1; }
  .rev.simple .facts.counts .long { display: none; }
  .rev.simple .facts.counts .short { display: inline; }
}

/* --- the run strip: two picked co-authors --- */
.pickn.pair { color: var(--warn); font-weight: 600; }

/* --- P4: "Filter the whole list" --- */
details.fcard { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); margin: 0 0 14px; }
details.fcard > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 9px 13px; cursor: pointer; font-size: 13px; list-style: none; }
details.fcard > summary::-webkit-details-marker { display: none; }
details.fcard > summary .hint { flex-basis: 100%; font-size: 12px; color: var(--ink-3); }
details.fcard > summary .fsum { color: var(--accent); font-weight: 600; }
details.fcard[open] > summary { border-bottom: 1px solid var(--rule); }
details.fcard[open] > summary .fsum { display: none; }
details.fcard .frow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 13px 0; }
details.fcard .flabel { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-right: 2px; }
details.fcard button.fchip { display: inline-flex; align-items: center; gap: 5px; font: 12.5px var(--sans); padding: 3px 10px; border-radius: 100px; border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink); cursor: pointer; }
details.fcard button.fchip:hover:not(:disabled) { border-color: var(--accent); }
details.fcard button.fchip[aria-pressed="true"], details.fcard button.fchip.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); font-weight: 600; }
details.fcard button.fchip:disabled { opacity: .5; cursor: not-allowed; }
/* 6.5.1 (the owner, 11-13: "2026 · 28" read as the decimal 2026.28): a count is its own small badge beside the label, never glued to
   it with a dot; the card's hint says once what the numbers are. Tabular figures so 28 and 352 line up across chips. */
details.fcard .fct { display: inline-flex; align-items: center; gap: 3px; min-width: 18px; padding: 0 6px; border-radius: 100px; background: var(--surface-2); color: var(--ink-2);
  font: 600 11.5px/18px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
details.fcard button.fchip[aria-pressed="true"] .fct, details.fcard button.fchip.on .fct { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
details.fcard label.copt .fct { margin-left: 6px; }
details.fcard .fct svg { flex: none; opacity: .75; }
details.fcard input.dept { flex: 1 1 220px; min-width: 0; padding: 4px 8px; font-size: 13px; }
details.fcard .help { flex-basis: 100%; font-size: 12px; color: var(--ink-3); margin: 0; }
details.fcard .cpanel { margin: 8px 13px 0; padding: 9px 11px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
details.fcard .cpanel .k { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 6px; }
details.fcard .cpanel input.cfind { width: 100%; max-width: 280px; margin-bottom: 6px; padding: 4px 8px; font-size: 13px; }
details.fcard .clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; max-height: 220px; overflow: auto; font-size: 13px; }
details.fcard .clist .copt { display: flex; align-items: center; gap: 6px; cursor: pointer; }
details.fcard .cpanel .na { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }
details.fcard p.fres { margin: 0; padding: 9px 13px 11px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* --- P2: the fold switch, the groups panel, the fold line --- */
.toolbar .foldsw[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 600; }
.card.cgroups ul.glist { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 13px; }
.card.cgroups ul.glist b { display: inline-block; min-width: 1.4em; color: var(--ink-3); }
#slList > .foldline { margin: -6px 0 10px 34px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
#slList > .foldnote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
#slList > .endline { margin: 14px 0 4px; font-size: 13px; color: var(--ink-2); text-align: center; }

/* --- P3: All eligible --- */
#view-eligible .pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 8px 0; font-size: 13px; color: var(--ink-2); }
#view-eligible .pager .short { display: none; }
#view-eligible .eltable { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
#view-eligible .elrow { display: grid; grid-template-columns: 52px minmax(150px, 1.3fr) minmax(150px, 1.4fr) minmax(110px, .9fr) 52px 56px minmax(160px, 1.6fr) auto; gap: 0 10px; align-items: start; padding: 7px 10px; border-top: 1px solid var(--rule); font-size: 13px; }
#view-eligible .elrow.elcols { border-top: 0; font: 600 10.5px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding-block: 6px; background: var(--surface-2); }
#view-eligible .elrow.aside { background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
#view-eligible .elrow.picked { box-shadow: inset 3px 0 0 var(--accent); }
#view-eligible .elrow .c { min-width: 0; overflow-wrap: anywhere; }
#view-eligible .elrow .c.n { font-variant-numeric: tabular-nums; color: var(--ink-2); }
#view-eligible .elrow .c.who { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
#view-eligible .elrow button.rowopen { border: 0; background: none; padding: 0; font: 600 13px var(--sans); color: var(--ink); text-align: left; cursor: pointer; }
#view-eligible .elrow button.rowopen:hover { color: var(--accent); text-decoration: underline; }
#view-eligible .elrow .c.inst { color: var(--ink-2); }
#view-eligible .elrow .c.inst .flag { margin-right: 5px; }
#view-eligible .elrow .c.inst .cty { color: var(--ink-3); margin-left: 4px; }
#view-eligible .elrow .c.em.ok { color: var(--ok); }
#view-eligible .elrow .c.em.warn { color: var(--warn); }
#view-eligible .elrow .c.em.bad { color: var(--bad); }
#view-eligible .elrow .c.paper { color: var(--ink-2); font-size: 12.5px; }
#view-eligible .elrow .c.paper .y { color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 6.5.0 "Keyword paper in": with a year ticked, the row's paper is that year's paper on the keywords — the year in green. */
#view-eligible .elrow .c.paper.kw .y { color: var(--ok); font-weight: 600; }
#view-eligible .elrow .c.paper .kwmore { color: var(--ink-3); white-space: nowrap; }
#view-eligible .elrow .pill.tiny { font-size: 10.5px; padding: 0 6px; }
#view-eligible .elhead { padding: 8px 10px 6px; border-top: 1px solid var(--rule); background: var(--surface-2); font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
#view-eligible .elhead.aside { background: var(--warn-soft); color: var(--warn); }
#view-eligible .elhead.aside .help { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-2); margin: 3px 0 0; }
#view-eligible .elcard { padding: 8px 10px 10px; border-top: 1px dashed var(--rule-2); background: var(--paper); }
#view-eligible .elcard .rev { margin: 0; }
/* 6.4.0 (the owner, 11-09): a row opens its full card on a click anywhere on it — a pointer, a hover tint and a ▾ say so;
   the ▾ turns when the card is open, and an open row takes the card's ground so the two read as one. */
#view-eligible .elrow[data-rank] { cursor: pointer; }
#view-eligible .elrow[data-rank]:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
#view-eligible .elrow.aside[data-rank]:hover { background: color-mix(in srgb, var(--warn-soft) 80%, var(--surface)); }
#view-eligible .elrow.open:not(.aside)[data-rank] { background: var(--paper); }
#view-eligible .elrow > .c.num { display: flex; align-items: center; gap: 4px; }
#view-eligible .elrow .elchev { display: inline-flex; color: var(--ink-3); }
#view-eligible .elrow .elchev .ico { display: flex; transition: transform .24s ease; }
#view-eligible .elrow:hover .elchev { color: var(--accent); }
#view-eligible .elrow.open .elchev .ico { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { #view-eligible .elrow .elchev .ico { transition: none; } }
/* 6.1.0: the table follows its OWN width, not the window's — the round panel (300 px) sits beside it, and at 1440 px the
   table is ~830 px wide: the eight columns no longer fit, and "Feedback" / "Shortlist" broke inside the word (seen on the 10-30 demo).
   Buttons never break their label; medium width = two lines a row; narrow = the stacked phone layout. */
#view-eligible .eltable { container: eltable / inline-size; }
#view-eligible .elrow .c.act { overflow-wrap: normal; }
#view-eligible .elrow .c.act .btn { white-space: nowrap; }
@container eltable (max-width: 1000px) {
  #view-eligible .elrow { grid-template-columns: 40px minmax(120px, 1.2fr) minmax(130px, 1.3fr) minmax(96px, .9fr) 48px 52px auto;
    grid-template-areas: "num who inst em fit topic act" "num paper paper paper paper paper act"; }
  #view-eligible .elrow > .c.num { grid-area: num; }
  #view-eligible .elrow > .c.who { grid-area: who; }
  #view-eligible .elrow > .c.inst { grid-area: inst; }
  #view-eligible .elrow > .c.em { grid-area: em; }
  #view-eligible .elrow > .c.fit { grid-area: fit; }
  #view-eligible .elrow > .c.topic { grid-area: topic; }
  #view-eligible .elrow > .c.paper { grid-area: paper; margin-top: 3px; }
  #view-eligible .elrow > .c.act { grid-area: act; flex-direction: column; align-items: stretch; }
  /* The heading cells carry no column class: the 7th is "Matched paper", which now sits under the name, not over the buttons. */
  #view-eligible .elrow.elcols > .c:nth-child(7) { display: none; }
  /* 6.4.0: two lines a row — the ▾ under the place number, in the room the number's column already has. */
  #view-eligible .elrow > .c.num { flex-direction: column; align-items: flex-start; gap: 6px; }
}
/* Narrow: name and Shortlist on one line; the institution; email · fit · topic; the paper — under the name. */
@container eltable (max-width: 700px) {
  #view-eligible .elrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; position: relative; padding-left: 56px; }
  #view-eligible .elrow > .c.num { position: absolute; left: 10px; top: 8px; }
  #view-eligible .elrow > .c.who { order: 1; flex: 1 1 55%; }
  #view-eligible .elrow > .c.act { order: 2; flex: 0 0 auto; flex-direction: row; }
  #view-eligible .elrow > .c.inst { order: 3; flex: 1 1 100%; }
  #view-eligible .elrow > .c.em { order: 4; flex: 0 1 auto; }
  #view-eligible .elrow > .c.fit { order: 5; flex: 0 0 auto; }
  #view-eligible .elrow > .c.topic { order: 6; flex: 0 0 auto; }
  #view-eligible .elrow > .c.paper { order: 7; flex: 1 1 100%; }
  #view-eligible .elrow.elcols { display: none; }
  #view-eligible .elrow .c.fit::before { content: 'fit '; color: var(--ink-3); }
  #view-eligible .elrow .c.topic::before { content: 'topic '; color: var(--ink-3); }
}
@media (max-width: 560px) {
  #view-eligible .pager .long { display: none; }
  #view-eligible .pager .short { display: inline; }
}
#view-excluded .asideline { margin: 0 0 12px; }

/* --- P1: the keyword box --- */
/* A 28 px tap target (P1 B), its extra height taken back by negative margins so the chip does not grow. */
.chip button.star { min-width: 28px; min-height: 28px; margin-top: -4px; margin-bottom: -4px; display: inline-flex; align-items: center; justify-content: center; }
p.kwbuilt { font-size: 12.5px; color: var(--ink); background: var(--accent-soft); border-radius: var(--radius); padding: 6px 9px; margin: 6px 0 0; }
.kwnotes p.kwnote { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 6px 9px; margin: 6px 0 0; }

/* --- P6: required details, field messages, the readiness block, the repeat note --- */
.field > label .req { color: var(--bad); text-transform: none; letter-spacing: 0; font-weight: 600; }
#authorList p.ferr { color: var(--bad); font-size: 12.5px; margin: 4px 0 0; }
#readyNeeded .needed { border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); border-radius: var(--radius); padding: 8px 10px; margin: 0 0 10px; }
#readyNeeded .needed .k { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--bad); margin: 0 0 4px; }
#readyNeeded .needed ul { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 3px; }
#readyNeeded .needed li { display: flex; gap: 6px; align-items: center; color: var(--bad); }
#repeatNote .repeat { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--radius); padding: 9px 11px; margin: 0 0 10px; font-size: 13px; border: 1px solid; }
#repeatNote .repeat.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
#repeatNote .repeat.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
#repeatNote .repeat p { margin: 4px 0; color: var(--ink-2); }
#repeatNote .runanyway { margin-top: 8px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--warn) 40%, transparent); }
#repeatNote .runanyway .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
#runHead .banner p.lead { font-weight: 600; color: var(--ink); }
#runHead .banner p.engine { font-size: 12.5px; }
#runHead .askagain { border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); border-radius: var(--radius); padding: 9px 11px; font-size: 13px; }
#runHead .askagain p { margin: 0 0 6px; }

/* --- 5.2.0 review fixes (Sage runs) --- */
/* "Sort:" before the sort buttons (critic). */
.toolbar .seglabel { font-size: 12.5px; color: var(--ink-2); margin-right: -4px; }
/* "Show here": a group's members under its first, set in a little. */
#slList > .rev.infold { margin-left: 22px; }
@media (max-width: 560px) { #slList > .rev.infold { margin-left: 8px; } }
/* P4 B: picked people the filters leave out — the line in the filter card, their cards above the list. */
details.fcard p.pickedout { margin: -4px 0 0; padding: 0 13px 11px; font-size: 13px; color: var(--warn); }
#slList > .pickedcards { border-left: 3px solid color-mix(in srgb, var(--warn) 55%, transparent); padding-left: 10px; margin: 0 0 14px; }
#slList > .pickedcards > h3.ghead { margin-top: 0; }
/* Phone: the spread panel and the run notes behind one "About this list". */
#slList > details.aboutlist { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 8px 10px; margin: 0 0 12px; }
#slList > details.aboutlist > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
#slList > details.aboutlist[open] > summary { margin-bottom: 8px; }
/* P2's chip: 3 numbers and "+N more" on a wide card, 2 and "+N" on a phone, so it never wraps inside the pill. */
.rev .sig button.cochip .ph { display: none; }
@media (max-width: 560px) {
  .rev .sig button.cochip .dk { display: none; }
  .rev .sig button.cochip .ph { display: inline; }
}

/* 5.3.2: a deliberate scroll inside a view (a card brought back after Minimize, the All eligible pager, "Jump to set
   aside", a focused field) lands below the sticky topbar + tabs (104 px) instead of under them. */
[id^="view-"] * { scroll-margin-top: 112px; }

/* 6.1.0 (drop 2, 08 #135): the round panel — beside the three lists of a run, sticky like the run list, every rule scoped
   under .workpanel. Below 1280 px it folds to a labelled stub (round + clock); opened there it lies over the list instead
   of squeezing the cards. */
.workpanel { width: 300px; flex: none; align-self: stretch; position: sticky; top: 49px; max-height: calc(100vh - 49px);
  overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--rule); background: var(--surface); font-size: 12.5px; color: var(--ink-2); }
.workpanel .wp { display: grid; gap: 14px; padding: 14px 16px 18px; }
/* 6.2.2 (the owner, 11-02: "use the space effectively … make Author list view and round R1|R2| headers fixed and inside
   shits can be scrollable"): wider where the list leaves room — the cards stop at 1060 px, so the panel takes what is left
   beside them, up to 420 px, and never squeezes them (.main keeps first claim, see .main) — and split in three: the heading
   with Invited, the authors, the rounds and the timer stay put; the picks, verdicts and notes scroll; Submit stays at the foot. */
/* Third look (the owner: "utilize some space horizontally"): a quarter of the window from 300 to 400 px — about 380 at 1512, the
   cards giving up some 80 px they can spare — and still the room they leave beyond that, up to 420. */
.workpanel { flex: 1000 0 clamp(300px, 25vw, 400px); max-width: 420px; top: var(--topbar-h, 49px); max-height: calc(100vh - var(--topbar-h, 49px)); }
.workpanel:not(.folded) { display: flex; flex-direction: column; }
.workpanel .wp.wp-split { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 0; }
.workpanel .wp-top { flex: none; display: grid; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--rule); }
.workpanel .wp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start;
  gap: 14px; padding: 12px 16px 14px; }
.workpanel .wp-bottom { flex: none; padding: 10px 16px 12px; border-top: 1px solid var(--rule); }
.workpanel .wp-bottom > .wp-sub { margin: 0; }
.workpanel .wp-head { display: flex; align-items: center; gap: 8px; }
.workpanel .wp-inv { margin-left: auto; display: inline-flex; align-items: baseline; gap: 6px; }
.workpanel .wp-inv b { font: 600 14px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.workpanel .wp-inv.cap-near b, .workpanel .wp-inv.cap-full b { color: var(--warn); }
/* The meter and its notes ("+6 picked, not sent yet", "escalate (40+)") share one line. */
.workpanel .wp-cap { display: flex; align-items: center; gap: 8px; }
.workpanel .wp-cap .wp-meter { flex: 1 1 auto; }
.workpanel .wp-capline { display: flex; align-items: baseline; gap: 8px; margin-top: 0; font-size: 11.5px; white-space: nowrap; }
.workpanel .wp-capline .wp-notsent { margin: 0; }
.workpanel .wp-head h2 { margin: 0; font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.workpanel .wp-head .wp-fold { font-size: 15px; line-height: 1; padding: 2px 8px; }
.workpanel .wp-k { font: 600 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.workpanel .wp-caprow { display: flex; align-items: baseline; gap: 8px; }
.workpanel .wp-caprow b { font: 600 15px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.workpanel .wp-capnote { margin-left: auto; font-size: 11.5px; font-weight: 600; }
.workpanel .wp-meter { height: 5px; margin-top: 0; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.workpanel .wp-meter i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.workpanel .cap-near .wp-meter i, .workpanel .cap-full .wp-meter i { background: var(--warn); }
/* 6.2.2: the authors as entered before the search, at the top of the panel — to check a pick against them by eye. A calm
   card (second look, the owner: "visually looks clumsy"): a heading row (Authors, the count, the flags, a fold chevron); one
   row per author — initials in a circle (blue for the corresponding author, who also carries the word), the name and its
   flag on one line, the affiliation whole and quieter under it, a hairline between rows; three rows, then "+N more". */
.workpanel .wp-authors { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); overflow: hidden; }
.workpanel .wp-authors > summary { display: flex; align-items: center; gap: 7px; padding: 8px 10px; cursor: pointer; list-style: none; }
.workpanel .wp-authors > summary::-webkit-details-marker { display: none; }
.workpanel .wp-authors > summary:hover { background: var(--surface-2); }
.workpanel .wp-au-count { font: 600 11px/1.6 var(--sans); color: var(--ink-2); background: var(--surface-2); border-radius: 100px; padding: 0 7px; }
.workpanel .wp-authors .wp-au-flags { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
/* "Manuscript authors" stays one line; with four flags it needs about 270 px, so a narrower card (the 300 px panel, 245 px
   inside) shows two flags and "+N". */
.workpanel .wp-authors > summary .wp-k { white-space: nowrap; }
.workpanel .wp-authors { container: wpauthors / inline-size; }
.workpanel .wp-au-fmore { display: none; font: 600 10.5px var(--sans); color: var(--ink-3); }
@container wpauthors (max-width: 300px) {
  .workpanel .wp-au-flags .flag:nth-of-type(n+3) { display: none; }
  .workpanel .wp-au-fmore { display: inline; }
}
.workpanel .wp-au-chev { display: inline-flex; color: var(--ink-3); transition: transform .15s; }
.workpanel .wp-authors[open] > summary .wp-au-chev { transform: rotate(180deg); }
.workpanel .wp-au-list { margin: 0; padding: 0 10px; list-style: none; }
.workpanel .wp-au { border-top: 1px solid var(--rule); }
.workpanel .wp-authors:not(:has(.wp-au-more[open])) .wp-au-extra { display: none; }
/* Third look ("took the whole block"): two lines a row — the name, then the institution and its place on one line; a click
   opens the affiliation whole under it. */
.workpanel .wp-au-row > summary { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 0;
  cursor: pointer; list-style: none; }
.workpanel .wp-au-row > summary::-webkit-details-marker { display: none; }
.workpanel .wp-au-av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 9.5px var(--sans);
  letter-spacing: .02em; color: var(--ink-2); background: var(--surface-2); }
.workpanel .wp-au.wp-au-lead .wp-au-av { color: var(--on-accent); background: var(--accent); }
.workpanel .wp-au-text { display: grid; min-width: 0; }
.workpanel .wp-au-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.workpanel .wp-au-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12.5px/1.35 var(--sans); color: var(--ink); }
.workpanel .wp-au-tag { flex: none; padding: 0 6px; border-radius: 100px; font: 600 10px/1.7 var(--sans); letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); }
.workpanel .wp-au-line .flag { margin-left: auto; flex: none; }
.workpanel .wp-au-aff { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px;
  line-height: 1.4; color: var(--ink-2); }
.workpanel .wp-au-row[open] .wp-au-aff { color: var(--ink-3); }
.workpanel .wp-au-full { margin: 0 0 7px 30px; font-size: 11.5px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.workpanel .wp-au-none { color: var(--ink-3); font-style: italic; }
.workpanel .wp-au-more { border-top: 1px solid var(--rule); }
.workpanel .wp-au-more > summary { padding: 6px 10px 7px 45px; cursor: pointer; list-style: none; font-size: 12px; color: var(--accent); }
.workpanel .wp-au-more > summary::-webkit-details-marker { display: none; }
.workpanel .wp-au-more > summary:hover { background: var(--surface-2); }
.workpanel .wp-au-more:not([open]) .wp-au-hide, .workpanel .wp-au-more[open] .wp-au-show { display: none; }
.workpanel .cap-near .wp-capnote, .workpanel .cap-full .wp-capnote, .workpanel .cap-full .wp-caprow b { color: var(--warn); }
/* 6.2.0 (decision 4 A): the open round's picks, apart from the invited count */
.workpanel .wp-notsent { margin-top: 3px; font-size: 11.5px; color: var(--ink-3); }

.workpanel .wp-rounds { display: grid; gap: 6px; }
.workpanel .wp-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.workpanel .wp-round { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 5px 0;
  border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--surface); font: 600 12px var(--sans); color: var(--ink-2); cursor: pointer; }
.workpanel .wp-round:hover { border-color: var(--ink-3); }
.workpanel .wp-round.st-busy::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.workpanel .wp-round.st-submitted { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--rule-2)); background: var(--ok-soft); }
.workpanel .wp-round.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.workpanel .wp-round.on.st-submitted { background: var(--ok); border-color: var(--ok); }
.workpanel .wp-round.on.st-busy::after { background: var(--on-accent); }

/* 6.2.2: the timer in one row (it was a 26 px clock over a state line in a padded box). */
.workpanel .wp-timer { display: grid; gap: 2px; padding: 5px 6px 5px 9px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.workpanel .wp-timer.on { border-color: color-mix(in srgb, var(--ok) 45%, var(--rule)); }
.workpanel .wp-timerrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.workpanel .wp-timerrow > .ico { color: var(--ink-3); }
.workpanel .wp-timer.on .wp-timerrow > .ico { color: var(--ok); }
.workpanel .wp-timerrow .wp-state { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workpanel .wp-timerrow .wp-go { flex: none; }
.workpanel .wp-clock { font: 600 16px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.workpanel .wp-clock.on { color: var(--ok); }
.workpanel .wp-state, .workpanel .wp-sub { margin: 0; font-size: 12px; color: var(--ink-3); }
.workpanel .wp-state.on { color: var(--ok); font-weight: 600; }
.workpanel .wp-paused { color: var(--warn); }

.workpanel .wp-picks { display: grid; gap: 6px; }
.workpanel .wp-ro { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ok); }
.workpanel .wp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.workpanel .wp-table td { padding: 5px 3px; border-top: 1px solid var(--rule); vertical-align: top; }
.workpanel .wp-table tr:last-child td { border-bottom: 1px solid var(--rule); }
.workpanel .wp-table .wp-n { width: 28px; padding-right: 6px; text-align: right; font: 500 11.5px var(--mono); color: var(--ink-3); }
.workpanel .wp-who { min-width: 0; }
.workpanel .wp-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.workpanel .wp-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; text-align: left; font: 600 12.5px var(--sans); color: var(--ink);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workpanel .wp-name:hover { color: var(--accent); text-decoration: underline; }
.workpanel .wp-meta { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
/* The country keeps its room; "by …" gives way first. */
.workpanel .wp-cty { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.workpanel .wp-cty > span { overflow: hidden; text-overflow: ellipsis; }
.workpanel .wp-meta .wp-by { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.workpanel .wp-mail { display: inline-flex; flex: none; color: var(--ink-3); }
.workpanel .wp-mail.lvl-ok { color: var(--ok); }
.workpanel .wp-mail.lvl-warn { color: var(--warn); }
.workpanel .wp-mail.lvl-bad { color: var(--bad); }
.workpanel .wp-v { flex: none; display: inline-block; padding: 1px 7px; border: 1px solid var(--rule-2); border-radius: 100px; font: 500 11px var(--sans); white-space: nowrap; color: var(--ink-3); }
.workpanel .wp-v.v-ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.workpanel .wp-v.v-not_suitable { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.workpanel .wp-v.v-unsure { color: var(--ink-2); background: var(--surface-2); }
.workpanel .wp-table .wp-x { width: 24px; text-align: right; }
.workpanel .wp-rm { display: inline-flex; padding: 3px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.workpanel .wp-rm:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.workpanel .wp-rm:disabled { opacity: .35; cursor: not-allowed; }
.workpanel .wp-empty { margin: 0; font-size: 12px; color: var(--ink-3); }

.workpanel .wp-counts { margin: 0; font-size: 12px; line-height: 1.6; }
.workpanel .wp-counts .c-ok { color: var(--ok); }
.workpanel .wp-counts .c-ns { color: var(--warn); }
.workpanel .wp-counts .c-nj { color: var(--ink-3); }

.workpanel .wp-submit .wp-submitbtn { width: 100%; justify-content: center; }
.workpanel .wp-done { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); border-radius: var(--radius); background: var(--ok-soft); }
.workpanel .wp-donehead { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ok); }
.workpanel .wp-done .wp-next { justify-self: start; margin-top: 4px; }

.workpanel .wp-foot { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--rule); }
.workpanel .wp-others { margin: 0; display: flex; align-items: center; gap: 4px; color: var(--accent); }
.workpanel .wp-foot .btn { justify-self: start; }
.workpanel .wp-alloc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.workpanel .wp-alloc input { width: auto; padding: 2px 6px; font: 12.5px var(--sans); border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.workpanel .wp-alloc .wp-by { color: var(--ink-3); }
.workpanel .wp-down { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--warn); }

/* Folded: a labelled stub with the round and the clock, like the run list's. */
.workpanel.folded { width: 52px; flex: none; max-width: none; overflow: hidden; }
.workpanel .wp-stub { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; min-height: 100%; padding: 14px 0;
  border: 0; background: none; cursor: pointer; color: var(--ink-3); font: 500 11px var(--sans); }
.workpanel .wp-stub:hover { background: var(--surface-2); color: var(--ink); }
.workpanel .wp-stub .wp-chev { font-size: 15px; line-height: 1; }
.workpanel .wp-stubround { padding: 3px 6px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: 700 12px var(--sans); }
.workpanel .wp-stubround.sub { background: var(--ok); }
.workpanel .wp-stub .wp-stubclock { writing-mode: vertical-rl; font: 600 12px var(--mono); color: var(--ink); }
.workpanel .wp-stub .wp-stubclock.on { color: var(--ok); }
.workpanel .wp-stubcap { padding: 1px 4px; border: 1px solid var(--rule-2); border-radius: 999px; font: 11px var(--mono); }
.workpanel .wp-stubcap.cap-near, .workpanel .wp-stubcap.cap-full { color: var(--warn); border-color: var(--warn); }
.workpanel .wp-stublab { writing-mode: vertical-rl; text-transform: uppercase; letter-spacing: .1em; }

/* Narrow windows: opened, the panel lies over the list instead of squeezing the cards. */
@media (max-width: 1279px) {
  .workpanel:not(.folded) { position: fixed; top: var(--topbar-h, 49px); right: 0; bottom: 0; max-height: none; z-index: 25; box-shadow: -8px 0 24px rgba(28, 26, 23, .12); }
}
@media (max-width: 640px) {
  .workpanel:not(.folded) { width: min(100vw, 340px); }
}

/* 6.2.2 (the owner, 11-02: "for shortlisted mark … different color, may be green … to imply its done and dusted"): picked reads
   green — blue stays the colour of doing. This round's pick is a green button that can take the pick off; an earlier round's
   pick (invited already) is a solid green stamp, not a button. */
.rev .foot .btn.sl-on, .elrow .btn.sl-on { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, var(--rule-2)); font-weight: 600; }
.rev .foot .btn.sl-on:hover:not(:disabled), .elrow .btn.sl-on:hover:not(:disabled) { border-color: var(--ok); }
.rev .foot .sl-done, .elrow .sl-done { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 100px;
  font: 600 12.5px var(--sans); white-space: nowrap; color: var(--surface); background: var(--ok); cursor: default; }

/* A row in All eligible brought up from the panel; a submitted round's Feedback panel says it reads only. */
.elrow.flash { outline: 3px solid var(--accent); outline-offset: 2px; }
.rev .fbk .fbk-lock { margin: 0; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ok); }

/* The Feedback button on a card or an All eligible row, coloured by the editor's own verdict. Not red: in this portal
   red means an error, and "not suitable" is a judgement. */
.rev .fbk-btn.v-ok, .elrow .fbk-btn.v-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--rule-2)); background: var(--ok-soft); }
.rev .fbk-btn.v-not_suitable, .elrow .fbk-btn.v-not_suitable { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--rule-2)); background: var(--warn-soft); }
.rev .fbk-btn.v-unsure, .elrow .fbk-btn.v-unsure { color: var(--ink-2); background: var(--surface-2); }
.rev .fbk-btn .fbk-n { font: 600 11px var(--sans); color: var(--accent); }
.elrow .c.act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Earlier rounds that picked this person, above the card's foot. */
.rev .rmarks { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 16px 0; }
.rev .rmarks .rmark { font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* The panel under a card's foot, and the note at the end of the shortlist (scoped to its view — review, finding 17): the same parts. */
.rev .fbk, #view-shortlist .snote { display: grid; gap: 9px; padding: 11px 16px 13px; border-top: 1px dashed var(--rule-2); font-size: 13px; }
#view-shortlist .snote { margin: 14px 0 6px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
#view-shortlist .snote h4 { margin: 0; font: 600 15px var(--serif); color: var(--ink); }
.rev .fbk .wb-k, #view-shortlist .snote .wb-k { font: 600 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rev .fbk .fbk-row, .rev .fbk .fbk-reasons, #view-shortlist .snote .fbk-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rev .fbk .fbk-v, #view-shortlist .snote .fbk-v, .rev .fbk .fbk-r { padding: 4px 11px; border: 1px solid var(--rule-2); border-radius: 100px; background: var(--surface);
  font: 500 12.5px var(--sans); color: var(--ink-2); cursor: pointer; }
.rev .fbk .fbk-r { padding: 2px 9px; font-size: 12px; }
.rev .fbk .fbk-v.on, #view-shortlist .snote .fbk-v.on, .rev .fbk .fbk-r.on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.rev .fbk .fbk-v.v-ok.on, #view-shortlist .snote .fbk-v.u-useful.on { background: var(--ok); border-color: var(--ok); }
.rev .fbk .fbk-v.v-not_suitable.on, #view-shortlist .snote .fbk-v.u-not_useful.on { background: var(--warn); border-color: var(--warn); }
.rev .fbk .fbk-v.v-unsure.on, #view-shortlist .snote .fbk-v.u-partly.on { background: var(--ink-3); border-color: var(--ink-3); }
.rev .fbk .fbk-note, #view-shortlist .snote .fbk-note { display: grid; gap: 4px; }
.rev .fbk .fbk-note textarea, #view-shortlist .snote .fbk-note textarea { width: 100%; font: 13px var(--sans); padding: 6px 8px; border: 1px solid var(--rule-2);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); resize: vertical; }
.rev .fbk .fbk-actions, #view-shortlist .snote .fbk-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rev .fbk .fbk-others, #view-shortlist .snote .fbk-others { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; color: var(--ink-2); font-size: 12.5px; }
.rev .fbk .fbk-at { color: var(--ink-3); }

/* ---------------------------------------------------------------------------------------
   6.5.0 — loading you can see (the owner, 11-12: "smoothing loading feel … where ever required … dnt expect me to point
   everywhere"). busy.js: the progress pointer at once while something the editor asked for loads (every screen, through
   api.js); after 120 ms a thin bar runs along the top. A run being opened dims the one being left; a tab eases in; the round
   panel stands in its place with "Loading rounds…"; the Playground's boxes ease back while a manuscript loads. With reduced
   motion nothing moves, and every signal is still shown.
   --------------------------------------------------------------------------------------- */
html.is-busy, html.is-busy * { cursor: progress !important; }
#busyBar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  background-image: linear-gradient(90deg, transparent, var(--accent), transparent); background-repeat: no-repeat;
  background-size: 35% 100%; background-position: -40% 0; }
html.is-busy-bar #busyBar { opacity: 1; animation: busy-bar 1.1s ease-in-out infinite; }
@keyframes busy-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
/* 6.5.0 (the 11-10 audit, P4: CLS 0.41 when a run opened slowly — the run being left stayed until the new one was in, then
   the page swapped under the reader): a clicked manuscript is shown at once — its id and title in the strip, "Opening …" where
   its lists will be, the round panel's "Loading rounds…" — and nothing that is on screen moves when the run arrives. The tabs
   wait, dimmed, with "…" for their counts. (Was: the run being left dimmed until the new one was in.) */
main.main.opening .view.on { display: none; }
main.main.opening .tabs { opacity: .55; pointer-events: none; }
.runopening { display: grid; gap: 10px; padding: 18px 2px 8px; max-width: 560px; }
.runopening .wp-wait.bad { color: var(--ink); }
.runopening .wp-wait.bad .ico { color: var(--bad); }
.runopening .btn { justify-self: start; }
.runctx .ctx-meta .ctx-loading { color: var(--ink-3); }
.view.on.ease-in { animation: view-ease-in .18s ease-out; }
@keyframes view-ease-in { from { opacity: .3; } to { opacity: 1; } }
.wp.wp-loading { padding: 14px 16px; display: grid; gap: 10px; }
.wp.wp-loading .wp-wait, .runopening .wp-wait { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.wp.wp-loading .wp-dot, .runopening .wp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: wp-pulse 1s ease-in-out infinite; }
@keyframes wp-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.wp.wp-loading .wp-skel, .runopening .wp-skel { display: block; height: 10px; border-radius: 5px; background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 35%, transparent), var(--accent-soft));
  animation: wp-shimmer 1.2s linear infinite; }
.wp.wp-loading .wp-skel.short, .runopening .wp-skel.short { width: 60%; }
@keyframes wp-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.playground .pg-loading { opacity: .45; transition: opacity .15s ease; }
@media (prefers-reduced-motion: reduce) {
  html.is-busy-bar #busyBar { animation: none; background-image: none; background-color: var(--accent); opacity: .55; }
  .view.on.ease-in, .wp.wp-loading .wp-dot, .wp.wp-loading .wp-skel, .runopening .wp-dot, .runopening .wp-skel { animation: none; }
  .playground .pg-loading { transition: none; }
}

/* ---------------------------------------------------------------------------------------------------------------
   6.2.0 — the front doors (home.js): the work list, the dashboard, the per-editor stat view, the manuscript page.
   Everything is scoped under .home, .topnav or .homemark: today's screens keep every rule they had. While a front
   door is open, today's page is hidden (not changed) and comes back as it was.
   --------------------------------------------------------------------------------------------------------------- */
body.at-home .shell > .body { display: none; }
/* 6.2.2: the header's front doors are tabs — Home | Work list | Dashboard — drawn like today's view tabs (an underline on the
   one you are in) and as tall as the header, so the underline sits on its bottom rule. The header keeps its height: the view
   tabs stick right below it. */
.topnav { display: flex; align-self: stretch; gap: 2px; margin: -10px 0 -10px 18px; }
.topnav a { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 2px solid transparent;
  font: 14px var(--sans); color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.topnav a .ico { opacity: .65; }
.topnav a[aria-current="page"] .ico { opacity: 1; color: var(--accent); }
.topnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 6px; }
/* The product mark (icon + name) as one piece, spaced as before; where it leads Home (home.js gives it an address) it says so
   on hover. Without an address it is plain text, as it always was. */
.homemark { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
.homemark[href] { cursor: pointer; }
.homemark[href]:hover h1 { color: var(--accent); }
/* Narrower windows: the header stays one line down to 1180 px, as it did before the tabs. Below 1366 px the tabs keep their
   words and drop their icons; below 1280 px, while the tabs are shown, the engine chip keeps its state ("engine ok") and
   leaves out its version and build (its tooltip still names the engine and version). Where there are no tabs (the Sage
   copy) the chip is as before. */
@media (max-width: 1365px) {
  .topnav a { padding: 0 9px; }
  .topnav a .ico { display: none; }
}
@media (max-width: 1279px) {
  .topnav:not([hidden]) ~ .mode .mode-more { display: none; }
}
/* 6.3.0: a fourth tab (Playground, for the named accounts) needs that room sooner — measured on the demo at 1280 px, the chip
   wrapped onto two lines. Only where the fourth tab shows; everyone else's header is as before. */
@media (max-width: 1440px) {
  .topnav:has(#playTab:not([hidden])) ~ .mode .mode-more { display: none; }
}
/* …and below 1280 px the product name drops its subtitle and the four tabs sit a little closer, so the header stays one line
   down to 1180 px (measured on the demo: 90 px short at 1180 without this). */
@media (max-width: 1279px) {
  .topbar:has(#playTab:not([hidden])) #portalSub { display: none; }
  .topnav:has(#playTab:not([hidden])) a { padding: 0 7px; }
}
/* …and below 1180 px the signed-in name gives way (Sign out stays): measured on the demo at 1000 px, the header ran 58 px past
   the window. Only where the fourth tab shows. */
@media (max-width: 1179px) {
  .topbar:has(#playTab:not([hidden])) #sessionName { display: none; }
}
@media (max-width: 900px) {
  .topnav { margin-left: 8px; }
  .topnav a { padding: 0 7px; }
}
@media (max-width: 800px) {
  .topnav a { padding: 0 5px; font-size: 13px; }
}
@media (max-width: 560px) {
  .homemark { gap: 12px; }
  .topnav { align-self: center; margin: 0; }
  .topnav a { padding: 6px 8px; }
}

.home { padding: 18px 24px 48px; }
.home .home-wrap { max-width: 1480px; margin: 0 auto; display: grid; gap: 14px; container: home / inline-size; }
/* a grid child may shrink below its content, so a wide table scrolls inside its own box, never the page (seen at 1512 px) */
.home .home-wrap > *, .home .home-dash, .home .home-stats, .home .home-ms, .home .home-work { min-width: 0; }
.home .home-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.home .home-muted { color: var(--ink-3); font-size: 12px; }
.home .home-error, .home .home-bad { color: var(--bad); font-size: 13px; }
.home .home-mono { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.home .home-lnk { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.home select { width: auto; max-width: 280px; font: 13px var(--sans); padding: 4px 6px; border: 1px solid var(--rule-2); border-radius: 6px;
  background: var(--paper); color: var(--ink); }
/* a label sits beside its control, on one line (the global select is full width) */
.home .home-toolbar label, .home .home-filters label, .home .home-period label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.home .home-pill { display: inline-block; font-size: 11.5px; line-height: 1.6; border: 1px solid var(--rule); border-radius: 999px; padding: 0 8px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.home .home-pill.t-prog { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.home .home-pill.t-paus { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.home .home-pill.t-subm { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.home .home-pill.t-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
/* 6.2.2: a round submitted with nobody picked needs the next round — amber, as a paused one */
.home .home-pill.t-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* the big find box: the portal's main action stays first (mock v4) */
.home .home-big { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.home .home-bigrow { display: flex; gap: 8px; flex-wrap: wrap; }
.home .home-bigrow input { flex: 1 1 320px; min-width: 0; width: auto; font: 15px var(--sans); padding: 9px 12px; border: 1px solid var(--rule-2);
  border-radius: 8px; background: var(--paper); color: var(--ink); }
.home .home-hint { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home .home-needs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.home .home-need { font: 13px var(--sans); border: 1px solid var(--rule); background: var(--surface); border-radius: 999px; padding: 3px 10px;
  cursor: pointer; color: var(--ink); white-space: nowrap; }
.home .home-need[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.home .home-need.t-prog b { color: var(--accent); }
.home .home-need.t-paus b, .home .home-need.t-warn b { color: var(--warn); }
.home .home-need.t-subm b { color: var(--ok); }
.home .home-need.t-bad b { color: var(--bad); }
.home .home-toolbar { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.home .home-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.home .home-segbtn { border: 0; background: var(--surface); padding: 5px 12px; font: 13px var(--sans); cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.home .home-segbtn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* the work list's rows */
.home .home-list, .home .home-group { display: grid; gap: 8px; }
.home .home-list { gap: 18px; }
.home .home-grouphead { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.home .home-grouphead h3 { font: 600 15px var(--serif); margin: 0; }
.home .home-grouphead span { font-size: 12px; color: var(--ink-3); }
.home .home-row { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.home .home-row.mine { border-left: 3px solid var(--accent); }
.home .home-rowmain { display: grid; grid-template-columns: 24px minmax(240px, 2.2fr) minmax(180px, 1.2fr) minmax(180px, 1.5fr) max-content;
  gap: 12px; align-items: start; padding: 10px 12px; }
.home .home-chev { border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--ink-3); padding: 2px 0; }
.home .home-who { display: grid; gap: 3px; min-width: 0; }
.home .home-msid { font: 600 13px var(--mono); }
.home .home-ttl { font-size: 14px; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home .home-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.home .home-state { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.home .home-cap { display: grid; gap: 3px; font-size: 12px; color: var(--ink-2); }
.home .home-cap b { font: 600 13px var(--sans); color: var(--ink); }
.home .home-bar { display: block; width: 120px; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.home .home-bar i { display: block; height: 100%; background: var(--accent); }
.home .home-cap.near .home-bar i { background: var(--warn); }
.home .home-esc { margin-left: 6px; color: var(--warn); font-weight: 600; }
.home .home-picks { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12.5px; min-width: 0; }
.home .home-pchip { border: 1px solid var(--rule); border-radius: 6px; padding: 1px 7px; background: var(--paper); white-space: nowrap; }
.home .home-pchip.o { border-color: var(--ok); }
.home .home-pchip.x { border-color: var(--bad); }
.home .home-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.home .home-acts .btn { white-space: nowrap; }
.home .home-acts.left { justify-content: flex-start; }
.home .home-more { border-top: 1px solid var(--rule); padding: 10px 12px 12px 48px; display: grid; gap: 10px; font-size: 13px; }
@container home (max-width: 1180px) {
  .home .home-rowmain { grid-template-columns: 24px minmax(0, 1.4fr) minmax(0, 1fr); }
  .home .home-picks, .home .home-acts { grid-column: 2 / -1; }
  .home .home-acts { justify-content: flex-start; }
}
@container home (max-width: 720px) {
  .home .home-rowmain { grid-template-columns: 24px minmax(0, 1fr); }
  .home .home-state { grid-column: 2; }
  .home .home-more { padding-left: 12px; }
}

/* tables: the dashboard, the stat view, the picks */
.home .home-tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.home .home-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.home .home-table th { text-align: left; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3);
  padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--surface-2); }
.home .home-table td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.home .home-table tbody tr:last-child td { border-bottom: 0; }
.home .home-table .n { text-align: right; }
.home .home-table .num { font-variant-numeric: tabular-nums; }
.home .home-table .nw { white-space: nowrap; }
.home .home-dashtable td .home-ttl { max-width: 340px; font-size: 12.5px; color: var(--ink-2); -webkit-line-clamp: 1; }
.home .home-click { cursor: pointer; }
.home .home-click:hover td { background: var(--surface-2); }
.home .home-click:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.home .home-eds span { display: block; white-space: nowrap; font-size: 12.5px; }
.home .home-two { display: grid; }
.home .home-two small { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.home .home-vd { white-space: nowrap; font-size: 12.5px; }
.home .home-vd .o, .home .home-verdicts .o { color: var(--ok); }
.home .home-vd .x, .home .home-verdicts .x { color: var(--bad); }
.home .home-vd .u, .home .home-verdicts .u { color: var(--warn); }
/* the dashboard's 13 columns fit 1440 px and up: figures may take two lines inside their cell (measured 1595 px at 1512 before) */
.home .home-dashtable .home-vd, .home .home-dashtable .home-eds span, .home .home-dashtable .home-two small { white-space: normal; }
.home .home-dashtable .home-cap .home-bar { width: 84px; }
.home .home-foot { display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); padding: 6px 2px; }

/* the dashboard and the stat view */
.home .home-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.home .home-tab { border: 0; background: none; padding: 8px 12px; font: 14px var(--sans); color: var(--ink-2); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.home .home-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.home .home-filters, .home .home-period { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; }
.home .home-pick { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.home .home-pick input[type=date] { width: auto; font: 13px var(--sans); padding: 3px 6px; border: 1px solid var(--rule-2); border-radius: 6px;
  background: var(--paper); color: var(--ink); }
.home .home-findsm { width: 200px; font: 13px var(--sans); padding: 5px 9px; border: 1px solid var(--rule-2); border-radius: 6px;
  background: var(--paper); color: var(--ink); }
.home .home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home .home-tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: grid;
  gap: 4px; align-content: start; min-width: 0; }
.home .home-v { font: 26px/1.1 var(--serif); }
.home .home-reasons { display: grid; gap: 5px; font-size: 12.5px; }
.home .home-reasons > div { display: flex; justify-content: space-between; gap: 8px; }
.home .home-reasons > div > span:first-child { display: grid; flex: 1; min-width: 0; }
.home .home-reasons i { display: block; height: 4px; background: var(--bad); opacity: .45; border-radius: 2px; margin-top: 2px; }
@container home (max-width: 900px) { .home .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home .home-lock { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.home .home-okbar { display: grid; gap: 2px; }
.home .home-okbar .home-bar { width: 90px; }
.home .home-okbar .home-bar i { background: var(--ok); }
.home .home-bench { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 0; max-width: 920px; }

/* the manuscript page */
.home .home-back { border: 0; background: none; color: var(--accent); cursor: pointer; font: 13px var(--sans); padding: 0; justify-self: start; }
.home .home-ms, .home .home-mshead { display: grid; gap: 14px; }
.home .home-mshead { gap: 6px; }
.home .home-mshead h2 { font: 600 20px/1.25 var(--serif); margin: 0; }
.home .home-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.home .home-rounds { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.home .home-rnd { border: 1px solid var(--rule); background: var(--surface); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px;
  text-align: left; cursor: pointer; font: 12px var(--sans); color: var(--ink-2); min-width: 0; }
.home .home-rnd b { font: 600 14px var(--sans); color: var(--ink); }
.home .home-rnd[aria-checked="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.home .home-rnd.st-submitted { background: var(--ok-soft); }
.home .home-rnd:disabled { opacity: .55; cursor: default; }
.home .home-twocol { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.home .home-col { display: grid; gap: 14px; min-width: 0; }
.home .home-box { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: grid;
  gap: 10px; min-width: 0; }
.home .home-box h3 { margin: 0; font: 600 15px var(--serif); }
.home .home-hd { display: flex; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; align-items: baseline; }
.home .home-listx { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.home .home-listx li { display: grid; gap: 2px; }
.home .home-meta { font-size: 12px; color: var(--ink-3); }
.home .home-note { color: var(--ink-2); font-style: italic; }
.home .home-verdicts { display: grid; gap: 3px; font-size: 12.5px; }
.home .home-tally { display: grid; gap: 6px; font-size: 12.5px; }
.home .home-tally > div { display: grid; grid-template-columns: minmax(120px, 240px) minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.home .home-tally i { display: block; height: 6px; background: var(--bad); opacity: .45; border-radius: 3px; }
.home .home-tally i.okc { background: var(--ok); opacity: 1; }
.home .home-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; max-height: 360px; overflow: auto; }
.home .home-timeline li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.home .home-timeline li span:first-child { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
@container home (max-width: 1000px) { .home .home-twocol { grid-template-columns: minmax(0, 1fr); } }
@container home (max-width: 760px) { .home .home-rounds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }


/* ---------------------------------------------------------------------------------------------------------------------
   6.3.0 — the Playground (playground.js): keywords and the MeSH subject from a title and an abstract. Every rule is scoped
   under .playground (classes pg-…), so today's screens keep every rule they had. Today's page below is hidden while it
   shows (body.at-home, as for the work list).
   --------------------------------------------------------------------------------------------------------------------- */
.playground { padding: 18px 24px 48px; }
/* Up to 1,840 px, so on a wide screen a card is wide enough to set the keywords and the subject side by side (1,100 px). */
.playground .pg-wrap { max-width: 1840px; margin: 0 auto; display: grid; gap: 14px; }
.playground .pg-head h2 { font-family: var(--serif); font-size: 22px; margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.playground .pg-head h2 small { font: 13px var(--sans); color: var(--ink-3); }
.playground .pg-grid { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.playground .pg-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.playground .pg-muted { color: var(--ink-3); font-size: 12px; }
.playground .pg-err { margin: 0; color: var(--bad); font-size: 13px; }
.playground .pg-lnk { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.playground .pg-chip { font-size: 11.5px; line-height: 1.6; border-radius: 999px; padding: 0 8px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.playground .pg-chip.pg-typed { background: var(--surface-2); color: var(--ink-2); }

/* The text and the options: one column that stays in view while the runs scroll. */
.playground .pg-in { position: sticky; top: calc(var(--topbar-h, 49px) + 12px); display: grid; gap: 7px; align-content: start;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px;
  max-height: calc(100vh - var(--topbar-h, 49px) - 72px); overflow: auto; container: pgin / inline-size; }
/* The cap counts the page title above the panel (36 px): before the page scrolls the panel's foot — Run all — is still on screen. */
/* Each box under its label (the owner, 11-05: "where the labels for input fields are missing?"), its count on the label's right;
   the boxes grow with their text, then scroll (playground.js fit()). */
.playground .pg-field { display: grid; gap: 3px; min-width: 0; }
.playground .pg-flabel { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.playground .pg-fmeta { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.playground .pg-fmeta.pg-near { color: var(--warn); }
.playground .pg-in textarea { font: 13px/1.45 var(--sans); background: var(--surface); resize: none; overflow-y: auto; }
.playground .pg-in #pgTitle { min-height: 0; max-height: 7.4em; font-weight: 600; }
/* Its cap keeps the whole panel on screen before the page scrolls (measured at 1512 × 690 with a manuscript picked). */
.playground .pg-in #pgAbstract { min-height: 120px; max-height: max(120px, calc(100vh - 520px)); }
/* The person's keywords: the search form's chips (.chips/.chip/.star, global), here capped and scrolling past a few rows. */
.playground .pg-chips { max-height: 7.8em; overflow-y: auto; align-content: flex-start; background: var(--surface); cursor: text; }
.playground .pg-chips .chip { cursor: default; }
/* The manuscript row: the label, a picker that opens BELOW it (ids only), Clear at the far end. */
.playground .pg-srcrow { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; } /* 6.5.0: the picker's panel spans the row */
.playground .pg-srcrow .pg-lnk { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12.5px; }
.playground .pg-pick { position: relative; min-width: 0; }
.playground .pg-pickbtn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 168px; padding: 4px 10px;
  border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 13px var(--sans); cursor: pointer;
  font-variant-numeric: tabular-nums; }
.playground .pg-pickbtn:hover { border-color: var(--ink-3); }
.playground .pg-pickbtn[aria-expanded="true"] { border-color: var(--accent); }
/* 6.5.0: the picker opens a panel below itself — the find box, the journals as chips, the list (ids only; journal · day on the right). */
.playground .pg-pick:has(.pg-pickpanel) { position: static; }
/* The text panel scrolls (its run bar sticks to its foot); while the picker is open its panel may reach past that foot. */
.playground .pg-in:has(.pg-pickpanel:not([hidden])) { overflow: visible; }
.playground .pg-pickpanel { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; min-width: 0; padding: 8px;
  display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--rule-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.playground .pg-pickpanel[hidden] { display: none; }
.playground .pg-find { width: 100%; font: 13px var(--sans); padding: 6px 10px; border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.playground .pg-find:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
.playground .pg-jchips { display: flex; flex-wrap: wrap; gap: 5px; }
.playground .pg-jchip { font: 12px var(--sans); padding: 2px 9px; border-radius: 100px; border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.playground .pg-jchip .pg-jn { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.playground .pg-jchip:hover { border-color: var(--accent); }
.playground .pg-jchip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); font-weight: 600; }
.playground .pg-picklist { position: static; max-height: 280px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.playground .pg-picklist:focus { outline: none; }
.playground .pg-pickopt { display: flex; justify-content: space-between; gap: 12px; padding: 4px 10px; border-radius: 4px; font-size: 13px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.playground .pg-pickopt .pg-pmeta { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.playground .pg-pickmore { margin: 0; font-size: 12px; color: var(--ink-3); }
.playground .pg-pickopt.pg-own { color: var(--ink-2); }
.playground .pg-pickopt[aria-selected="true"] { font-weight: 600; color: var(--accent); }
.playground .pg-pickopt.pg-active, .playground .pg-pickopt:hover { background: var(--accent-soft); }
.playground .pg-iconbtn { padding: 4px 8px; justify-content: center; gap: 0; }
.playground .pg-iconbtn .ico { opacity: .85; }
.playground .pg-opts { border: 1px solid var(--rule); border-radius: var(--radius); padding: 6px 10px 10px; margin: 4px 0 0; display: grid; gap: 8px; min-width: 0; }
.playground .pg-opts legend { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 0 4px; }
.playground .pg-opt { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }
.playground .pg-opt select { padding: 4px 6px; font-size: 13px; background: var(--surface); }
.playground .pg-off { color: var(--ink-3); font-size: 12.5px; }
/* The three actions in ONE row (short labels; the tooltips say the rest), sticking to the foot of the panel if it scrolls. Run all,
   the primary one, takes the room left and always looks primary; while a run goes it spins instead of greying out. */
.playground .pg-gobar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; position: sticky; bottom: 0; z-index: 1;
  background: var(--surface); padding: 4px 0 0; }
.playground .pg-gobar > .btn.primary { justify-content: center; font-size: 15px; padding: 8px 12px; gap: 8px; white-space: nowrap; min-width: 0; }
.playground .pg-gobar > .btn:not(.primary) { font-size: 13px; padding: 8px 10px; gap: 6px; white-space: nowrap; justify-content: center; }
.playground .pg-gobar > .btn:disabled { cursor: not-allowed; }
.playground .pg-kbd { font: 600 10.5px var(--sans); padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .18); opacity: .85; }
.playground #pgAll .pg-gospin { display: none; border-color: rgba(255, 255, 255, .35); border-top-color: var(--on-accent); }
.playground #pgAll.pg-going .pg-gospin { display: inline-block; }
.playground #pgAll.pg-going .ico, .playground #pgAll.pg-going .pg-kbd { display: none; }
.playground #pgAll.pg-going:disabled { opacity: 1; cursor: progress; }
/* A wide panel (one column under 1,100 px): the row keeps its side-panel size instead of an 800 px Run all. */
@container pgin (min-width: 640px) {
  .playground .pg-gobar { grid-template-columns: minmax(200px, 260px) auto auto; justify-content: start; }
}
/* A narrow panel (one column under 1,100 px is wide; this is a squeezed side panel): Run all on its own row, the two below. */
@container pgin (max-width: 359px) {
  .playground .pg-gobar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playground .pg-gobar > .btn.primary { grid-column: 1 / -1; }
}
.playground .pg-privacy { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); display: flex; gap: 7px; align-items: flex-start;
  background: var(--surface-2); border-radius: var(--radius); padding: 8px 10px; }
.playground .pg-privacy .ico { flex: none; margin-top: 2px; color: var(--accent); }

/* The runs, newest first; inside a card the keywords and the subject sit side by side when the card is wide enough. */
.playground .pg-out { min-width: 0; }
.playground .pg-runs { display: grid; gap: 14px; }
.playground .pg-empty { border: 1px dashed var(--rule-2); border-radius: var(--radius); padding: 16px 18px; color: var(--ink-3); font-size: 13px; }
.playground .pg-empty p { margin: 0 0 6px; }
.playground .pg-empty p:last-child { margin-bottom: 0; }
.playground .pg-empty .pg-emptyhead { color: var(--ink-2); font-weight: 600; }
.playground .pg-empty b { color: var(--ink-2); }
.playground .pg-run { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0;
  container: pgrun / inline-size; }
.playground .pg-runhead { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--rule); min-width: 0; font-size: 13px; }
.playground .pg-runtitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.playground .pg-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: 4px; display: inline-flex; }
.playground .pg-x:hover { color: var(--bad); background: var(--bad-soft); }
.playground .pg-runbody { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
@container pgrun (min-width: 900px) {
  .playground .pg-runbody:has(.pg-kwbox):has(.pg-subjbox) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  /* AI vs Human is a two-sided table: the keywords take more of the card. */
  .playground .pg-runbody:has(.pg-kwbox .pg-pairs):has(.pg-subjbox) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .playground .pg-runbody:has(.pg-kwbox):has(.pg-subjbox) .pg-kwbox { border-bottom: 0; border-right: 1px solid var(--rule); }
}
.playground .pg-box { padding: 12px 14px; display: grid; gap: 8px; border-bottom: 1px solid var(--rule); min-width: 0; align-content: start; }
.playground .pg-box:last-child { border-bottom: 0; }
.playground .pg-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.playground .pg-hd h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.playground .pg-meta { font-size: 12px; color: var(--ink-3); }
.playground .pg-copy { margin-left: auto; align-self: center; }
.playground .pg-wait { margin: 0; color: var(--ink-3); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.playground .pg-spin { width: 12px; height: 12px; border: 2px solid var(--rule-2); border-top-color: var(--accent); border-radius: 50%; animation: pg-spin .8s linear infinite; flex: none; }
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* Keywords: as the search form would read them, each with the words of the text it rests on. */
.playground .pg-built { margin: 0; font-size: 13px; display: grid; gap: 2px; background: var(--accent-soft); border-radius: var(--radius); padding: 8px 10px; }
.playground .pg-note { margin: 0; font-size: 12.5px; color: var(--warn); display: flex; gap: 6px; align-items: flex-start; }
.playground .pg-note .ico { flex: none; margin-top: 2px; }
.playground table.pg-kw { width: 100%; border-collapse: collapse; font-size: 13px; }
.playground table.pg-kw th { text-align: left; font-weight: 600; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.playground table.pg-kw td { padding: 4px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.playground table.pg-kw tr:last-child td { border-bottom: 0; }
.playground table.pg-kw td.pg-star { width: 1%; color: var(--warn); font-size: 15px; padding-right: 0; }
.playground .pg-aspect { display: inline-block; font-size: 11.5px; line-height: 1.6; border: 1px solid var(--rule); border-radius: 999px; padding: 0 8px; color: var(--ink-2); white-space: nowrap; }
.playground .pg-quote { color: var(--ink-2); font-style: italic; }
.playground .pg-quote.pg-bad { color: var(--bad); font-style: normal; }
.playground .pg-field { margin: 0; font-size: 13px; display: grid; gap: 2px; }
.playground .pg-notes { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }

/* The subject: the headings ranked with the engine's confidence, how sure it is of the paper, its warnings, NLM's own. */
.playground .pg-pconf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 12.5px; }
.playground .pg-meter { display: inline-flex; gap: 5px; align-items: baseline; color: var(--ink-2); }
.playground .pg-meter b { font-size: 15px; color: var(--accent); font-variant-numeric: tabular-nums; }
.playground .pg-warn { margin: 0; font-size: 12.5px; color: var(--warn); display: flex; gap: 6px; align-items: flex-start; background: var(--warn-soft, var(--surface-2));
  border-radius: var(--radius); padding: 6px 8px; }
.playground .pg-warn .ico { flex: none; margin-top: 2px; }
.playground .pg-code { margin-left: auto; font: 600 10.5px var(--mono, monospace); letter-spacing: .03em; color: var(--ink-3); white-space: nowrap; align-self: center; }
.playground ol.pg-subj { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.playground ol.pg-subj li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 96px; gap: 8px; align-items: center; padding: 3px 0;
  border-bottom: 1px dashed var(--rule); }
.playground ol.pg-subj li:last-child { border-bottom: 0; }
.playground .pg-rank { color: var(--ink-3); font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; }
.playground .pg-mname { min-width: 0; overflow-wrap: anywhere; display: inline-flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.playground li.pg-ismain .pg-mname { font-weight: 600; }
.playground .pg-main { font-size: 10px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.playground .pg-branch { font-size: 11px; line-height: 1.5; border-radius: 999px; padding: 0 7px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; font-weight: 400; }
.playground .pg-src { font-size: 11px; color: var(--ink-3); white-space: nowrap; font-weight: 400; }
.playground .pg-conf { position: relative; height: 16px; background: var(--surface-2); border-radius: 3px; overflow: hidden; font-size: 11px; }
.playground .pg-conf i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent-soft); }
.playground .pg-conf.pg-isscore i { background: var(--rule-2); }
.playground .pg-conf span { position: relative; padding: 0 5px; color: var(--ink-2); line-height: 16px; font-variant-numeric: tabular-nums; }
.playground .pg-tags { margin: 0; font-size: 12px; color: var(--ink-2); display: grid; gap: 2px; }
/* The answer at a glance, under the card's title (11-05: "this is production area.. where they need everything spoon fed"). */
/* Two rows by design — "Search around" and "Subject" — labels in one column, values (and the Human match) beside them. */
.playground .pg-glance { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 8px 14px;
  background: var(--accent-soft); font-size: 13.5px; }
.playground .pg-glance > .pg-k { white-space: nowrap; }
.playground .pg-glance > .pg-gv { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; min-width: 0; }
.playground .pg-matchchip { font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 1px 9px; white-space: nowrap; cursor: help; }
.playground .pg-matchchip.pg-low { color: var(--warn); background: var(--warn-soft, var(--surface-2)); }
.playground .pg-mainstar { font-size: 12px; color: var(--accent); cursor: help; }
.playground .pg-keep { white-space: nowrap; }
.playground table.pg-kw .pg-aspect { margin-left: 8px; font-size: 11px; }
/* AI vs Human: the pairs (✓ the same, ≈ close), the AI's own, then the person's the AI did not give (amber). */
.playground .pg-cmpline { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.playground table.pg-kw td.pg-rel { width: 1%; text-align: center; font-weight: 700; padding-left: 4px; padding-right: 4px; cursor: help; }
.playground table.pg-kw td.pg-rel.pg-same { color: var(--ok); }
.playground table.pg-kw td.pg-rel.pg-close { color: var(--warn); }
.playground table.pg-kw td.pg-human { color: var(--ink); }
.playground table.pg-kw td.pg-rel.pg-no { color: var(--bad); }
/* AI vs Human: ONE table, each match on its own row — the AI keyword left, the person's it matches right, same row (seen on the
   live Playground, 11-05: a close pair sat on row 2 and row 4). Fixed columns, so both halves keep the same width on every row. */
.playground .pg-kwbox { container: pgkw / inline-size; }
.playground table.pg-pairs { table-layout: fixed; }
.playground table.pg-pairs col.pg-cstar { width: 26px; }
.playground table.pg-pairs col.pg-crel { width: 30px; }
.playground table.pg-pairs th.pg-pairhead { padding: 0 8px 6px; border-bottom: 1px solid var(--rule); text-transform: none; letter-spacing: 0; }
.playground table.pg-pairs .pg-pairlabel { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-2); cursor: help; }
.playground table.pg-pairs .pg-pairlabel .ico { color: var(--accent); }
.playground table.pg-pairs .pg-hside { border-left: 1px solid var(--rule); padding-left: 14px; }
.playground table.pg-pairs td.pg-again b { font-weight: 400; color: var(--ink-3); }
.playground table.pg-pairs td.pg-none { color: var(--ink-3); }
.playground .pg-vscount { margin-left: auto; font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.playground .pg-closeword { margin-left: 6px; font-size: 11.5px; font-weight: 600; color: var(--warn); }
.playground .pg-notin { color: var(--bad); font-weight: 700; margin-left: 6px; cursor: help; }

@media (max-width: 1100px) {
  .playground .pg-grid { grid-template-columns: minmax(0, 1fr); }
  .playground .pg-in { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .playground { padding: 12px 10px 32px; }
  .playground ol.pg-subj li { grid-template-columns: 18px minmax(0, 1fr) 70px; }
}
