/* LYNNAGEN layout and shared components.
   Consumes tokens from theme.css. Declares no colour literal, no !important.

   v0.9.13: hierarchy is made with spacing, type, alignment and hairlines, not boxes. The
   overview has at most two obvious container levels; the evidence figures sit on the page
   itself between two rules; the operational status is its own quiet row; the professional
   boundary is a footer rail. Motion is an opacity fade of under half a second, once. */

/* ------------------------------------------------------------------ shell */
.shell{max-width:1560px;margin:0 auto;padding:var(--s7) var(--s8) var(--s6)}
@media(max-width:1100px){.shell{padding:var(--s6) var(--s6)}}
@media(max-width:720px){.shell{padding:var(--s5) var(--s4)}}

main[data-phase] > section{display:none}
main[data-phase="queue"]   > section[data-for="queue"],
main[data-phase="cases"]   > section[data-for="cases"],
main[data-phase="running"] > section[data-for="running"],
main[data-phase="bench"]   > section[data-for="bench"],
main[data-phase="signin"]  > section[data-for="signin"],
main[data-phase="account"] > section[data-for="account"],
main[data-phase="operator"] > section[data-for="operator"]{display:block}

/* ------------------------------------------------------------------ sign in (cloud only) */
.signin{max-width:420px;margin:8vh auto 0}
.signin .title{margin-bottom:var(--s2)}
.signin form{margin-top:var(--s5)}
.cloud-user{display:inline-flex;align-items:center;gap:var(--s2);margin-right:var(--s2)}
@media(max-width:720px){.cloud-user .meta{display:none}}

/* ------------------------------------------------------------------ account (cloud only)
   One column of plain sections between hairlines: you, your workspaces, invitations. */
.account{max-width:760px;margin:0 auto}
.account > section{padding:var(--s5) 0;border-top:1px solid var(--line)}
.account > section:first-of-type{border-top:0}
.account .grid2{display:grid;grid-template-columns:1fr 1fr;gap:var(--s3) var(--s4)}
@media(max-width:720px){.account .grid2{grid-template-columns:1fr}}
.account .ws{padding:var(--s4) 0;border-top:1px solid var(--line)}
.account .ws:first-child{border-top:0}
.account .ws-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s3);flex-wrap:wrap}
.account .ws-name{font-size:var(--fs-subhead);font-weight:600}
.account .ws-state{margin-top:var(--s1)}
.account .ws-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2);margin-top:var(--s3)}
.account .ws-actions .check{margin-bottom:0;align-items:center}
.account .plan{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s3);padding:var(--s2) 0}
.account .roster{margin-top:var(--s3)}
.account .roster ul{list-style:none;padding:0;margin:0}
.account .roster li{display:flex;justify-content:space-between;gap:var(--s3);padding:var(--s1) 0}
.account .inline{display:flex;gap:var(--s2);align-items:flex-end;flex-wrap:wrap}
.account .inline .field{flex:1 1 220px;margin:0}
/* two-step sign-in being turned on: the QR code beside the steps, the steps below it when narrow */
.account .ts-setup{display:flex;flex-wrap:wrap;gap:var(--s4);align-items:flex-start;margin:var(--s3) 0}
.account .ts-setup > div{flex:1 1 260px}
.account .ts-qr{background:var(--qr-ground);padding:var(--s2);border:1px solid var(--line);border-radius:var(--r-sm)}
.account .ts-key{font-family:var(--font-mono);font-size:var(--fs-mono-id);letter-spacing:.08em;word-break:break-all;margin:var(--s1) 0 var(--s3)}
.cloud-banner{max-width:1560px;margin:0 auto var(--s4);padding:var(--s3) var(--s4);border:1px solid var(--line-strong);border-radius:6px}
.cloud-target{margin:0 0 var(--s2)}

/* ------------------------------------------------------------------ operator (cloud only; the service's administrators)
   Totals as plain tiles, then one table per subject (2026-10-09). */
.operator{max-width:1560px;margin:0 auto}
.operator > section{padding:var(--s4) 0 0}
.operator .section-title{margin-bottom:var(--s2)}
.op-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:var(--s2);margin:var(--s3) 0}
.op-tile{border:1px solid var(--line);border-radius:var(--r-sm);padding:var(--s2) var(--s3)}
.op-tile strong{display:block;font-size:var(--fs-subhead);font-weight:600}
.operator .mono{font-family:var(--font-mono);font-size:var(--fs-mono-id)}
.operator td{vertical-align:top}

