/* ============================================================
   Hit to lead — own design, second revision (2026-10-06)

   The first revision copied Foldify's einfra theme outright. This one
   keeps its structure (rounded cards on a soft grey page, pill
   badges, Inter) but moves off Foldify's palette entirely: a deep
   petrol teal carries every action, on cool slate neutrals. Teal was
   chosen against the subject: it is the one hue that neither
   collides with iodine's CPK violet — which stays reserved for the
   atoms blocking iodinates, and means iodine, nothing else — nor
   reads as the default AI purple.

   Craft rules this revision adds (after the frontend-ui-engineering
   checklist): a radius HIERARCHY instead of one radius everywhere
   (14px cards, 10px fields and inner boxes, pills only for badges,
   tracks and the segmented control); one soft shadow per card and
   none below it; a 4px spacing scale; and a settings-before-run
   interaction — the spine's stage panels start closed by default; they open
   on demand (rail navigation, a running step, or user resize), and collapse
   into readouts when the chain starts.
   ============================================================ */
:root{
  --b1:#ffffff; --b2:#f6f7f8; --b3:#e4e7ea;
  --content:#1b2733; --muted:#5b6b79; --grey:#96a3af;
  --primary:#0f6e62; --primary-hi:#0b574d; --primary-content:#f2faf8;
  --wash:#e7f4f1; --wash-deep:#d3eae5;
  --iodine:#6d2fb0; --iodine-soft:#6d2fb01f; --dead:#96a3af;
  --ok:#1b7f4e; --ok-wash:#e6f4ec; --bad:#c93838; --bad-wash:#fae9e9;
  --warn:#96650e; --warn-wash:#f9f1df;
  --r-box:14px; --r-inner:10px; --r-pill:999px;
  --shadow:0 1px 3px rgba(27,39,51,.08),0 4px 14px rgba(27,39,51,.06);
  --shadow-lift:0 4px 10px rgba(27,39,51,.10),0 12px 28px rgba(27,39,51,.10);
  color-scheme:light;
}
*{box-sizing:border-box}
::selection{background:var(--wash-deep)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--b3);border-radius:99px}
::-webkit-scrollbar-thumb:hover{background:var(--grey)}
body{margin:0;background:var(--b2);color:var(--content);
     font-family:"Inter",system-ui,sans-serif;line-height:1.55;font-size:15px}
/* A quiet teal band behind the opening; a tint, not a hero. The shell
   widened from 1240 to 1560: the workbench's pick-and-table surface is the
   reason the page exists, and at 1240 it stayed ~730 px wide on any monitor.
   Foldify's layout taught the same shape -- centered, one container -- theirs
   is a landing page so it caps narrower; a workbench wants the room. */
.wrap{max-width:1560px;margin:0 auto;padding-inline:16px;padding-block:28px 132px;
      background:linear-gradient(180deg,var(--wash),var(--b2) 200px)}
h1{font-size:1.55rem;font-weight:700;margin:0 0 4px;color:var(--content)}
h1 b{color:var(--primary);font-weight:700}
.sub{color:var(--muted);font-size:.88rem;margin:0 0 24px;max-width:72ch}
.grid{display:block}
/* The work surface. The molecule and what you locked on it sit side by side
   where there is room, and the results take the full width -- a survivors table
   with a Docking and an Affinity column is the one thing here that wants it.
   Rail/section layout, 2026-10-13: one column again -- the pipeline spine
   moved out of this grid into the flow below it as full-width phase sections
   (user: all controls in a right-side tab were unreadable). minmax(0,...) not
   a bare fr: a grid item defaults to min-width:auto, so a plain column cannot
   shrink below its widest child and the table pushes the page sideways
   instead of scrolling inside its own wrapper. */
.work{display:grid;gap:20px;align-items:start;
      grid-template-columns:minmax(0,1fr)}
.work > *{min-width:0}
.work > #resultCard,.work > #tableCard{grid-column:1 / -1}
.card{background:var(--b1);border:1px solid var(--b3);border-radius:var(--r-box);
      padding:20px;margin-bottom:20px;box-shadow:var(--shadow)}
h2{font-size:.95rem;font-weight:600;margin:0 0 12px;color:var(--content)}
label{display:block;font-size:.78rem;font-weight:500;color:var(--muted);margin-bottom:5px}
input,select{width:100%;font:inherit;font-size:.86rem;padding:8px 12px;
  border:1px solid var(--b3);border-radius:var(--r-inner);background:var(--b1);
  color:var(--content)}
input:focus-visible,select:focus-visible{outline:none;border-color:var(--primary);
  box-shadow:0 0 0 3px var(--wash-deep)}
input[type=text]{font-family:"JetBrains Mono",monospace;font-size:.78rem}
input[type=file]{font-size:.76rem;padding:6px 10px}
input[type=checkbox]{width:18px;height:18px;accent-color:var(--primary);cursor:pointer}
.stage{position:relative;width:100%;min-width:240px;max-width:420px;aspect-ratio:1/1;max-height:70vh;resize:both;overflow:hidden;margin-inline:auto;border-radius:var(--r-inner)}
.stage svg{position:absolute;inset:0;width:100%;height:100%}
.hit{fill:transparent;cursor:pointer}.hit.dead{cursor:not-allowed}
/* The iodine layer: CPK violet, because these are the atoms blocking
   iodinates. The only place the violet appears. */
