/* Biomotif — a workbench, so information design over ornament.
   The four base colours are the ones every sequence viewer uses; the petrol
   accent is chosen because it collides with none of them, so a selection
   highlight never fights base colouring. */

:root {
  --ground: #f4f8f8;
  --surface: #ffffff;
  --surface-2: #eef4f4;
  --ink: #0f1a1e;
  --ink-soft: #33474e;
  --muted: #5c7078;
  --line: #d7e3e5;
  --line-strong: #b9cbcf;
  --accent: #0b6c75;
  --accent-ink: #ffffff;
  --accent-soft: #d6ecee;
  --good: #1f7a4d;
  --warn: #9a6410;
  --crit: #a8332e;
  --base-a: #21804a;
  --base-c: #2358b4;
  --base-g: #a2620f;
  --base-t: #b03631;
  --shadow: 0 1px 2px rgba(15, 26, 30, .06), 0 8px 24px -16px rgba(15, 26, 30, .28);
  --radius: 7px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0d1416;
    --surface: #141e22;
    --surface-2: #1a262b;
    --ink: #dfebee;
    --ink-soft: #b6c9ce;
    --muted: #8299a1;
    --line: #23343a;
    --line-strong: #33474e;
    --accent: #3fb6bf;
    --accent-ink: #06272a;
    --accent-soft: #123037;
    --good: #4fbf7b;
    --warn: #d9a441;
    --crit: #e8736c;
    --base-a: #4fbf7b;
    --base-c: #6699ee;
    --base-g: #dfa54c;
    --base-t: #ec7169;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -18px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --ground: #0d1416; --surface: #141e22; --surface-2: #1a262b;
  --ink: #dfebee; --ink-soft: #b6c9ce; --muted: #8299a1;
  --line: #23343a; --line-strong: #33474e;
  --accent: #3fb6bf; --accent-ink: #06272a; --accent-soft: #123037;
  --good: #4fbf7b; --warn: #d9a441; --crit: #e8736c;
  --base-a: #4fbf7b; --base-c: #6699ee; --base-g: #dfa54c; --base-t: #ec7169;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -18px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

/* macOS hides overlay scrollbars until you scroll, so any pane that overflows
   looks like one that ends. A styled ::-webkit-scrollbar opts out of that:
   Chrome and Safari then lay the bar out inside the box and draw it always.

   The standard scrollbar-width/-color properties cannot be set alongside
   these: Chrome switches to its own implementation the moment it sees one and
   drops every ::-webkit- rule, which is how an earlier version of this block
   cancelled itself out. Firefox, which has only the standard properties, is
   served in the @supports below — Chrome answers true to that selector query,
   Firefox false, so exactly one of the two branches applies. */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
}

/* A class that sets `display` outranks the user agent's [hidden] rule, so the
   hidden assistant composer would otherwise show through. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ------------------------------------------------------------------ header */

/* Off screen until it has focus: the first Tab from the top of the page
   offers the results, past the library and three panels of controls. */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  padding: 6px 10px; border-radius: 5px;
  background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none;
  z-index: 30;
}
.skip-link:focus { top: 12px; }