/* ------------------------------------------------------------------ header
   68px, architectural: the mark, a hairline divider, the product name, the version as
   quiet metadata, one hairline below. The sticky dossier offsets are derived from this
   height — change one and change both. */
.app-header{
  position:sticky;top:0;z-index:60;min-height:68px;
  display:flex;align-items:center;gap:var(--s4);
  padding:0 var(--s8);
  background:var(--surface);
  border-bottom:1px solid var(--line);
}
@media(max-width:1100px){.app-header{padding:0 var(--s6)}}
.brand-block{display:flex;align-items:center;gap:var(--s4);min-width:0}
.brand-link{display:flex;align-items:center;text-decoration:none;color:var(--text)}
/* The mark ships in two palettes — LYNNAGEN.svg (navy on light) and LYNNAGEN-dark.svg
   (blue on dark) — so it sits directly on the header surface in both themes. Both files
   are byte-identical geometry; only four colours move. */
.brand-plate{display:inline-flex;align-items:center;padding:0}
.brand-logo{display:block;height:42px;width:auto}
.brand-logo--dark{display:none}
html[data-theme="dark"] .brand-logo--light{display:none}
html[data-theme="dark"] .brand-logo--dark{display:block}
.brand-meta{
  display:flex;align-items:baseline;gap:var(--s3);
  padding-left:var(--s4);border-left:1px solid var(--line);white-space:nowrap;
}
.brand-product{font-size:var(--fs-control);line-height:var(--lh-control);font-weight:var(--w-med);color:var(--text)}
.brand-ver{font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-3);font-variant-numeric:tabular-nums}
.app-header .nav{margin-left:auto;display:flex;align-items:center;gap:var(--s2)}
@media(max-width:720px){
  .app-header{min-height:60px;padding:0 var(--s4)}
  .brand-logo{height:26px}
  .brand-meta{display:none}
}

/* ------------------------------------------------------------------ type roles */
.display{font-size:var(--fs-display);line-height:var(--lh-display);font-weight:var(--w-bold);letter-spacing:-.02em;max-width:26ch}
.masthead-title{font-size:var(--fs-masthead);line-height:var(--lh-masthead);font-weight:var(--w-bold);letter-spacing:-.022em}
.masthead-sub{margin-top:var(--s2);font-size:var(--fs-control);line-height:var(--lh-control);color:var(--text-2)}
.title{font-size:var(--fs-title);line-height:var(--lh-title);font-weight:var(--w-bold);letter-spacing:-.01em}
.subhead{font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--w-med)}
.metric{font-size:var(--fs-metric);line-height:var(--lh-metric);font-weight:var(--w-bold);font-variant-numeric:tabular-nums}
.meta{font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.meta-3{font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-3)}
/* the ONLY 12px role: uppercase micro-label, a handful of uses in the whole product */
.micro{font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:var(--w-med);
  text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.mono{font-family:var(--font-mono);font-size:var(--fs-mono-id);line-height:var(--lh-mono-id);
  overflow-wrap:anywhere}
.num{font-variant-numeric:tabular-nums}
/* The one legitimate !important in the codebase: a utility whose entire job is to override
   a component's own display must win regardless of source order and specificity. */
.hidden{display:none!important}

/* section rhythm */
.block{margin-top:var(--s6)}
.block > h2,.block > h3{margin-bottom:var(--s3)}
h3{font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--w-med);color:var(--text)}

/* ------------------------------------------------------------------ condition strip
   Neutral by construction. Colour is never used to raise the volume of a message —
   red belongs to Pathogenic. */
.strip{
  border-left:2px solid var(--line-strong);
  padding:var(--s2) var(--s4);
  margin-bottom:var(--s2);
  font-size:var(--fs-body);line-height:var(--lh-body);color:var(--text);
}
.strip + .strip{margin-top:0}
.strip button,.strip a{font-size:var(--fs-control)}

/* ------------------------------------------------------------------ buttons
   One filled control per screen: the primary action. Everything else is a hairline. */
