/* Bench app: dense and exact. Identifiers are monospace so a barcode reads the same everywhere. */
body { font-size: .9rem; }
.loading { padding: 4rem 1.25rem; text-align: center; color: var(--ink-3); }
.dim { color: var(--ink-3); }
.small { font-size: .82rem; }
.strong { font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--action); cursor: pointer; text-decoration: underline; }

/* sign-in */
.signin { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem; }
.signin h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 1.75rem 0 .5rem; }
.signin .sub { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.4rem; }
.signin .sub.small { font-size: .9rem; margin-top: 2rem; }
.desks { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 34rem) { .desks { grid-template-columns: 1fr; } }
.desk { text-align: left; font: inherit; cursor: pointer; background: var(--surface); color: var(--ink);
        border: 1px solid var(--line); border-radius: .4rem; padding: 1rem 1.1rem; }
.desk:hover { border-color: var(--action); box-shadow: var(--shadow); }
.desk b { display: block; font-size: 1.15rem; }
.desk span { display: block; color: var(--ink-2); font-size: .9rem; margin: .15rem 0 .7rem; }
.desk i { font-style: normal; font-weight: 600; font-size: .82rem; font-family: var(--mono); color: var(--action); }
.signin details { margin-top: 1.5rem; color: var(--ink-2); }
.signin summary { cursor: pointer; }
.manual { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; margin-top: .9rem; }
.manual label { display: grid; gap: .25rem; font-size: .85rem; }

input, textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--ink-3);
                          border-radius: var(--radius); padding: .4rem .55rem; max-width: 100%; }
textarea { width: 100%; resize: vertical; }