.ring{fill:none;stroke:var(--iodine);stroke-width:2.5;pointer-events:none;opacity:0}
.ring.on{opacity:1}
.halo{fill:var(--iodine-soft);pointer-events:none;opacity:0}.halo.on{opacity:1}
.hit:not(.dead):hover+.ring{opacity:.45}
 .hit:focus-visible{outline:none}
 .hit:focus-visible + .ring{opacity:1}
.legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px;font-size:.78rem;color:var(--muted)}
.key{display:inline-flex;align-items:center;gap:6px}
.dot{width:11px;height:11px;border-radius:50%;border:2px solid var(--iodine)}
.dot.dead{border-color:var(--dead);background:var(--dead)}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
.stat{background:var(--b2);border-radius:var(--r-inner);padding:12px 14px}
.stat .n{font-family:"JetBrains Mono",monospace;font-size:1.3rem;font-weight:500;
  font-variant-numeric:tabular-nums;line-height:1.15;color:var(--content)}
.stat .l{font-size:.72rem;color:var(--muted)}
.n.i{color:var(--iodine)}
code,.mono{font-family:"JetBrains Mono",monospace}
pre{background:var(--b2);border:1px solid var(--b3);border-radius:var(--r-inner);
  padding:10px;font-size:.73rem;overflow-x:auto;margin:0;white-space:pre-wrap;
  word-break:break-all;font-family:"JetBrains Mono",monospace}
.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;align-items:center}
button{font:inherit;font-weight:600;font-size:.8rem;padding:9px 16px;
  border-radius:var(--r-inner);cursor:pointer;border:1px solid var(--b3);
  background:var(--b1);color:var(--content);transition:border-color .15s,
  background-color .15s,color .15s}
button:hover{border-color:var(--primary);color:var(--primary)}
button.primary{background:var(--primary);border-color:var(--primary);
  color:var(--primary-content)}