.btn{
  appearance:none;border:1px solid transparent;border-radius:var(--r-sm);
  background:var(--accent);color:var(--accent-fg);
  font:var(--w-med) var(--fs-control)/var(--lh-control) var(--font-ui);
  padding:10px 18px;min-height:44px;cursor:pointer;text-decoration:none;
  display:inline-flex;align-items:center;justify-content:center;gap:var(--s2);
  transition:background-color .15s ease,border-color .15s ease;
}
.btn:hover{filter:brightness(1.06)}
.btn:disabled{opacity:.5;cursor:not-allowed;filter:none}
.btn.secondary,.secondary{
  background:transparent;color:var(--text);border-color:var(--line-input);
}
.btn.secondary:hover,.secondary:hover{background:var(--surface-2);border-color:var(--line-strong);filter:none}
.btn.quiet{background:transparent;border-color:transparent;color:var(--accent);padding:8px 6px;min-height:32px}
.btn.quiet:hover{background:var(--surface-2);filter:none}
.btn.block{width:100%;min-height:48px;font-size:var(--fs-subhead);margin-top:0}
.actions{display:flex;gap:var(--s2);align-items:center;flex-wrap:wrap}
.linkback{display:inline-flex;align-items:center;gap:var(--s1);background:none;border:0;
  color:var(--accent);font:var(--w-med) var(--fs-control)/var(--lh-control) var(--font-ui);
  cursor:pointer;padding:4px 0}

/* ------------------------------------------------------------------ forms */
.field{margin-bottom:var(--s4)}
.field > label,.flabel{
  display:block;margin-bottom:var(--s1);
  font-size:var(--fs-control);line-height:var(--lh-control);font-weight:var(--w-med);color:var(--text);
}
input,select,textarea{
  width:100%;
  border:1px solid var(--line-input);border-radius:var(--r-sm);
  background:var(--surface);color:var(--text);
  font:var(--w-reg) var(--fs-control)/var(--lh-control) var(--font-ui);
  padding:10px 12px;min-height:40px;
}
textarea{min-height:120px;resize:vertical;line-height:var(--lh-body)}
input[type=checkbox],input[type=radio]{width:auto;min-height:0;margin:0}
input::placeholder,textarea::placeholder{color:var(--text-3);opacity:1}
.hint{margin-top:var(--s1);font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.check{display:flex;align-items:flex-start;gap:var(--s2);font-size:var(--fs-control);
  line-height:var(--lh-control);margin-bottom:var(--s2)}
.check input{margin-top:3px;flex:0 0 auto}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:var(--s3)}
@media(max-width:620px){.row2{grid-template-columns:1fr}}
.err{margin-top:var(--s3);font-size:var(--fs-control);line-height:var(--lh-control);
  color:var(--text);border-left:2px solid var(--line-strong);padding:var(--s2) var(--s3);
  background:var(--surface-2);white-space:pre-wrap}
.err:empty{display:none}

/* ------------------------------------------------------------------ disclosures */
details{border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);margin-bottom:var(--s2)}
details > summary{
  cursor:pointer;list-style:none;padding:var(--s3) var(--s4);
  font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--w-med);color:var(--text);
  display:flex;justify-content:space-between;align-items:center;gap:var(--s3);
}
details > summary::-webkit-details-marker{display:none}
details > summary::after{content:'+';color:var(--text-2);font-weight:var(--w-med)}
details[open] > summary::after{content:'\2212'}
details > summary > .sum-note{font-size:var(--fs-control);font-weight:var(--w-reg);color:var(--text-2);margin-left:auto;margin-right:var(--s3)}
.details-body{padding:0 var(--s4) var(--s4)}
details details{margin-top:var(--s3);background:var(--surface-2)}

/* ------------------------------------------------------------------ tables */
.tablewrap{border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line);overflow:auto;background:transparent}
/* The case list on a phone: each case one block — its name, then when and its state, then its findings and Open —
   instead of a table whose state and findings sat beyond the screen's right edge. */