.masthead {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.wordmark { display: flex; align-items: baseline; gap: 9px; margin-right: 4px; }
.wordmark b { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.wordmark span {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
}
.masthead-stats { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; line-height: 1.25; }
.stat b { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

.workflow-nav {
  display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap;
  max-width: 1560px; margin: 12px auto 0; padding: 0 20px;
}
.workflow-nav > span {
  align-self: center; font-size: 10px; font-weight: 600; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.workflow-nav button {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 155px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); cursor: pointer; box-shadow: var(--shadow);
}
.workflow-nav button:hover { border-color: var(--accent); background: var(--accent-soft); }
.workflow-nav b { font-size: 12px; font-weight: 500; }
.workflow-nav small { color: var(--muted); font-size: 10.5px; }

/* ---------------------------------------------------------------- layout */

.workbench {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px 48px;
  align-items: start;
  max-width: 1560px;
  margin: 0 auto;
}
.work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel > header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.panel > header h2 {
  margin: 0; font-size: 11px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft);
}
.panel > header .spacer { margin-left: auto; }
.panel-body { padding: 14px; }
.panel-note { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 5px;
  font-size: 12.5px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 500;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
.btn-sm { padding: 3px 8px; font-size: 11.5px; }

.field {
  width: 100%; padding: 7px 9px;
  background: var(--ground); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 5px;
}
.field::placeholder { color: var(--muted); }
textarea.field { resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  padding: 2px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  font-size: 11px; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

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

.rail { position: sticky; top: 74px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; }
.rail .panel-body { display: flex; flex-direction: column; gap: 9px; padding-bottom: 9px; flex: 0 0 auto; }
.library-filters { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); }
.library-filters label { display: flex; align-items: center; gap: 6px; }
.library-filters select { width: auto; min-width: 135px; padding: 3px 6px; }

/* The categories and the motif list share the rail's height. The splitter
   between them sets the division; the list takes whatever is left. */
#category-chips {
  flex: 0 0 auto;
  height: 132px;
  overflow-y: auto;
  padding: 0 14px 9px;
  align-content: flex-start;
}
.splitter {
  flex: 0 0 auto;
  height: 11px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: row-resize;
  position: relative;
  touch-action: none;
}
.splitter::after {
  content: "";
  position: absolute; left: 50%; top: 5px;
  width: 30px; height: 1px; margin-left: -15px;
  background: var(--line-strong);
}
.splitter:hover, .splitter:focus-visible { background: var(--accent-soft); }
.splitter:hover::after, .splitter:focus-visible::after { background: var(--accent); }
.splitter.dragging { background: var(--accent-soft); }
.entry-list { overflow-y: auto; flex: 1 1 auto; min-height: 120px; }
.entry {
  display: block; width: 100%; text-align: left;
  padding: 8px 14px;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.entry:hover, .entry:focus-visible { background: var(--surface-2); }
.entry[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.entry-name { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.entry-meta { display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.entry-cat { font-size: 10px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.entry-doc {
  font-family: var(--serif); font-size: 12px; color: var(--muted);
  margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Not applicable to what is loaded, but still worth reading, so it is faded
   rather than removed or moved. Hover and keyboard focus bring it back to full
   strength, since a faded row is still a row you can open. */
.entry.off { opacity: .55; }
.entry.off:hover, .entry.off:focus-visible { opacity: 1; }
.tag-off {
  font-size: 9.5px; padding: 0 5px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--warn);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.tag-template {
  font-size: 9.5px; padding: 0 5px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}

/* ------------------------------------------------------------ retrieval */

.fetch-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fetch-row #fetch-query { flex: 1 1 300px; min-width: 200px; }
.fetch-row select { flex: 0 0 auto; width: auto; }
.fetch-opts {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.fetch-opts label { display: flex; align-items: center; gap: 5px; }
.fetch-opts input[type="number"] { width: 82px; }
.fetch-opts input[type="text"] { width: 190px; }
.fetch-status {
  margin-top: 10px; padding: 7px 11px; border-radius: 5px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.fetch-status.busy { border-color: var(--accent); }
.fetch-status.bad { border-color: var(--crit); color: var(--crit); }
.fetch-status.good { border-color: var(--good); }
.fetch-results {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 5px;
  /* Rows run to about 55px, so 260px showed four of twenty. */
  max-height: min(52vh, 460px);
  overflow-y: auto;
}
.hit-row {
  display: block; width: 100%; text-align: left; padding: 7px 11px;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.hit-row:last-child { border-bottom: 0; }
.hit-row:hover { background: var(--surface-2); }
.hit-row b { font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.hit-row span { display: block; font-family: var(--serif); font-size: 12px; color: var(--muted); }
.hit-row.more {
  background: var(--surface-2); position: sticky; bottom: 0;
  border-top: 1px solid var(--line-strong); border-bottom: 0;
}
.hit-row.more:disabled { cursor: default; }
.hit-row.more b { color: var(--accent); }
.hit-row.more:disabled b { color: var(--muted); }
/* A fade above the pinned footer, so it is obvious the rows continue under it. */
.fetch-results.overflowing .hit-row.more::before {
  content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}
.hit-row.more { position: sticky; }
.hit-row em { font-style: normal; color: var(--ink-soft); font-family: var(--sans); font-size: 11px; }

/* ------------------------------------------------------------- walkthrough */

details.lesson > summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; cursor: pointer; list-style: none;
  background: var(--surface-2);
}
details.lesson > summary::-webkit-details-marker { display: none; }
details.lesson > summary h2 {
  margin: 0; font-size: 11px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft);
}
details.lesson > summary h2::before { content: "▸ "; color: var(--accent); }
details.lesson[open] > summary { border-bottom: 1px solid var(--line); }
details.lesson[open] > summary h2::before { content: "▾ "; }
.lesson-pick { display: flex; flex-direction: column; gap: 6px; }
.lesson-pick button {
  display: block; width: 100%; text-align: left; padding: 8px 11px;
  background: var(--ground); border: 1px solid var(--line); border-radius: 5px; cursor: pointer;
}
.lesson-pick button:hover { border-color: var(--accent); }
.lesson-pick b { display: block; font-size: 13px; }
.lesson-pick span { font-family: var(--serif); font-size: 12.5px; color: var(--muted); }
.lesson-intro { margin: 0 0 10px; font-family: var(--serif); font-size: 13px; color: var(--ink-soft); max-width: 74ch; }
.lesson-steps { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; padding: 0; list-style: none; counter-reset: step; }
.lesson-steps button {
  padding: 2px 9px; border-radius: 20px; font-size: 11.5px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.lesson-steps button::before { counter-increment: step; content: counter(step) " · "; color: var(--muted); }
.lesson-steps button[aria-current="step"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lesson-steps button[aria-current="step"]::before { color: inherit; }
.lesson-steps button.done { border-color: var(--good); }
.lesson-step { padding: 10px 12px; background: var(--ground); border-left: 3px solid var(--accent); border-radius: 0 5px 5px 0; max-width: 78ch; }
.lesson-step h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.lesson-step p { margin: 0 0 6px; font-family: var(--serif); font-size: 13px; color: var(--ink-soft); }
.lesson-step .lesson-look { margin: 0; padding-top: 6px; border-top: 1px dashed var(--line-strong); }
.lesson-step .lesson-look::before { content: "What to look for. "; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }

/* --------------------------------------------------------------- sequence */

.seq-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 10px; }
.record-list { display: flex; flex-wrap: wrap; gap: 6px; }
.record-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 5px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px;
  cursor: pointer; text-align: left;
}
.record-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.record-btn b { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.record-btn span { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ motif */

.composer { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.composer .field { flex: 1; }
.refine-current { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding-top: 6px; }
.assistant-out {
  margin-bottom: 12px; padding: 10px 12px;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 5px;
  font-size: 12.5px;
}
.assistant-out h3 { margin: 0 0 4px; font-size: 12px; font-weight: 600; }
.assistant-out h4 { margin: 9px 0 3px; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.assistant-out p { margin: 0 0 6px; font-family: var(--serif); color: var(--ink-soft); }
.assistant-out .warn-line { color: var(--warn); font-family: var(--sans); font-size: 12px; }
.assistant-out .cost {
  margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.draft-list { margin: 3px 0 7px; padding-left: 20px; }
.draft-source { margin: 7px 0; padding: 8px; overflow-x: auto; background: var(--ground); border: 1px solid var(--line); border-radius: 4px; }
.draft-source code { font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; }
.draft-list li { margin: 2px 0; }
.draft-list .check-ok::marker { color: var(--good); }
.draft-list .check-warning { color: var(--warn); }
.draft-list .check-bad { color: var(--crit); }
.draft-warning { color: var(--warn) !important; font-family: var(--sans) !important; font-size: 12px; }
.draft-actions { padding-top: 3px; border-top: 1px solid var(--line-strong); }

.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 22px; }
.example-group h4 {
  margin: 0 0 5px; font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.example-group h4 em {
  font-style: normal; color: var(--accent); letter-spacing: 0; text-transform: none; font-size: 10px;
}
.example-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
.example-group button {
  display: block; width: 100%; text-align: left;
  padding: 4px 7px; margin: 0;
  background: none; border: 0; border-radius: 4px;
  font-family: var(--serif); font-size: 12.5px; line-height: 1.35; color: var(--ink-soft);
  cursor: pointer;
}
.example-group button:hover { background: var(--accent-soft); color: var(--ink); }

.settings { display: flex; flex-direction: column; gap: 8px; max-width: 60ch; }
.settings label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.settings .hint { max-width: 62ch; }

.motif-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.motif-status { font-size: 12px; font-family: var(--mono); }
.motif-status.ok { color: var(--good); }
.motif-status.bad { color: var(--crit); }

.doc-card {
  margin-top: 12px; padding: 10px 12px;
  background: var(--ground); border-left: 3px solid var(--accent); border-radius: 0 5px 5px 0;
}
.doc-card h3 { margin: 0 0 3px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.doc-card p { margin: 0 0 6px; font-family: var(--serif); font-size: 13px; color: var(--ink-soft); max-width: 68ch; }
.doc-card .ref { font-size: 11.5px; color: var(--muted); }
.tag-evidence { color: var(--warn); font-size: 10px; text-transform: uppercase; }

.export-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.export-pick .field { width: auto; padding: 3px 7px; }

/* --------------------------------------------------------------- explain */

.explain { display: flex; flex-direction: column; gap: 12px; }
.explain section { max-width: 74ch; }
.explain h3 {
  margin: 0 0 3px; font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.explain p { margin: 0; font-family: var(--serif); font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.explain strong { color: var(--ink); font-weight: 600; }
.explain code { font-family: var(--mono); font-size: 12px; }
.explain section.muted p { font-family: var(--sans); font-size: 12px; color: var(--muted); }
/* The verdict is the part people misread, so it carries the weight. */
.explain section.strong { border-left: 3px solid var(--good); padding-left: 11px; }
.explain section.some { border-left: 3px solid var(--warn); padding-left: 11px; }
.explain section.noise { border-left: 3px solid var(--line-strong); padding-left: 11px; }
.explain section.none { border-left: 3px solid var(--line); padding-left: 11px; }

/* A defined term: dotted underline, definition on hover or keyboard focus.
   The card is positioned within the paragraph, so a term near the right
   edge is clamped by max-width rather than running off the pane. */
.term { border-bottom: 1px dotted var(--muted); cursor: help; position: relative; border-radius: 0; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.term-def {
  display: none; position: absolute; left: 0; top: 1.5em; z-index: 15;
  width: max-content; max-width: min(34ch, 80vw);
  padding: 7px 10px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 5px; box-shadow: var(--shadow);
  font-family: var(--sans); font-size: 12px; line-height: 1.45; font-weight: 400;
}
.term:hover .term-def, .term:focus .term-def, .term:focus-within .term-def { display: block; }

/* ---------------------------------------------------------------- results */

.summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.summary-item {
  padding: 5px 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px;
  font-size: 12px;
}
.summary-item b { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.scroller { overflow-x: auto; }

table.hits { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.hits th {
  text-align: left; padding: 5px 9px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
table.hits td { padding: 5px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.hits tbody tr { cursor: pointer; }
table.hits tr:hover td { background: var(--surface-2); }
table.hits tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.hits tr.picked td { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
table.hits .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
table.hits .mono { font-family: var(--mono); word-break: break-all; }
table.hits .name { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.strand { font-family: var(--mono); font-weight: 600; }
.strand.fwd { color: var(--good); }
.strand.rev { color: var(--warn); }
.binds { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.binds b { color: var(--ink-soft); font-weight: 500; }

.track { font-family: var(--mono); font-size: 12.5px; line-height: 1.45; white-space: pre; }
.track .gutter { color: var(--muted); user-select: none; }
.track .A { color: var(--base-a); } .track .C { color: var(--base-c); }
.track .G { color: var(--base-g); } .track .T { color: var(--base-t); }
.track mark {
  background: var(--accent-soft); color: inherit;
  border-bottom: 2px solid var(--accent); border-radius: 2px 2px 0 0;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.track mark:hover { background: var(--accent); color: var(--accent-ink); }
.track mark:hover span { color: inherit; }
/* Picked out from the table: solid, so it reads at a glance among the rest. */
.track mark.flash { background: var(--accent); color: var(--accent-ink); outline: 2px solid var(--accent); outline-offset: 1px; }
.track mark.flash span { color: inherit; }
.track .lane { color: var(--accent); }
.track .skip { color: var(--muted); font-style: italic; }

/* The gel: a dark slab whatever the theme, since that is what a gel looks like
   on a transilluminator, with bands in the accent so they read as data. */
.gel-box { display: flex; justify-content: center; }
.gel { max-width: 100%; height: auto; font-family: var(--mono); }
.gel-slab { fill: #1b2327; }
.gel-well { fill: #0b1013; }
.gel-band { fill: #7fd8e0; }
.gel-label { fill: var(--ink-soft); font-size: 11px; }
.gel-size { fill: #b6c9ce; font-size: 10px; font-variant-numeric: tabular-nums; }
.gel-note { padding-top: 0; max-width: 78ch; }
.gel-note a { color: var(--accent); }

.empty { padding: 26px 14px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 13px; }

/* ------------------------------------------------------------------ misc */

.hint { font-size: 11.5px; color: var(--muted); }
.hint code { font-family: var(--mono); font-size: 11px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.grammar { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12px; margin: 0; }
.grammar dt { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.grammar dd { margin: 0; color: var(--muted); }
details.help { margin-top: 10px; }
.panel-body > details.help:first-child { margin-top: 0; }
details.help > summary { cursor: pointer; font-size: 12px; color: var(--accent); }
details.help > div { padding-top: 8px; }

@media (max-width: 900px) {
  .workflow-nav { padding: 0 12px; }
  .workflow-nav > span { width: 100%; }
  .workflow-nav button { flex: 1 1 145px; }
  .workbench { grid-template-columns: 1fr; padding: 12px; }
  .rail { position: static; max-height: none; }
  .entry-list { max-height: 300px; }
  /* Stacked on a narrow screen there is no shared height to divide. */
  .splitter { display: none; }
  #category-chips { height: auto; max-height: 200px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