button.primary:hover{background:var(--primary-hi);border-color:var(--primary-hi);
  color:var(--primary-content)}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,summary:focus-visible,a:focus-visible{outline:none;
  box-shadow:0 0 0 3px var(--wash-deep);border-radius:var(--r-inner)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.msg{font-size:.8rem;margin-top:10px}
.msg.err{color:var(--bad)}.msg.ok{color:var(--ok)}.msg.warn{color:var(--warn)}
.mols{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;
      margin-top:12px}
.mol{border:1px solid var(--b3);border-radius:var(--r-inner);padding:8px;
     background:var(--b1);transition:box-shadow .15s,transform .15s}
.mol:hover{box-shadow:var(--shadow-lift);transform:translateY(-2px)}
.mol svg{width:100%;height:auto;display:block}
.mol .s{font-family:"JetBrains Mono",monospace;font-size:.62rem;color:var(--muted);
  word-break:break-all;margin-top:4px;max-height:3.2em;overflow:hidden}
/* Boltz quotes the offending SMILES back when it skips a ligand, and that is
   one unbreakable token: at 320 px it pushed the page 363 px sideways. An
   explanation that breaks the layout is not an explanation. */
.hint,.msg{overflow-wrap:anywhere}
.hint{font-size:.77rem;color:var(--muted);margin-top:8px}
.hint.tight{margin-top:4px}
.formula{font-family:"JetBrains Mono",monospace;font-size:.76rem;color:var(--muted);
  margin-top:10px;min-height:1.2em}
.formula b{color:var(--content);font-weight:500}
.sketchwrap{position:fixed;inset:0;background:rgba(27,39,51,.45);
  backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;
  z-index:50;padding:16px}
.sketchwrap[hidden]{display:none}
.sketchwrap .card{max-width:560px;width:100%;margin:0}
#jsme{width:100%;min-height:360px;display:flex;align-items:center;justify-content:center}
.mol .tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
/* Pill badges. */
.tag{font-size:.6rem;font-weight:500;padding:2px 9px;border-radius:var(--r-pill);
  background:var(--b2);color:var(--muted);white-space:nowrap}
 .tag.good{background:var(--ok-wash);color:#15683c}
 .tag.bad{background:var(--bad-wash);color:#b02a2a}
.bar{height:8px;border-radius:var(--r-pill);background:var(--b3);overflow:hidden;
     margin-top:10px}
.bar[hidden]{display:none}
.fill{height:100%;width:0;background:var(--primary);border-radius:var(--r-pill);
      transition:width .4s ease}
.fill.indeterminate{width:35%;animation:slide 1.4s ease-in-out infinite}
@keyframes slide{0%{margin-left:-35%}100%{margin-left:100%}}
@media(prefers-reduced-motion:reduce){.fill.indeterminate{animation:none;width:100%;opacity:.35}}
.spin{display:inline-block;width:12px;height:12px;border:2px solid var(--b3);
  border-top-color:var(--primary);border-radius:50%;animation:sp .7s linear infinite;
  vertical-align:-2px}
@keyframes sp{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.spin{animation:none}}

/* ---- the pipeline spine ----------------------------------------
   One rounded card with internal dividers. Each row is both the
   stage's readout and the disclosure for its parameters, so adding
   a stage adds a row rather than another card.

   SETTINGS BEFORE RUN: the steps start open, with their parameters
   summarised as live chips in the summary row; starting the chain
   collapses them into readouts. app.js owns the open/close, this is
   only how both states look. */
.spine{background:var(--b1);border:1px solid var(--b3);border-radius:var(--r-box);
       overflow:hidden;box-shadow:var(--shadow)}
.spine > header{padding:16px 16px 12px;display:flex;align-items:baseline;
  justify-content:space-between;gap:12px}
.spine > header h2{margin:0}

.step{border-top:1px solid var(--b3)}
.step > summary{display:grid;grid-template-columns:1fr auto;gap:4px 12px;
  align-items:baseline;padding:12px 16px;cursor:pointer;list-style:none}
.step > summary::-webkit-details-marker{display:none}
.step > summary:hover{background:var(--b2)}
.step .nm{font-size:.88rem;font-weight:600;color:var(--content);
  display:flex;align-items:center;gap:8px}
.step .nm input.use{width:auto;margin:0}
.step .ct{font-family:"JetBrains Mono",monospace;font-size:.8rem;
  font-variant-numeric:tabular-nums;color:var(--muted)}
.step .ct b{color:var(--content);font-weight:500}
.step .track{grid-column:1/-1;height:5px;border-radius:var(--r-pill);background:var(--b3);
  overflow:hidden;margin-top:3px}
.step .grow{height:100%;width:0;background:var(--primary);border-radius:var(--r-pill);
  transition:width .45s ease}
.step .why{grid-column:1/-1;font-size:.72rem;color:var(--muted)}
.step.bad .ct b,.step.bad .nm{color:var(--bad)}
.step.bad .grow{background:var(--bad)}
.step[open] > summary{background:var(--b2)}
.step .body{padding:4px 16px 16px;border-top:1px dashed var(--b3);background:var(--b1)}
.step .body > *:first-child{margin-top:10px}
/* Live parameter chips: the chain's configuration at a glance,
   before anything runs. */
.chips{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap;margin-top:2px}
.chips[hidden]{display:none}
.chip{font-family:"JetBrains Mono",monospace;font-size:.68rem;color:var(--muted);
  background:var(--b1);border:1px solid var(--b3);border-radius:var(--r-pill);
  padding:1px 9px;white-space:nowrap}
.chip b{color:var(--content);font-weight:500}
.ranges{display:grid;grid-template-columns:auto 1fr 1fr;gap:6px 8px;align-items:center}

/* Add-a-compartment row: quieter than a stage, same voice as a hint */
.phadd{display:flex;align-items:center;gap:8px;padding:10px 6px 2px;
  font-size:.86rem;color:var(--ink-soft)}
.phadd input{width:88px;padding:6px 10px}
 .phadd button{font-size:.78rem;padding:6px 12px}
@media (max-width:600px){.phadd{flex-wrap:wrap}}
.ranges label{margin:0;font-size:.74rem;white-space:nowrap}
.ranges input{padding:5px 10px;font-size:.78rem;font-family:"JetBrains Mono",monospace}
.check{display:flex;gap:7px;align-items:center;margin-top:10px;font-size:.8rem;color:var(--content)}
.check input{width:auto}
.spine footer{border-top:1px solid var(--b3);padding:12px 16px;display:flex;
  gap:8px;align-items:center;flex-wrap:wrap}

/* ---- spine as full-width sections (data-flow="sections", 2026-10-13) ----
   The right-side rail folded every stage into one narrow column; the spine
   now lives in the page flow after the work surface, and its three phases
   (Generate / Narrow / Score) spread across the width as cards. Steps inside
   a phase keep their accordion behaviour -- nothing else changed, which is
   why the attribute rather than a rewrite. */
.spine[data-flow="sections"]{background:transparent;border:0;box-shadow:none;
  overflow:visible;margin-top:0}
.spine[data-flow="sections"] > .drawer-head{justify-content:flex-start;
  gap:16px;padding:4px 2px 10px}
.spine[data-flow="sections"] > .drawer-head h2{font-size:1.05rem}
.spine[data-flow="sections"] > .phase{background:var(--b1);border:1px solid var(--b3);
  border-radius:var(--r-box);box-shadow:var(--shadow);overflow:hidden;
  grid-row:auto;padding:0}
.spine[data-flow="sections"]{display:grid;gap:20px;align-items:start;
  grid-template-columns:repeat(auto-fit,minmax(330px,1fr))}
.spine[data-flow="sections"] > .drawer-head{grid-column:1/-1}
.spine[data-flow="sections"] .phase-h{padding:12px 16px 8px;margin:0}
.spine[data-flow="sections"] > footer{grid-column:1/-1;border:1px dashed var(--b3);
  border-radius:var(--r-box);background:var(--b2)}

/* Version chip: the instance's build, so "am I looking at the latest?" is a
   read-off, not a question. */
.verchip{font-family:"JetBrains Mono",monospace;font-size:.62rem;font-weight:400;
  color:var(--muted);background:var(--b1);border:1px solid var(--b3);
  border-radius:var(--r-pill);padding:2px 10px;vertical-align:middle}

/* The log card: moved out of the bottom bar into the flow (user: the log
   tab was neither visible nor deduplicated). */
.logcard{margin-top:20px}
.logcard > summary{cursor:pointer;font-weight:600;list-style:none;display:flex;
  gap:10px;align-items:center;padding:4px 2px}
.logcard > summary::-webkit-details-marker{display:none}
.logcard > summary::before{content:"\25B8\00a0";color:var(--muted)}
.logcard[open] > summary::before{content:"\25BE\00a0"}
.logcard .logtop{padding:2px 0 8px}
.logcard #logbody{max-height:44vh}

/* ---- results table ---- */
.tablewrap{overflow:auto;margin-top:10px;border:1px solid var(--b3);
  /* 429-row runs used to grow a 42 000 px page. A bound keeps the scroll
   * local and the sticky thead means the column meaning is never lost; the
   * MAX is viewport-relative so short screens get a short table frame. */
  max-height:72vh;
          border-radius:var(--r-inner)}
table{border-collapse:collapse;width:100%;font-size:.76rem;background:var(--b1)}
th,td{text-align:right;padding:7px 10px;border-bottom:1px solid var(--b3);white-space:nowrap}
th:first-child,td:first-child,th.l,td.l{text-align:left}
th{font-size:.7rem;font-weight:600;color:var(--muted);cursor:pointer;user-select:none;
   position:sticky;top:0;background:var(--b1);vertical-align:bottom}
th .u{display:block;font-size:.63rem;font-weight:500;color:var(--muted)}
th[aria-sort]{color:var(--primary)}
th[tabindex]{cursor:pointer}
th:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
th[aria-sort="ascending"]::before{content:"↑\00a0"}
th[aria-sort="descending"]::before{content:"↓\00a0"}
td{font-family:"JetBrains Mono",monospace;font-variant-numeric:tabular-nums}
td.smi{font-size:.68rem;max-width:28ch;overflow:hidden;text-overflow:ellipsis}
td.id{font-size:.7rem;color:var(--muted)}
tbody tr:hover{background:var(--b2)}
tbody tr:last-child td{border-bottom:0}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}
.toolbar label{margin:0}
.toolbar select{width:auto;min-width:210px}
button.carry{font-size:.68rem;padding:6px 11px;
  border:1px solid var(--b3);background:var(--b1);color:var(--primary)}
button.carry:hover{border-color:var(--primary)}
/* The selection bar: teal wash, it is an action in progress. */
.pickbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;
  padding:9px 13px;margin-bottom:10px;border:1px solid var(--wash-deep);
  border-radius:var(--r-inner);background:var(--wash)}
.pickbar[hidden]{display:none}
.pickbar span{font-size:.8rem;font-weight:600}
 .pickbar button{font-size:.74rem;padding:6px 12px}
input.pick{width:auto;margin:0}
#examples a{color:var(--primary);text-decoration:none;font-weight:500}
#examples a:hover{text-decoration:underline}
td:first-child{padding-right:4px}
.thumb{display:block;width:74px;height:74px}
.thumb svg{width:100%;height:100%;display:block}
.step .nm input.use{width:auto;margin-right:5px;vertical-align:-1px}
.row a[download]{font-size:.78rem;font-weight:600;color:var(--primary);
  text-decoration:none;border:1px solid var(--b3);border-radius:var(--r-inner);
  padding:8px 14px;transition:border-color .15s}
.row a[download]:hover{border-color:var(--primary)}
.stats-line{font-size:.75rem;color:var(--muted);margin-top:10px;
  font-family:"JetBrains Mono",monospace;line-height:1.7}
.stats-line b{color:var(--content);font-weight:500}

/* What is left of the asides after the explain bubbles took the prose: a
   fold for controls that only some deployments need, labelled with what is
   inside. `hidden` has to be restated because display:block would win. */
.aside{margin:6px 0 2px}
.aside[hidden]{display:none}
.aside>summary{font-size:.76rem;font-weight:500;color:var(--muted);cursor:pointer;
  list-style-position:outside}
.aside>summary:hover{color:var(--content)}
.aside[open]>summary{margin-bottom:4px}

/* The native file input is hidden rather than removed, so the label stays a
   real control for the keyboard and for a screen reader. */
.uploadrow{display:flex;align-items:center;gap:10px;margin-top:8px;flex-wrap:wrap}
/* Bound to the pairing, not to a wrapper class: the upload pane's own input
   was not inside .uploadrow, so it rendered raw -- a bare "Choose File / No
   file chosen" sitting above the styled label meant to replace it. */
input[type=file]:has(+ .filebtn),
.uploadrow input[type=file],.row input[type=file]{position:absolute;width:1px;
  height:1px;opacity:0;overflow:hidden}
.filebtn{display:inline-block;width:auto;margin:0;padding:7px 13px;cursor:pointer;
  border:1px solid var(--b3);border-radius:var(--r-inner);background:var(--b1);
  font-size:.78rem;font-weight:600;color:var(--content);transition:border-color .15s,
  color .15s}
.filebtn:hover{border-color:var(--primary);color:var(--primary)}
input[type=file]:focus-visible + .filebtn,
input[type=file]:focus + .filebtn{outline:none;box-shadow:0 0 0 3px var(--wash-deep)}

/* The four phases, and why one of them is not available yet. Numbered because
   this genuinely is a sequence: nothing can be narrowed before it exists.
   The current phase is the teal one. */
.rail{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;margin:0 0 24px;padding:0}
@media(max-width:760px){.rail{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.rail{grid-template-columns:minmax(0,1fr)}}
.rail li{padding:0;
  border:1px solid var(--b3);border-radius:var(--r-inner);background:var(--b1);
  min-width:0;box-shadow:var(--shadow);transition:border-color .15s}
/* The whole step is the control, so the hit area is the card and not a word
   inside it. A button, because it moves you: keyboard reach and focus come
   free, and a screen reader is told it is actionable. */
.rail-go{display:flex;gap:9px;align-items:flex-start;width:100%;text-align:left;
  padding:11px 13px;border:0;background:none;border-radius:inherit;
  font:inherit;color:inherit;cursor:pointer}
.rail-go > span:last-child{display:block;min-width:0}
.rail li:has(.rail-go:hover){border-color:var(--primary)}
.rail-go:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wash-deep)}
/* A step with nothing to show yet does not pretend to take you anywhere. */
.rail li.is-wait .rail-go{cursor:default}
.rail li.is-wait:has(.rail-go:hover){border-color:var(--b3)}