@media(max-width:720px){
  section[data-for="cases"] table thead{display:none}
  section[data-for="cases"] table,section[data-for="cases"] tbody{display:block}
  section[data-for="cases"] tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--s3);row-gap:var(--s1);
    padding:var(--s3) 0;border-bottom:1px solid var(--line)}
  section[data-for="cases"] tbody td{display:block;padding:0;border:0}
  section[data-for="cases"] tbody td:nth-child(1),section[data-for="cases"] tbody td:nth-child(5),
  section[data-for="cases"] tbody td:nth-child(6){grid-column:1/-1}
  section[data-for="cases"] tbody td:nth-child(3),section[data-for="cases"] tbody td:nth-child(6):empty{display:none}
}
table{width:100%;border-collapse:collapse;font-size:var(--fs-control);line-height:var(--lh-control)}
th{
  position:sticky;top:0;z-index:2;text-align:left;
  background:var(--bg);color:var(--text-2);
  font-size:var(--fs-meta);font-weight:var(--w-med);
  padding:var(--s3) var(--s4);border-bottom:1px solid var(--line-strong);white-space:nowrap;
}
td{padding:var(--s3) var(--s4);border-bottom:1px solid var(--line);vertical-align:top;color:var(--text)}
tbody tr:last-child td{border-bottom:0}
tbody tr[data-index],tbody tr[data-job]{cursor:pointer}
tbody tr[data-index]:hover td,tbody tr[data-job]:hover td{background:var(--surface-2)}
tbody tr.selected td{background:var(--surface-2)}
tbody tr.selected td:first-child{box-shadow:inset 2px 0 0 var(--accent)}
.sub{display:block;font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.sub-id{display:block;font-family:var(--font-mono);font-size:var(--fs-meta);
  line-height:var(--lh-meta);color:var(--text-3);overflow-wrap:anywhere}
.pager{display:flex;justify-content:space-between;align-items:center;gap:var(--s3);
  margin-top:var(--s3);font-size:var(--fs-control)}

/* ------------------------------------------------------------------ home
   The two actions, composed for 1080p. Rhythm: header → "Clinical review" 48px (the
   shell padding), title → rows 20px, the two rows side by side at 65/35 and ~104px
   tall, rows → disclosure rail 48px. Nothing else on the page: the installed-evidence
   figures that followed were removed on 2026-09-26. */
.home{display:block}
.section-title{font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--w-med);color:var(--text-2);margin-bottom:20px}
.workflow{display:grid;grid-template-columns:65fr 35fr;gap:var(--s4)}
@media(max-width:860px){.workflow{grid-template-columns:1fr}}
.action{
  appearance:none;width:100%;min-height:104px;display:flex;justify-content:space-between;align-items:center;gap:var(--s5);
  padding:var(--s4) var(--s6);border:1px solid var(--line-strong);border-radius:var(--r-sm);
  background:var(--surface);color:var(--text);text-align:left;cursor:pointer;
  font-family:var(--font-ui);transition:border-color .15s ease,background-color .15s ease;
}
.action:hover{border-color:var(--accent);background:var(--surface-2)}
.action--primary{background:var(--accent);color:var(--accent-fg);border-color:var(--accent)}
.action--primary:hover{filter:brightness(1.06);background:var(--accent)}
.action-body{display:flex;flex-direction:column;gap:var(--s1);min-width:0}
.action-name{font-size:var(--fs-title);line-height:var(--lh-title);font-weight:var(--w-bold);letter-spacing:-.01em}
.action--primary .action-name{font-size:var(--fs-metric);line-height:var(--lh-metric)}
.action-sub{font-size:var(--fs-control);line-height:var(--lh-control);opacity:.85}
.action-sub:empty{display:none}
.action-arrow{font-size:var(--fs-metric);line-height:1;flex:0 0 auto}

/* ------------------------------------------------------------------ overview masthead
   The page identity and its two actions. New case is the one filled control on the
   screen; Cases is navigation, with its count in a restrained capsule. */
.queue-head{display:flex;justify-content:space-between;align-items:flex-end;gap:var(--s5);
  margin-bottom:var(--s6);flex-wrap:wrap}
.queue-head .actions{gap:var(--s3)}
.queue-head .btn{min-height:46px;padding:10px 20px;font-size:var(--fs-control)}
.queue-lede{font-size:var(--fs-subhead);line-height:var(--lh-subhead);color:var(--text-2);
  max-width:64ch;margin-top:var(--s2)}
.q-count{
  display:inline-block;min-width:22px;margin-left:var(--s2);padding:0 7px;
  border-radius:var(--r-sm);background:var(--surface-3);color:var(--text-2);
  font-size:var(--fs-micro);line-height:20px;font-weight:var(--w-med);
  font-variant-numeric:tabular-nums;text-align:center;
}
.q-count:empty{display:none}
.queue-note{font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2);margin-bottom:var(--s2)}
.q-track{display:inline-block;width:72px;height:3px;background:var(--surface-3);
  border-radius:var(--r-pill);overflow:hidden;vertical-align:middle;margin-left:var(--s2)}
.q-track i{display:block;height:100%;background:var(--text-3)}
.empty-line{font-size:var(--fs-body);line-height:var(--lh-body);color:var(--text-2);
  padding:var(--s5) 0}