/* shell */
.shell { display: grid; grid-template-columns: 13.5rem 1fr; min-height: calc(100vh - 2.1rem); }
aside { background: var(--bench); color: var(--bench-ink); padding: 1.1rem .9rem; display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: 0; height: 100vh; padding-bottom: 3.2rem; overflow-y: auto; align-self: start; }
aside .mark small { color: inherit; opacity: .6; }
aside nav { display: grid; gap: .15rem; }
aside nav a { color: inherit; text-decoration: none; padding: .45rem .65rem; border-radius: var(--radius); opacity: .8; font-size: .93rem; white-space: nowrap; }
aside nav a:hover { opacity: 1; background: rgba(255, 255, 255, .07); }
aside nav a.on { opacity: 1; background: rgba(255, 255, 255, .12); font-weight: 600; box-shadow: inset .2rem 0 0 #56b4e9; }
aside :focus-visible { outline-color: #8ccbf2; }
.me { margin-top: auto; display: grid; gap: .3rem; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1rem; }
.me b { font-size: 1rem; }
.me span { opacity: .7; font-family: var(--mono); font-size: .8rem; }
.me .switch { display: grid; gap: .25rem; margin-top: .6rem; opacity: .9; }
.me select { width: 100%; padding: .3rem .4rem; font-size: .85rem; }
.me .linkish { color: inherit; opacity: .75; justify-self: start; margin-top: .4rem; }
main { padding: 1.5rem 1.75rem 4rem; min-width: 0; max-width: 82rem; }
@media (max-width: 54rem) {
  .shell { grid-template-columns: 1fr; }
  aside { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .65rem 1rem; position: static; height: auto; overflow: visible; min-width: 0; }
  aside nav { display: flex; order: 3; flex-basis: 100%; min-width: 0; overflow-x: auto; }
  .scroll table { min-width: 36rem; }
  .scroll td:first-child { min-width: 11rem; }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; grid-auto-flow: column; align-items: center; gap: .6rem; }
  .me b, .me .switch { display: none; }
  .me .linkish { margin: 0; }
  main { padding: 1.1rem .9rem 3rem; }
}

header.page { margin-bottom: 1.1rem; }
header.page h1 { font-size: 1.55rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
header.page h1 .chip { font-size: .78rem; }
header.page p { color: var(--ink-2); margin-top: .3rem; font-size: .98rem; max-width: 54rem; }
.crumb { margin-bottom: .7rem; }
.crumb a { text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: .4rem; margin-bottom: 1rem; overflow: hidden; }
.card-head { padding: .75rem 1rem .65rem; }
.card-head h2 { font-size: .98rem; font-weight: 700; letter-spacing: 0; display: flex; align-items: center; gap: .5rem; }
.card-head p { color: var(--ink-3); font-size: .84rem; margin-top: .15rem; }
.count { font-family: var(--mono); font-size: .75rem; font-weight: 700; background: var(--sunk); color: var(--ink-2); border-radius: .2rem; padding: .1rem .4rem; }
.empty { padding: .1rem 1rem .9rem; color: var(--ink-3); }
.empty.pad { padding-top: .9rem; }
.lbody .empty { padding: 0; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
     font-weight: 700; padding: .4rem 1rem; background: var(--sunk); border-block: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .5rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-go] { cursor: pointer; }
tr[data-go]:hover td, tr[data-go]:focus-visible td { background: var(--action-soft); }
td .chip { vertical-align: middle; }

.note { color: var(--ink-2); font-size: .86rem; margin-top: .4rem; max-width: 40rem; }
.note.bad { border-left: .2rem solid var(--bad); padding-left: .6rem; }
.note.bad b { color: var(--bad); }
.note.boxed { background: var(--bad-soft); padding: .6rem .8rem; border-radius: var(--radius); margin: 0 0 1rem; color: var(--ink); max-width: none; font-size: .92rem; }

.stages { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stages a { text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--radius); padding: .45rem .8rem; font-size: .82rem; min-width: 5rem; }
.stages a b { display: block; font-family: var(--mono); font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.stages a.on { border-color: var(--ink); box-shadow: inset 0 -.2rem 0 var(--action); }

/* Q30: a bar, the number, and a rule at the 75% threshold */
.q30 { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.track { position: relative; display: inline-block; width: 6rem; height: .55rem; background: var(--line-2); border-radius: 0 .2rem .2rem 0; }
.track i { display: block; height: 100%; background: var(--bar); border-radius: 0 .2rem .2rem 0; }
.track.low i { background: var(--bar-flag); background-image: repeating-linear-gradient(135deg, transparent 0 .25rem, rgba(255, 255, 255, .35) .25rem .4rem); }
.track::after { content: ""; position: absolute; left: 75%; top: -.2rem; bottom: -.2rem; border-left: 2px solid var(--ink); }

/* index sequences: the four base colours used by sequence viewers; the letters carry the meaning */
.seq { font-family: var(--mono); letter-spacing: .05em; white-space: nowrap; }
.seq i { font-style: normal; font-weight: 600; }
.seq .bA { color: var(--ok); } .seq .bC { color: var(--action); } .seq .bG { color: var(--warn-ink); } .seq .bT { color: var(--bad); }

/* detail pages */
.stepper { list-style: none; display: flex; margin: 0 0 1rem; padding: 0; font-size: .8rem; overflow-x: auto; }
.stepper li { flex: 1; min-width: 5.6rem; padding: .55rem .3rem 0 0; border-top: .22rem solid var(--line); color: var(--ink-3); white-space: nowrap; }
.stepper li.past { border-color: var(--ok); color: var(--ink-2); }
.stepper li.past span { color: var(--ok); }
.stepper li.now { border-color: var(--action); color: var(--ink); font-weight: 700; }
.stepper li.now span { color: var(--action); }
.side { margin: 0 0 1rem; color: var(--ink-2); }
.next { border-left: .25rem solid var(--action); }
.actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.actions:empty { display: none; }
.next .actions { padding: 0 1rem .9rem; }
.lbody .actions, .report .actions { margin-top: .6rem; }
td .actions { justify-content: flex-end; }
.inline { flex-basis: 100%; display: grid; gap: .6rem; background: var(--sunk); border-radius: var(--radius); padding: .8rem; margin-top: .3rem; max-width: 34rem; text-align: left; }
.inline label { display: grid; gap: .25rem; font-size: .85rem; font-weight: 600; }
.inline .row { display: flex; gap: .5rem; }
.inline.load { margin: .2rem 1rem 1rem; max-width: none; grid-template-columns: 2fr 1.4fr 5rem; align-items: end; border: 1px dashed var(--line); }
.inline.load h3, .inline.load .row { grid-column: 1 / -1; }
.inline.load h3 { font-size: .9rem; }
.inline.load select, .inline.load input { width: 100%; }
@media (max-width: 40rem) { .inline.load { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: .4rem; overflow: hidden; margin: 0 0 1rem; }
@media (max-width: 60rem) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { background: var(--surface); padding: .7rem 1rem; min-width: 0; }
.facts dt { font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.facts dd { margin: .2rem 0 0; font-size: .98rem; font-weight: 600; }
.facts small { display: block; font-weight: 400; color: var(--ink-2); font-size: .82rem; margin-top: .15rem; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; align-items: start; }
.cols > div { min-width: 0; }
@media (max-width: 74rem) { .cols { grid-template-columns: 1fr; } }

/* the lineage: specimen → custody → library → run → analysis, one row per stage */
.lrow { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 1rem; padding: .75rem 1rem; border-top: 1px solid var(--line-2); }
.lineage > .lrow:first-child { border-top: 0; }
.lstage { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding-top: .2rem; position: relative; }
.lstage.id { text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--ink); }
.lbody { min-width: 0; }
.lhead { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .98rem; }
@media (max-width: 30rem) { .lrow { grid-template-columns: 1fr; gap: .2rem; } }
.kv { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: .4rem 0 0; }
.kv div { display: flex; gap: .4rem; align-items: baseline; min-width: 0; }
.kv dt { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.custody { list-style: none; margin: 0; padding: 0; }
.custody li { padding: 0 0 .45rem .9rem; border-left: 2px solid var(--line); position: relative; }
.custody li:last-child { padding-bottom: .2rem; }
.custody li::before { content: ""; position: absolute; left: -.33rem; top: .4rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ink-3); }
.custody span { display: block; color: var(--ink-3); font-size: .8rem; font-family: var(--mono); }
.report { padding: .2rem 1rem 1rem; border-top: 1px solid var(--line-2); }
.report:first-of-type { border-top: 0; }
.report blockquote { margin: .6rem 0 .2rem; padding: .5rem .8rem; border-left: .2rem solid var(--line); background: var(--paper); font-size: .95rem; }

.timeline { list-style: none; margin: 0; padding: 0 1rem 1rem 1.1rem; }
.timeline li { position: relative; padding: 0 0 .8rem 1.1rem; border-left: 2px solid var(--line); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -.4rem; top: .3rem; width: .65rem; height: .65rem; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 .2rem var(--surface); }
.timeline li.success::before { background: var(--ok); }
.timeline li.warning::before { background: var(--warn); }
.timeline li.error::before { background: var(--bar-flag); border-radius: 0; }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--ink-3); font-size: .8rem; }

.done, .refused { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; }
.done { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.refused { background: var(--bad-soft); color: var(--ink); border-left: .3rem solid var(--bad); }
.refused b { color: var(--bad); }
.refused .rule { display: block; font-family: var(--mono); font-size: .78rem; color: var(--ink-2); margin-top: .25rem; }

.legal-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 1rem 1.25rem; font-size: .78rem; color: var(--ink-3); position: relative; z-index: 1; }
.legal-bar p { max-width: 72rem; margin: 0 auto; }