/* Where you landed, said once and then gone. Without it a scroll of half a
   page looks like the page moved on its own. */
@keyframes landed{from{box-shadow:0 0 0 3px var(--wash-deep)}to{box-shadow:none}}
.landed{animation:landed 1.1s ease-out}
@media(prefers-reduced-motion:reduce){.landed{animation:none;outline:2px solid var(--primary)}}
.rail-n{flex:none;width:22px;height:22px;border-radius:50%;
  border:0;background:var(--b2);display:grid;place-items:center;
  font-family:"JetBrains Mono",monospace;font-size:.72rem;font-weight:500;
  color:var(--muted);font-variant-numeric:tabular-nums}
.rail-t{display:block;font-size:.84rem;font-weight:600;color:var(--content)}
.rail-s{display:block;margin-top:1px;font-size:.73rem;color:var(--muted);line-height:1.35}
.rail li.is-now{border-color:var(--primary);background:var(--wash)}
.rail li.is-now .rail-n{background:var(--primary);color:var(--primary-content)}
.rail li.is-now .rail-t{color:var(--primary)}
.rail li.is-done .rail-n{background:var(--ok-wash);color:var(--ok)}
/* Unavailable is carried by the text, not by colour alone. */
 .rail li.is-wait{border-color:var(--b3);background:var(--b2)}