/* ------------------------------------------------------------------ drawer */
.scrim{position:fixed;inset:0;background:rgba(8,12,18,.55);z-index:80}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:min(520px,100vw);z-index:81;
  background:var(--surface);border-left:1px solid var(--line);
  box-shadow:var(--shadow-2);overflow-y:auto;padding:var(--s5);
}
.drawer-head{display:flex;justify-content:space-between;align-items:center;
  gap:var(--s3);margin-bottom:var(--s4)}
.drop{
  border:1px dashed var(--line-input);border-radius:var(--r-md);
  background:var(--surface-2);padding:var(--s6) var(--s4);text-align:center;cursor:pointer;
}
.drop:hover,.drop.drag{border-color:var(--accent);background:var(--surface-3)}
.drop input[type=file]{display:none}
.drop strong{display:block;font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--w-med)}
.filemeta{margin-top:var(--s2);font-size:var(--fs-control);line-height:var(--lh-control);
  color:var(--text);overflow-wrap:anywhere}
.filemeta:empty{display:none}
.what-next{margin-top:var(--s3);font-size:var(--fs-body);line-height:var(--lh-body);color:var(--text-2)}
.what-next:empty{display:none}
.safeguard{margin-top:var(--s3);font-size:var(--fs-body);line-height:var(--lh-body);color:var(--text-2)}

/* ------------------------------------------------------------------ running */
.running-wrap{max-width:640px;margin:0 auto;padding-top:8vh}
.running-top{display:flex;justify-content:space-between;align-items:baseline;
  gap:var(--s4);margin-top:var(--s5)}
.track{height:6px;background:var(--surface-3);border-radius:var(--r-pill);
  overflow:hidden;margin:var(--s3) 0}
.fill{height:100%;width:0;background:var(--accent);transition:width .25s ease}
.running-msg{margin-top:var(--s3);font-size:var(--fs-body);line-height:var(--lh-body);color:var(--text-2)}
.running-msg:empty{display:none}
/* The live log belongs to /advanced/calling and to nothing else. */
.log{
  height:320px;overflow:auto;background:var(--surface-3);color:var(--text-2);
  border-radius:var(--r-sm);padding:var(--s3);
  font-family:var(--font-mono);font-size:var(--fs-mono-log);line-height:var(--lh-mono-log);
  white-space:pre-wrap;
}

/* The helix, revolving in three dimensions, on the running phase only.
   helix.js draws the helix as geometry — two strands and their rungs as points in
   space, projected with perspective on every frame — so it revolves at constant angular
   velocity with no edge-on, no reversal and no easing. The still brand asset stands in
   before the script mounts and under prefers-reduced-motion. */
.helix{
  display:flex;justify-content:center;align-items:center;
  height:190px;margin-bottom:var(--s5);
}
.helix-3d{display:none}
.helix--live .helix-3d{display:block}
.helix-img{display:block;height:100%;width:auto;opacity:.92}
.helix-img--dark{display:none}
html[data-theme="dark"] .helix-img--light{display:none}
html[data-theme="dark"] .helix-img--dark{display:block}
/* The live canvas replaces the still; this has to outrank the themed rule above it. */
html[data-theme] .helix--live .helix-img,.helix--live .helix-img{display:none}
@media(max-width:720px){.helix{height:130px}}

/* ------------------------------------------------------------------ bench
   Title, five tiers, the table, the dossier beside it. */
/* The worklist is a laboratory report's eight-column table: on the bench the page takes the
   width of a wide screen, and the dossier sits beside the table only where both fit. */
.shell[data-phase="bench"]{max-width:2080px}
.bench-grid{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:var(--s6);align-items:start}
/* one column below 1500px, which may be narrower than the worklist: the table then scrolls in its frame (minmax(0, …)),
   rather than widening the page past the screen */
@media(max-width:1499px){.bench-grid{grid-template-columns:minmax(0,1fr)}.dossier{position:static;max-height:none}}
.case-head{display:flex;justify-content:space-between;align-items:flex-end;
  gap:var(--s4);flex-wrap:wrap;margin-bottom:var(--s5)}
.identity{font-size:var(--fs-control);line-height:var(--lh-control);color:var(--text-2);
  max-width:100ch;margin-top:var(--s1)}
/* offsets track .app-header's 68px min-height: 68 + 24 clearance, 68 + 44 for the rail */
.dossier{position:sticky;top:92px;max-height:calc(100vh - 112px);overflow-y:auto;
  border-left:1px solid var(--line);padding:var(--s2) 0 var(--s4) var(--s5)}
.worklist-bar{display:flex;gap:var(--s4);align-items:center;flex-wrap:wrap;margin-bottom:var(--s3)}
.worklist-bar input[type=search]{max-width:420px}
/* The worklist's views: the review tiers, the lists a report keeps apart, the whole callset. */
/* never wider than the bar: on a narrow screen the views wrap onto further lines instead of widening the page */
.scopes{display:inline-flex;flex-wrap:wrap;border:1px solid var(--line-strong);border-radius:var(--r-sm);overflow:hidden;flex:0 0 auto;max-width:100%}
.scopes button{appearance:none;border:0;background:transparent;color:var(--text-2);font-family:var(--font-ui);
  font-size:var(--fs-control);line-height:var(--lh-control);padding:6px 14px;cursor:pointer;white-space:nowrap}
.scopes button + button{border-left:1px solid var(--line-strong)}
.scopes button.hidden{display:none}
.scopes button[aria-pressed="true"]{background:var(--surface-3);color:var(--text);font-weight:var(--w-med)}
.scopes button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.scopes .n{margin-left:var(--s1);color:var(--text-3);font-variant-numeric:tabular-nums;font-weight:var(--w-reg,400)}
.scopes .n:empty{display:none}
.scope-note{margin:0 0 var(--s3);max-width:120ch}
/* Eight columns (nine with patient relevance), read left to right as a laboratory report's
   sequence-variant table is. */
table.seqvar{font-size:var(--fs-meta);line-height:var(--lh-meta);table-layout:fixed}
/* Its columns are shares of its width: on a tablet or a phone the table keeps a readable width and scrolls
   sideways in its frame, instead of breaking every word into letters. */
@media(max-width:1100px){table.seqvar{min-width:900px}}
table.seqvar th{white-space:normal;padding:var(--s2) var(--s3)}
table.seqvar td{padding:var(--s3);overflow-wrap:break-word}
table.seqvar .mono{font-size:var(--fs-meta);overflow-wrap:anywhere}
table.seqvar .sub-id{overflow-wrap:anywhere}
/* the gene's column holds the row's flags too ("Secondary finding", "Biallelic candidate"), and the classification's
   its pill ("Likely pathogenic", "Conflicting classifications"): each wide enough for their longest word */
table.worklist .c-gene{width:10%} table.worklist .c-var{width:14%} table.worklist .c-aa{width:10%}
table.worklist .c-zyg{width:11%}  table.worklist .c-pred{width:14%} table.worklist .c-freq{width:13%}
table.worklist .c-cls{width:14%}  table.worklist .c-dis{width:14%} table.worklist .c-rel{width:9%}
#resultsPanel.no-phenotypes table.worklist col.c-rel{width:0}
.seq-gene{font-style:italic;margin-right:var(--s1)}
.seq-small{font-size:var(--fs-meta)}
.seq-dis + .seq-dis{margin-top:var(--s1)}
.sub-inline{color:var(--text-2)}
table.seqvar .kind{display:block;margin-bottom:var(--s1);color:var(--text-2)}
table.seqvar .lg-tierbadge{margin-left:var(--s1)}
/* Which of the case's lists a row is in: carrier status, secondary findings, what changed. */
.flags{display:flex;flex-wrap:wrap;gap:var(--s1);margin-top:var(--s1)}
.flag{display:inline-block;padding:1px 6px;border:1px solid var(--line-strong);border-radius:var(--r-sm);
  font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2);font-style:normal;white-space:nowrap}
.flag i{font-style:normal;color:var(--text-3)}
.flag--sf,.flag--pair{border-color:var(--accent);color:var(--text)}
/* in the worklist a flag wraps between its words to stay in its column (on one line it ran over the variant beside),
   hyphenating a word too long for it; an allele's name in it breaks anywhere, as HGVS does in the table */
table.seqvar .flag{white-space:normal;overflow-wrap:normal;max-width:100%;hyphens:auto}
table.seqvar .flag i{overflow-wrap:anywhere}
/* OMIM numbers open their entries; quiet until pointed at. */
a.omim{color:inherit;text-decoration:none;border-bottom:1px dotted var(--line-strong)}
a.omim:hover,a.omim:focus-visible{color:var(--accent);border-bottom-color:var(--accent)}
/* The three sortable columns, and the one sorted by. */
table.worklist th[data-sort]{cursor:pointer;user-select:none}
table.worklist th[data-sort]:hover{color:var(--text)}
table.worklist th.sorted{color:var(--text)}
table.worklist th.sorted::after{content:' \2193';color:var(--accent)}
/* A line still being read from the local VEP cache. */
.wait{color:var(--text-3);letter-spacing:1px}
.unread{color:var(--text-3);font-style:italic}
.table-legend{margin-top:var(--s3);max-width:140ch}
/* The dossier's lines of that table: type, in silico, frequency per source. */
.doss-kv{display:grid;grid-template-columns:120px 1fr;gap:var(--s1) var(--s3);margin-top:var(--s3);
  font-size:var(--fs-meta);line-height:var(--lh-meta)}