.rail li.is-wait .rail-s::before{content:"Not yet — ";color:var(--muted)}

/* Three ways in, one at a time: a pill segmented control. */
.ways{display:inline-flex;border:1px solid var(--b3);border-radius:var(--r-pill);
  overflow:hidden;margin-bottom:14px;max-width:100%;flex-wrap:wrap;background:var(--b2)}
.way{border:0;border-radius:var(--r-pill);background:transparent;padding:7px 15px;
  font-size:.8rem;font-weight:500;color:var(--muted);cursor:pointer;white-space:nowrap;
  transition:color .15s,background-color .15s}
.way+.way{border-left:1px solid var(--b3)}
.way[aria-pressed=true]{background:var(--b1);color:var(--primary);font-weight:600;
  box-shadow:var(--shadow)}
.way:focus-visible{box-shadow:0 0 0 3px var(--wash-deep)}
 .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(prefers-reduced-motion:reduce){
  .mol{transition:none}.mol:hover{transform:none;box-shadow:none}
  .fill,.step .grow{transition:none}
}

/* ============================================================
   Explain bubbles (2026-10-08)

   The page carried its reasoning as prose: a <p class="hint"> under most
   fields and an <details class="aside"> under several. All of it true, all of
   it in the way -- the docking panel ran past a screen before reaching its
   first input. The reasoning moved into bubbles that appear on demand, one per
   control, written to one or two sentences. The text lives in TIPS in app.js,
   which is also what keeps a measured number from being corrected in one place
   and left stale in another.

   A button, not a title= attribute: title waits a second, cannot be reached by
   keyboard, and is invisible to touch.

   ONE bubble, at body level, moved to whichever button is active -- not a
   ::after on each button. The spine is `overflow:hidden` and, above 900px,
   `overflow-y:auto`; an absolutely positioned bubble inside it is clipped to
   the panel, which is exactly what happened: the first draft rendered the
   docking tip with its left third sliced off.
   ============================================================ */
.tip{display:inline-grid;place-items:center;width:15px;height:15px;padding:0;
  margin-left:5px;border:1px solid var(--b3);border-radius:50%;background:var(--b2);
  color:var(--muted);font:600 10px/1 "Inter",sans-serif;cursor:help;
  vertical-align:middle;flex:none}
.tip:hover,.tip:focus-visible{background:var(--wash);border-color:var(--primary);
  color:var(--primary);outline:none}
.tip:focus-visible{box-shadow:0 0 0 3px var(--wash-deep)}

.tipbubble{position:fixed;z-index:60;max-width:270px;padding:9px 11px;
  border-radius:var(--r-inner);background:var(--content);color:var(--b1);
  font:400 .72rem/1.45 "Inter",sans-serif;text-align:left;
  box-shadow:var(--shadow-lift);pointer-events:none;
  opacity:0;visibility:hidden;transition:opacity .12s ease}
.tipbubble.on{opacity:1;visibility:visible}
/* The arrow's horizontal offset is set from the button's position, so it keeps
   pointing at the button after the bubble is clamped to the viewport. */
.tipbubble::after{content:"";position:absolute;top:100%;left:var(--ax,50%);
  translate:-50% 0;border:5px solid transparent;border-top-color:var(--content)}
.tipbubble.below::after{top:auto;bottom:100%;
  border-top-color:transparent;border-bottom-color:var(--content)}