.doss-kv dt{color:var(--text-2)}
.doss-kv dd{margin:0;color:var(--text)}
.showing{font-size:var(--fs-control);line-height:var(--lh-control);color:var(--text-2);
  display:flex;gap:var(--s2);align-items:center;flex-wrap:wrap}
/* Patient relevance is only a column when there are phenotype terms to score against. */
#resultsPanel.no-phenotypes .col-rel{display:none}
/* A page being fetched dims the one it replaces, after a beat, so a fast answer never flickers. */
#resultsPanel.is-loading tbody{opacity:.55;transition:opacity .2s ease .15s}
/* The way back from a dossier that sits under the table (narrow screens only). */
.doss-back{display:none;margin-bottom:var(--s2)}
@media(max-width:1499px){.doss-back{display:inline-flex}}
/* The dossier's one line of provenance: the source's wording and its review stars. */
.doss-source .stars{letter-spacing:1px;color:var(--text-2);margin-left:var(--s1)}
/* Re-interpretation: the request, and what changed since the case it re-reads. */
.reinterpret textarea,.reinterpret input{width:100%;margin:var(--s1) 0 var(--s3)}
table.changes td{vertical-align:top}
table.changes tr[data-idx]:not([data-idx=""]){cursor:pointer}
table.changes tr[data-idx]:not([data-idx=""]):hover td,table.changes tr[data-idx]:focus-visible td{background:var(--surface-2)}
.filterbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:var(--s3)}
/* Phenotype entry (LG.phenotypeEditor): the features the history was read as, each present
   or absent in words, removable, and a type-ahead to add one. Neutral throughout — a
   feature's status is a word and a pressed state, never a hue. */
.hpo-editor{margin-top:var(--s3)}
.hpo-chips{list-style:none;margin:var(--s2) 0 0;padding:0;display:flex;flex-wrap:wrap;gap:var(--s2)}
.hpo-chips:empty{display:none}
.hpo-chip{
  display:inline-flex;align-items:center;gap:var(--s2);max-width:100%;
  border:1px solid var(--line-strong);border-radius:var(--r-sm);
  padding:2px 2px 2px 10px;background:var(--surface);
  font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text);
}
.hpo-chip .hpo-name{overflow-wrap:anywhere;cursor:default}
.hpo-chip[data-status="absent"] .hpo-name{color:var(--text-2)}
/* Written as possible or to be ruled out: not used until marked. A word and a dashed line, no hue. */
.hpo-chip[data-status="unconfirmed"]{border-style:dashed}
.hpo-flag{font-size:var(--fs-micro);line-height:var(--lh-micro);color:var(--text-2);font-style:italic}
.hpo-seg{display:inline-flex;flex:0 0 auto;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}
.hpo-seg button,.hpo-remove{
  appearance:none;border:0;background:transparent;color:var(--text-2);cursor:pointer;
  font:var(--w-reg) var(--fs-micro)/var(--lh-micro) var(--font-ui);padding:3px 7px;min-height:24px;
}
.hpo-seg button + button{border-left:1px solid var(--line)}
.hpo-seg button[aria-pressed="true"]{background:var(--surface-3);color:var(--text);font-weight:var(--w-med)}
.hpo-remove{font-size:var(--fs-meta);line-height:1;min-width:26px;border-radius:var(--r-sm)}
.hpo-seg button:hover,.hpo-remove:hover{color:var(--text);background:var(--surface-2)}
.hpo-chip button:focus-visible,.hpo-family button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.hpo-add{position:relative;margin-top:var(--s2)}
.hpo-editor .hpo-add input{margin:0}
.hpo-options{
  position:absolute;left:0;right:0;top:100%;z-index:5;list-style:none;margin:2px 0 0;padding:var(--s1) 0;
  background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--r-sm);
  box-shadow:var(--shadow-2);max-height:280px;overflow-y:auto;
}
.hpo-options li{padding:6px 12px;cursor:pointer;font-size:var(--fs-control);line-height:var(--lh-control);color:var(--text)}
.hpo-options li[aria-selected="true"],.hpo-options li[data-i]:hover{background:var(--surface-2)}
.hpo-options li[aria-selected="true"]{box-shadow:inset 2px 0 0 var(--accent)}
.hpo-options .hpo-opt-meta{font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.hpo-options .hpo-none{cursor:default;color:var(--text-2)}
/* A relative's features: listed, muted, never used unless the reviewer says so. */
.hpo-family{margin-top:var(--s2);font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.hpo-family button{appearance:none;border:0;background:none;padding:0;color:var(--accent);
  font:inherit;text-decoration:underline;cursor:pointer}
.hpo-breadth{margin-top:var(--s2);font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.hpo-breadth.warn{color:var(--text);border-left:2px solid var(--line-strong);padding-left:var(--s2)}
.hpo-family:empty,.hpo-breadth:empty{display:none}

/* ------------------------------------------------------------------ conditions
   The disorders one allele points at, inside its dossier: the name, the ontology's own
   description, the clinical picture from the installed feature annotations, the source. */
.pheno-row{margin-top:var(--s2)}
.pheno-row:empty{display:none}
.doss-head{padding-bottom:var(--s4);border-bottom:1px solid var(--line);margin-bottom:var(--s4)}
.doss-key{font-size:var(--fs-title);line-height:var(--lh-title);font-weight:var(--w-bold);letter-spacing:-.01em}
.doss-id{display:block;margin-top:var(--s1);font-family:var(--font-mono);font-size:var(--fs-mono-id);line-height:var(--lh-mono-id);color:var(--text-2);overflow-wrap:anywhere}
/* The facts a decision starts from: the classification chip, then genotype and frequency. */
.doss-facts{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s3);margin-top:var(--s3);
  font-size:var(--fs-control);line-height:var(--lh-control);color:var(--text)}
.doss-note{margin-top:var(--s3);font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
.doss-note:empty{display:none}
.cond-meta{margin-top:var(--s1);font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-2)}
/* Three compartments per condition: the name, the description, the clinical picture as
   one small window per feature. */
.cond{padding:0 0 var(--s5)}
.cond-box{padding:var(--s3) var(--s4);border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface-2)}
.cond-name{margin:0;font-size:var(--fs-subhead);line-height:var(--lh-subhead);font-weight:var(--w-bold);color:var(--text)}
.cond-desc{margin-top:var(--s2);font-size:var(--fs-body);line-height:var(--lh-body);color:var(--text)}
.cond-pic{margin-top:var(--s3)}
.cond-lbl{display:block;margin-bottom:var(--s2);
  font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:var(--w-med);
  text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.cond-feats{display:flex;flex-wrap:wrap;gap:var(--s2)}
.cond-feat{
  display:inline-flex;align-items:baseline;gap:var(--s2);
  padding:5px 10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-2);
  font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text);
}
.cond-feat i{font-style:normal;color:var(--text-3);font-size:var(--fs-micro)}

/* ------------------------------------------------------------------ footer rail
   The professional boundary as product metadata: two quiet lines and a small
   disclosure for the review principles. No card, no container. */
.app-footer{
  max-width:1560px;margin:var(--s4) auto 0;padding:var(--s4) var(--s8) var(--s5);
  display:flex;flex-wrap:wrap;column-gap:var(--s6);row-gap:var(--s2);align-items:baseline;
  font-size:var(--fs-meta);line-height:var(--lh-meta);color:var(--text-3);
  border-top:1px solid var(--line);
}
@media(max-width:1100px){.app-footer{padding:var(--s4) var(--s6)}}
@media(max-width:720px){.app-footer{padding:var(--s4)}}
.disclosure{max-width:96ch}
.app-footer details{margin:0;background:transparent;border:0;flex:1 1 100%;max-width:72ch}
.app-footer details:not([open]){flex:0 0 auto}
.app-footer details > summary{padding:var(--s1) 0;font-size:var(--fs-meta);line-height:var(--lh-meta);
  color:var(--text-2);justify-content:flex-start;gap:var(--s2)}
.app-footer details > summary::after{content:'\25BE';font-size:var(--fs-meta)}
.app-footer details[open] > summary::after{content:'\25B4'}
.app-footer .details-body{padding:var(--s2) 0 0;color:var(--text-2)}

/* ------------------------------------------------------------------ a11y */
:where(a,button,input,textarea,select,summary):focus-visible{outline:2px solid var(--focus);outline-offset:2px}
tbody tr:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}