/* A bubble on a summary row must not inherit the row's flex sizing. */
.step .nm .tip,.rail-t .tip,h2 .tip{flex:none}

@media(prefers-reduced-motion:reduce){.tipbubble{transition:none}}
@media(hover:none){.tip{width:17px;height:17px}}

/* The same mark as the bubble button, inert, for naming it in prose. */
.tip-inline{display:inline-grid;place-items:center;width:15px;height:15px;
  border:1px solid var(--b3);border-radius:50%;background:var(--b2);color:var(--muted);
  font:600 10px/1 "Inter",sans-serif;vertical-align:middle}

/* A bubble beside a hidden control must hide with it -- Stop is only there
   while a chain is running, and its bubble was not. */
[hidden] + .tip{display:none}

/* ============================================================
   Touch (2026-10-09)

   Measured on a 390 px phone: 88 interactive targets under 40 px, against
   Apple's 44 and Google's 48. The ones that matter most were the worst --
   the stage checkboxes that enable docking and affinity were 18 px, and the
   explain bubbles 17 px.

   Scoped to coarse pointers so the desk keeps its denser spacing: a 44 px
   row everywhere would push an already 4.5-screen page taller still.
   ============================================================ */
@media (pointer: coarse), (hover: none) {
  input[type=text], input[type=number], input[type=search], select,
  button:not(.tip), .filebtn, summary {
    min-height: 44px;
  }
  /* A checkbox cannot simply grow: the box is drawn by the platform. Scale it,
     then give it the hit area underneath. It cannot borrow its text the way a
     label would -- it sits inside a <summary>, where a <label> would toggle
     the panel as well as the box, which is why it is a <span>. */
  .step .nm input.use {
    width: 22px; height: 22px; margin-right: 4px; position: relative;
  }
  .step .nm input.use::before {
    content: ""; position: absolute; inset: -11px; border-radius: 6px;
  }
  /* The same for the one checkbox that lives in a label of its own. */
  .removerow { min-height: 44px; }
  .removerow input { width: 22px; height: 22px; position: relative; }
  .removerow input::before {
    content: ""; position: absolute; inset: -11px; border-radius: 6px;
  }
  .step > summary { padding-block: 12px; }
  .way { padding: 11px 16px; }
  /* The bubble keeps its 15 px circle -- a 44 px one beside every label would
     dominate the page -- and gets the hit area underneath it instead. */
  .tip { position: relative; }
  .tip::before {
    content: ""; position: absolute; inset: -14px; border-radius: 50%;
  }
  /* The example SMILES are a row of short links; space them for a thumb. */
  /* The example scaffolds are a row of short links. inline-flex rather than
     padding: padding on an inline box is drawn but not counted, so the target
     stayed 39 px however much was added. */
  .hint a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  }
}

/* ============================================================
   Phases (2026-10-09)

   Five stages sat in one flat list under one button, which hid the only fact
   that should drive a decision in this panel: they differ in cost by four
   orders of magnitude. PAINS is under a second for a hundred compounds;
   affinity is thirteen minutes EACH.

   Grouping them into Make / Narrow / Rank puts the tiers on screen without
   hiding what any stage did -- the per-stage counts, the "removed by catechol"
   line and the live log are what people come back for, so none of it moves.
   ============================================================ */
.phase + .phase{border-top:1px solid var(--b3)}
.phase-h{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;
  margin:0;padding:13px 16px 7px;font-size:.84rem;font-weight:600;
  color:var(--content);background:var(--b2)}
/* No number here on purpose. The rail numbers the page's four steps and is
   the navigation; numbering the phases as well put two 1-2-3 systems on one
   screen, and "Narrow" then named both the rail's third step and one phase
   inside it. The phases are named by what they do to the compounds. */
/* The price of the tier, said once per phase rather than per stage. */
.phase-cost{margin-left:auto;font-size:.71rem;font-weight:400;color:var(--muted)}
/* The first step of a phase sits under its header, so it needs no rule of
   its own; without this the header and the step draw two lines together. */
.phase > .step:first-of-type{border-top:0}
@media(max-width:600px){
  .phase-cost{margin-left:0;flex-basis:100%}
}

/* ============================================================
   Drawer and action bar (2026-10-09)

   The pipeline was a permanent right-hand column: roughly 2,500 px of settings
   kept on screen while you were doing something else, and on a phone it was
   stacked above or below the molecule you were meant to be working on. It is
   now closed until asked for. What stays on screen is one bar that says what
   the next step is and what it costs, shows progress while something runs, and
   opens the settings.

   Desktop: a panel from the right, no scrim, the page stays usable behind it.
   Phone: a sheet from the bottom with a scrim. Both rest ABOVE the bar so the
   primary button is never covered by the thing it controls.
   ============================================================ */
:root{--ab-h:68px}

.actionbar{position:fixed;inset:auto 0 0 0;z-index:70;background:var(--b1);
  border-top:1px solid var(--b3);box-shadow:0 -6px 18px rgba(27,39,51,.07)}
.ab-track{height:3px;background:var(--b3);overflow:hidden}
.ab-fill{display:block;height:100%;width:0;background:var(--primary);
  transition:width .4s ease}
.ab-fill.indeterminate{width:35%;animation:slide 1.4s ease-in-out infinite}
.ab-row{max-width:1240px;margin:0 auto;display:flex;align-items:center;gap:10px;
  padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
.ab-status{flex:1;min-width:0;margin:0;font-size:.78rem;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ab-open,.ab-log,.ab-stop,.ab-quota{flex:none}
.ab-quota{font-size:.68rem;color:var(--muted)}
/* M1 login overlay: centered card over a dimmed page, uses existing tokens. */
.login{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);
  z-index:200;background:var(--b1);border:1px solid var(--b3);border-radius:12px;
  padding:24px;min-width:280px;box-shadow:0 8px 40px rgba(27,39,51,.18)}
.login[hidden]{display:none}
.login-btns{display:flex;gap:8px;margin-top:12px}
.login-go,.login-reg{padding:8px 14px;border-radius:10px;cursor:pointer;font-size:.84rem}
.login-go{background:var(--primary);color:var(--primary-content);border:none}
.login-reg{background:transparent;color:var(--muted);border:1px solid var(--b3)}
.login-err{color:var(--bad);font-size:.78rem;margin-top:8px}
.login-err[hidden]{display:none}
.login-note{color:var(--muted);font-size:.78rem;margin:8px 0 0}
.login input{display:block;width:100%;margin-top:10px;padding:8px 10px;
  border:1px solid var(--b3);border-radius:8px;font-size:.84rem}
/* One Stop chip per live run, next to the section Stop. A queued run whose
   page was not open had no visible cancel path (2026-10-13); the chip is
   selection-independent, so it is on screen the whole time a Job exists. */
.ab-live{flex:none;display:flex;gap:6px}
.ab-live[hidden]{display:none}
.ab-live-chip{flex:none;font-family:"JetBrains Mono",monospace;font-size:.68rem;
  padding:4px 9px;border:1px solid var(--b3);border-radius:var(--r-pill);
  background:transparent;color:var(--muted);cursor:pointer}
.ab-live-chip:hover{border-color:var(--bad);color:var(--bad)}
.ab-live-chip:disabled{opacity:.5;cursor:default}
/* The primary action can carry a price -- "Run 4 filters on 100 - about 5.3 h"
   -- so it may take two lines rather than being cut off. */
.ab-go{flex:0 1 auto;min-width:0;max-width:340px;line-height:1.2;text-align:center}
@media(max-width:600px){
  .ab-row{flex-wrap:wrap;row-gap:8px}
  .ab-status{order:-1;flex-basis:100%;white-space:normal}
  .ab-status:empty{display:none}
  .ab-go{flex:1 1 0;max-width:none}
}

.spine.drawer{position:fixed;z-index:60;top:0;right:0;bottom:var(--ab-h);
  width:min(470px,100vw);border-radius:var(--r-box) 0 0 0;overflow-y:auto;
  overscroll-behavior:contain;box-shadow:var(--shadow-lift);
  transform:translateX(104%);visibility:hidden;
  transition:transform .22s ease,visibility 0s linear .22s}
.spine.drawer.open{transform:none;visibility:visible;
  transition:transform .22s ease}
.drawer-head{position:sticky;top:0;z-index:2;background:var(--b1);
  border-bottom:1px solid var(--b3)}
.drawer-x{margin-left:auto;flex:none}

.scrim{position:fixed;inset:0;z-index:55;background:rgba(27,39,51,.42)}
.scrim[hidden]{display:none}

@media(max-width:900px){
  .spine.drawer{top:auto;left:0;right:0;width:auto;
    max-height:calc(88dvh - var(--ab-h));border-radius:var(--r-box) var(--r-box) 0 0;
    transform:translateY(104%)}
  .spine.drawer.open{transform:none}
}
@media(min-width:901px){.scrim{display:none}}
@media(prefers-reduced-motion:reduce){
  .spine.drawer,.spine.drawer.open,.ab-fill{transition:none}
}

/* The one setting that decides whether the ranges and the pKa window remove or flag. */
.removerow{display:flex;align-items:center;gap:8px;margin:10px 2px 2px;font-size:.92rem;cursor:pointer}
.drawer-tools{margin-left:auto;display:inline-flex;align-items:center;gap:6px}
.drawer-tool{font-size:.85rem;padding:4px 10px}

/* ---------------------------------------------------------- pose viewer
 * The dialog chrome is the sketcher's .sketchwrap; only the viewer box and
 * the in-table trigger are new. The box needs a height of its own because
 * 3Dmol sizes its canvas to the container. */
/* position:relative is not decoration: 3Dmol's canvas is absolutely
 * positioned, and without it the pose escaped the dialog and drew itself
 * over the top-left of the page (caught on 2026-10-12, Chrome 155). */
#pose3d { position: relative; width: 100%; height: 60vh; min-height: 320px;
          background: #fff; border-radius: 8px; }
.posecard { max-width: 780px; width: min(780px, 92vw); }
td.pos { color: var(--success, #2e7d32); font-weight: 600; }
td.neg { color: var(--error, #c62828); font-weight: 600; }
td.warn { color: var(--warning, #b26a00); }
button.pose { margin-left: .45em; padding: .05em .45em; font-size: .72em;
              vertical-align: baseline; }

/* ============================================================
   Third revision — design refresh (2026-10-12)

   Additive layer: later rules of equal specificity win, so this
   re-skins every component above without touching markup, ids or
   app.js. Direction: quieter canvas, tighter type, flatter surfaces,
   Inter. Deleting this block restores revision two exactly.
   ============================================================ */
:root{
  --b1:#ffffff; --b2:#f7f8f9; --b3:#e2e6ea;
  --content:#111c26; --muted:#5a6874; --grey:#8d99a5;
  --primary:#0d7d6a; --primary-hi:#096153; --primary-content:#f2fbf9;
  --wash:#e9f5f2; --wash-deep:#d2eae4;
  --r-box:10px; --r-inner:8px;
  --shadow:0 1px 2px rgba(17,28,38,.06);
  --shadow-lift:0 2px 6px rgba(17,28,38,.08),0 10px 24px rgba(17,28,38,.10);
}
body{font-family:Inter,system-ui,"Segoe UI",Roboto,sans-serif;background:#fafbfc;font-size:.95rem}
/* width lives on the base .wrap rule (1560px) -- era duplicates removed */
h1{font-size:1.6rem;font-weight:700;letter-spacing:-.02em;margin:1.4rem 0 .2rem}
.sub{color:var(--muted);max-width:62ch;line-height:1.5}
.card{border:1px solid var(--b3);box-shadow:none;padding:1.1rem 1.2rem}
.card:hover{box-shadow:var(--shadow)}
.card h2{font-size:1.02rem;font-weight:650;letter-spacing:-.01em}
.rail{gap:6px}
.rail-go{border:1px solid var(--b3);background:var(--b1);border-radius:var(--r-pill);padding:.45rem .9rem}
.rail-go:hover{border-color:var(--primary)}
.rail-n{width:1.45em;height:1.45em;font-size:.75rem}
.rail-t{font-weight:600;font-size:.88rem}
.rail-s{font-size:.75rem}
button,input,select{font-family:inherit}
button{border-radius:8px;padding:.5rem .95rem;font-size:.87rem;font-weight:550;border:1px solid var(--b3);background:var(--b1);transition:border-color .12s,background .12s}
button:hover{border-color:var(--grey)}
button.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-content)}
button.primary:hover:not(:disabled){background:var(--primary-hi)}
input[type=text],input[type=number],input[type=search],select{border-radius:8px;border:1px solid var(--b3);padding:.5rem .7rem;background:var(--b1)}
input:focus-visible,select:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
label{font-size:.78rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--muted)}
.hint{color:var(--muted);font-size:.84rem;line-height:1.45}
.toolbar,.ways{gap:8px}
.way{border-radius:var(--r-pill)}
table{font-size:.85rem}
th{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
thead th{position:sticky;top:0;background:var(--b1);z-index:2}
td,th{padding:.5rem .6rem}
.stats .stat{border:1px solid var(--b3);border-radius:var(--r-inner);padding:.5rem .7rem}
.stat .n{font-size:1.25rem;font-weight:700}
.stat .l{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.spine{border-left:1px solid var(--b3);background:var(--b1)}
.phase-cost{font-size:.72rem}
.step summary{padding:.6rem .7rem;border-radius:var(--r-inner)}
.step .nm{font-weight:600;font-size:.9rem}
.ct{font-size:.75rem}
.badge,.chip{font-size:.72rem}
.mono{font-family:"JetBrains Mono",ui-monospace,monospace}

/* ============================================================
   Fourth revision — workbench layout (2026-10-12)

   The pipeline stops being a drawer opened from a tab: it is a
   persistent column beside the work surface (the pattern Galaxy
   and Jupyter use), the rail is a sticky run-status stepper
   (the pattern smithers' ddd-ui header uses), and the phase
   headers carry numbers because the pipeline is a real sequence.
   ============================================================ */
/* (duplicate removed, see base .wrap) */
.grid{display:grid;grid-template-columns:minmax(0,1fr);
      gap:22px;align-items:start}
/* The spine as a flow section only: it was the right-hand sticky rail (the
   thing the 2026-10-13 restructure removed); position/max-height belong to
   that past. The "number the phases" counter rules below stay. */
/* numbered phase bands — a true sequence, so the numbers are honest */
.spine{counter-reset:phase}
.spine .phase{counter-increment:phase;border-top:1px solid var(--b3);padding-top:6px}
.spine .phase-h{display:flex;align-items:center;gap:8px;font-size:.82rem;
       font-weight:650;letter-spacing:.01em;color:var(--muted);margin:8px 0 6px}
.spine .phase-h::before{content:counter(phase);display:inline-grid;place-items:center;
       width:1.55em;height:1.55em;border-radius:var(--r-pill);
       background:var(--wash-deep);color:var(--primary-hi);font-size:.74rem;font-weight:700}
.spine .phase-cost{margin-left:auto;font-weight:500}
/* the rail is the run-status stepper: sticky, quiet */
.rail{position:sticky;top:0;z-index:50;background:var(--b2);
      padding-block:10px;margin-bottom:14px;border-bottom:1px solid var(--b3)}
.rail-go{box-shadow:none;border-radius:var(--r-pill)}
.rail li{box-shadow:none;border-radius:var(--r-pill);overflow:hidden}
.rail li[aria-current] ,.rail li.on{border-color:var(--primary)}
@media(max-width:1150px){
  .grid{grid-template-columns:minmax(0,1fr)}
  .spine{position:static;max-height:none;overflow:visible}
  .rail{position:static}
}
@media(prefers-reduced-motion:reduce){.spine,.rail{transition:none}}
