/* Dissent — stylesheet.
   Type is deliberately large: this is a worksheet a person reads carefully and
   checks line by line, not a dashboard glanced at. Chart labels are set at
   15-16px rather than the 10-11px charting libraries default to, because an
   unreadable axis label is the same as no label. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --border: #ddd8d0;
  --border-strong: #c3bcb1;
  --text: #1c1a17;
  --text-2: #55504a;
  /* 4.5:1 against every background it is used on, which #837c72 was not:
     it measured 3.95 on the page background and 3.69 on the tinted panels,
     and this token carries the 14px labels -- the smallest type on the page
     and the text most in need of the contrast. */
  --text-3: #726b61;

  --path: #a8321e;
  --path-bg: #fbeeea;
  --benign: #1f6a4d;
  --benign-bg: #e9f4ef;
  /* 4.39:1 behind the classification pills, just under the 4.5 small text
     needs. These pills carry the record counts a reader checks line by line. */
  --uncertain: #806419;
  --uncertain-bg: #faf2dd;
  --neutral: #4a5a7a;
  --neutral-bg: #eef1f7;

  --high: #a8321e;
  /* Darkened from #a8731e, which measured 3.66:1 behind the warn badges and
     3.92 on the page -- under the 4.5:1 small text needs. This token also
     draws the review-star glyphs, which are content rather than decoration. */
  --medium: #8a5e18;
  --low: #5d6b7a;

  --accent: #2b4a7e;
  /* Text on top of --accent. Buttons hardcoded #fff, which is right over
     the dark blue here and unreadable over the light blue the dark theme
     uses -- the primary button measured 2.19:1 in dark mode. */
  --on-accent: #ffffff;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --radius: 10px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16150f;
    --surface: #1e1d17;
    --surface-2: #26251d;
    --border: #38362c;
    --border-strong: #514e40;
    --text: #f0ece2;
    --text-2: #c0bab0;
    --text-3: #9b958a;

    --path: #f0917c;
    --path-bg: #33201b;
    --benign: #7fc7a6;
    --benign-bg: #162a22;
    --uncertain: #e0c069;
    --uncertain-bg: #2d2616;
    --neutral: #9db0d4;
    --neutral-bg: #1d2230;

    --high: #f0917c;
    --medium: #e0b069;
    --low: #a0aab8;
    --accent: #9db0d4;
    --on-accent: #16150f;
  }
}

:root[data-theme="dark"] {
  --bg: #16150f;
  --surface: #1e1d17;
  --surface-2: #26251d;
  --border: #38362c;
  --border-strong: #514e40;
  --text: #f0ece2;
  --text-2: #c0bab0;
  --text-3: #9b958a;
  --path: #f0917c;
  --path-bg: #33201b;
  --benign: #7fc7a6;
  --benign-bg: #162a22;
  --uncertain: #e0c069;
  --uncertain-bg: #2d2616;
  --neutral: #9db0d4;
  --neutral-bg: #1d2230;
  --high: #f0917c;
  --medium: #e0b069;
  --low: #a0aab8;
  --accent: #9db0d4;
  --on-accent: #16150f;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- masthead ---------- */

header.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 0 22px;
}

.brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }

.brand h1 {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.015em;
}

.brand .tag {
  font-size: 17px;
  color: var(--text-2);
  font-style: italic;
}

.theme-toggle {
  margin-left: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }

/* ---------- search ---------- */

.searchbar { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.searchbar input {
  flex: 1 1 320px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 19px;
  padding: 14px 16px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.searchbar input:focus { outline: none; border-color: var(--accent); }

.searchbar select {
  font-size: 16px;
  padding: 0 12px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.searchbar button {
  font-size: 18px;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  font-family: inherit;
}
.searchbar button:disabled { opacity: 0.55; cursor: progress; }

.examples { margin-top: 16px; }
.examples-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin-bottom: 9px;
}
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono);
  font-size: 15px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--text); }

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

main { padding: 30px 0 80px; }
section { margin-bottom: 34px; }

h2.section-title {
  font-family: var(--serif);
  font-size: 27px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.section-note { font-size: 15.5px; color: var(--text-2); margin: 0 0 16px; max-width: 72ch; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

/* ---------- identity ---------- */

.identity { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline; }
.identity .name { font-family: var(--mono); font-size: 23px; font-weight: 600; }
.identity .meta { font-family: var(--mono); font-size: 16px; color: var(--text-2); }
.identity a { color: var(--accent); }

/* ---------- plain summary ---------- */

/* Set large and in the serif face: this is the one line in the report that
   assumes no background, and it has to win the reader's attention over the
   verdict cards below it. */
.summary {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.45;
  margin: 0;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 62ch;
}

/* ---------- landing hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 40px;
  align-items: center;
  padding: 18px 0 8px;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 24px; } }

.hero-figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
}
.hero-number {
  font-family: var(--serif);
  font-size: 86px;
  line-height: 1;
  font-weight: 700;
  color: var(--path);
  letter-spacing: -0.03em;
}
.hero-caption { font-size: 18px; line-height: 1.45; margin-top: 14px; color: var(--text); }
.hero-caption em { color: var(--path); font-style: italic; }
.hero-source {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-family: var(--mono);
}
.hero-text p { font-size: 17.5px; color: var(--text-2); max-width: 60ch; margin: 0 0 14px; }
.hero-cta { font-weight: 600; color: var(--text) !important; }

/* ---------- verdict comparison ---------- */

.verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .verdicts { grid-template-columns: 1fr; } }

.verdict { border-radius: var(--radius); border: 1px solid var(--border); padding: 20px 22px; }
.verdict .who {
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 7px;
}
.verdict .call { font-size: 26px; font-weight: 700; line-height: 1.2; }
.verdict .sub { font-size: 15px; color: var(--text-2); margin-top: 8px; }

.v-pathogenic { background: var(--path-bg); border-color: var(--path); }
.v-pathogenic .call { color: var(--path); }
.v-benign { background: var(--benign-bg); border-color: var(--benign); }
.v-benign .call { color: var(--benign); }
.v-uncertain { background: var(--uncertain-bg); border-color: var(--uncertain); }
.v-uncertain .call { color: var(--uncertain); }
.v-none { background: var(--surface-2); }
.v-none .call { color: var(--text-3); font-size: 20px; }

.verdict-banner {
  margin-top: 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 650;
  padding: 13px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  color: var(--text);
}
.verdict-banner.opposed {
  background: var(--path-bg);
  border-color: var(--path);
  color: var(--path);
}

.crit .plain {
  font-size: 12.5px;
  line-height: 1.32;
  color: var(--text-2);
  margin-top: 6px;
}
.crit-detail .formal {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.reasoning {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text-2);
  background: var(--surface-2);
  border-left: 3px solid var(--border-strong);
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- conflicts ---------- */

.conflict {
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  margin-bottom: 13px;
}
.conflict.high { border-left-color: var(--high); }
.conflict.medium { border-left-color: var(--medium); }
.conflict.low { border-left-color: var(--low); }

.conflict .top { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.sev {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.sev.high { background: var(--path-bg); color: var(--high); }
.sev.medium { background: var(--uncertain-bg); color: var(--medium); }
.sev.low { background: var(--neutral-bg); color: var(--low); }

.conflict h3 { font-size: 19.5px; margin: 0; font-weight: 650; line-height: 1.35; flex: 1 1 320px; }
.conflict p { font-size: 16px; color: var(--text-2); margin: 11px 0 0; max-width: 84ch; }
.conflict p.baseline {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--text);
  background: var(--surface-2);
  border-left: 3px solid var(--neutral);
  padding: 11px 14px;
  border-radius: 0 7px 7px 0;
}
.conflict .srcs { margin-top: 11px; font-size: 14.5px; }
/* Every source link, not only the ones inside a conflict card. The criterion
   details had no rule, so they fell back to the user agent's default link
   blue -- 1.64:1 on the dark surface, which is unreadable, on exactly the
   links that let a reader check a claim. */
.srcs a { color: var(--accent); margin-right: 14px; }

.quiet-panel {
  padding: 20px 22px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 16.5px;
  background: var(--surface);
}

/* ---------- criteria grid ---------- */

.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14.5px; color: var(--text-2); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--border-strong); display: inline-block; }
.sw-met { background: var(--path); }
.sw-met-b { background: var(--benign); }
.sw-notmet { background: var(--surface-2); }
.sw-na { background: transparent; border-style: dashed; }
.sw-insuf { background: var(--uncertain); }
.sw-manual { background: var(--border-strong); }

/* Wider cards: each one now carries a sentence, not just a code. */
.crit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }

.crit {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.crit:hover { border-color: var(--accent); }
.crit .code { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.crit .st { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-top: 3px; }

.crit.met-path { background: var(--path-bg); border-color: var(--path); }
.crit.met-path .code { color: var(--path); }
.crit.met-ben { background: var(--benign-bg); border-color: var(--benign); }
.crit.met-ben .code { color: var(--benign); }
.crit.insufficient { background: var(--uncertain-bg); border-color: var(--uncertain); }
.crit.insufficient .code { color: var(--uncertain); }
.crit.manual { background: var(--surface-2); }
.crit.manual .code,
.crit.not_met .code,
.crit.not_applicable .code { color: var(--text-3); }
.crit.not_met { opacity: 0.72; }
/* Not applicable is drawn fainter still, and dashed: it is not a finding
   about this variant at all. */
.crit.not_applicable { opacity: 0.5; border-style: dashed; }

.crit-detail {
  margin-top: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 18px 20px;
}
.crit-detail h4 { margin: 0 0 4px; font-size: 20px; }
.crit-detail .codeline { font-family: var(--mono); font-size: 15px; color: var(--text-3); margin-bottom: 10px; }
.crit-detail p { font-size: 16.5px; margin: 10px 0 0; max-width: 84ch; }
.crit-detail .needs { color: var(--text-2); border-top: 1px solid var(--border); padding-top: 11px; margin-top: 14px; }

/* ---------- charts ---------- */

/* One chart per row. Squeezed into a half-width column the SVG scaled to
   about 0.4, which rendered 15px labels at roughly 6px -- the charts were
   accurate and unreadable. Full width puts the scale factor above 1. */
.charts { display: grid; grid-template-columns: 1fr; gap: 18px; }
.chart-card svg { max-width: 100%; margin: 0 auto; }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.chart-card h3 { font-size: 19px; margin: 0 0 3px; }
.chart-card .cap { font-size: 14.5px; color: var(--text-2); margin: 0 0 14px; }
.chart-card svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Chart text. Set here rather than per-element so every label is legible. */
svg .ax-label { font-size: 17px; fill: var(--text-2); font-family: var(--sans); }
svg .ax-value { font-size: 18px; fill: var(--text); font-family: var(--mono); font-weight: 700; }
svg .ax-title { font-size: 15px; fill: var(--text-3); font-family: var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
svg .thresh-label { font-size: 16px; fill: var(--text-3); font-family: var(--sans); font-weight: 600; }
svg .bar-name { font-size: 18px; fill: var(--text); font-family: var(--sans); }

/* ---------- tables ---------- */

table.data { width: 100%; border-collapse: collapse; font-size: 16px; }
table.data th {
  text-align: left;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border-strong);
  padding: 9px 11px;
  font-weight: 600;
}
table.data td { padding: 10px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data .mono { font-family: var(--mono); font-size: 15px; }
.stars { color: var(--medium); letter-spacing: 1.5px; white-space: nowrap; }
.pill { font-size: 14px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.p { background: var(--path-bg); color: var(--path); }
.pill.b { background: var(--benign-bg); color: var(--benign); }
.pill.u { background: var(--uncertain-bg); color: var(--uncertain); }
.pill.n { background: var(--surface-2); color: var(--text-3); }

/* ---------- sources + footer ---------- */

.srcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.src { border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; background: var(--surface); font-size: 15px; }
.src .nm { font-family: var(--mono); font-weight: 600; }
.src .dt { color: var(--text-3); font-size: 14px; }
.src.bad { border-color: var(--high); background: var(--path-bg); }

.disclaimer {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 18px 20px;
  font-size: 16px;
  color: var(--text-2);
  max-width: 88ch;
}
.disclaimer strong { color: var(--text); }

footer.foot {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  font-size: 14.5px;
  color: var(--text-3);
}
footer.foot a { color: var(--accent); }

/* ---------- states ---------- */

.status { font-size: 17px; color: var(--text-2); padding: 34px 0; text-align: center; }
.error {
  border: 1px solid var(--high);
  background: var(--path-bg);
  color: var(--path);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 16.5px;
}
.spinner {
  display: inline-block; width: 15px; height: 15px; margin-right: 9px;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.hidden { display: none !important; }

/* ---------- scale page ---------- */

.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { text-decoration: underline; }

.scale-lede {
  font-size: 16.5px;
  color: var(--text-2);
  max-width: 76ch;
  margin: 18px 0 0;
}
.scale-lede a { color: var(--accent); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top-width: 5px;
  border-radius: var(--radius);
  padding: 24px 22px;
}
.tile.bad { border-top-color: var(--path); }
.tile.warn { border-top-color: var(--medium); }

.tile-figure {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.tile.bad .tile-figure { color: var(--path); }
.tile.warn .tile-figure { color: var(--medium); }

.tile-label { font-size: 16.5px; line-height: 1.4; margin-top: 12px; color: var(--text); }
.tile-sub {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-3);
  margin-top: 11px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.tiles-source {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-3);
  margin: 16px 0 0;
}

.gene-card {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--path);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 26px;
}
.gene-name { font-family: var(--mono); font-size: 23px; font-weight: 700; }
.gene-rate {
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--path);
  margin: 4px 0 10px;
  letter-spacing: -0.025em;
}
.gene-detail { font-size: 17px; color: var(--text); max-width: 62ch; }
.gene-rank {
  font-size: 16px;
  color: var(--text-2);
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  max-width: 62ch;
}

#gene-chart svg, #submitters-chart svg { display: block; width: 100%; height: auto; overflow: visible; }

.hero-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.hero-link:hover { border-bottom-color: var(--accent); }

/* ---------- narrow screens ---------- */

/* Variant identifiers are long unbroken monospace strings -- an HGVS name such
   as NM_000410.4(HFE):c.845G>A (p.Cys282Tyr) is 40 characters with no spaces
   the browser will break at. Left alone it pushed the page to 916px on a
   375px viewport. */
.identity .name,
.identity .meta,
table.data .mono,
.crit-detail .codeline,
.src .nm {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Grid and flex children default to min-width:auto, which refuses to shrink
   below their content. */
.verdicts > *,
.crit-grid > *,
.charts > *,
.tiles > *,
.srcgrid > * {
  min-width: 0;
}

/* A wide table is better scrolled than squashed to illegibility. */
#clinvar-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data { min-width: 620px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand h1 { font-size: 32px; }
  .summary { font-size: 20px; padding: 18px 18px; }
  .hero-number { font-size: 62px; }
  .tile-figure { font-size: 44px; }
  .gene-rate { font-size: 44px; }
  h2.section-title { font-size: 23px; }
  .identity .name { font-size: 18px; }
  .conflict h3 { font-size: 17.5px; }
  .crit-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  /* Charts are authored at a fixed viewBox width; let them scroll rather than
     scale the labels down to nothing. */
  .chart-card { overflow-x: auto; }
  .chart-card svg { min-width: 520px; }
}

/* ---------- opposed-variant list ---------- */

.opposed-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 15.5px;
  color: var(--text-2);
}
.opposed-controls label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.opposed-controls input { width: 17px; height: 17px; accent-color: var(--accent); }
.opposed-count { font-family: var(--mono); font-size: 14px; color: var(--text-3); }

.opposed-row {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--path);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  margin-bottom: 9px;
  text-decoration: none;
  color: inherit;
}
.opposed-row:hover { border-color: var(--accent); border-left-color: var(--path); }
@media (max-width: 760px) { .opposed-row { grid-template-columns: 1fr; gap: 10px; } }

.opposed-left { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 11px; }
.opposed-gene { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.opposed-id { font-family: var(--mono); font-size: 13.5px; color: var(--text-3); }
.opposed-date { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.opposed-badge {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--medium);
  background: var(--uncertain-bg);
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.opposed-labels { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- panel triage ----------
   The worklist is read as a list of decisions, so each row carries its own
   justification rather than a number in a column. Type stays at the sizes the
   rest of the sheet uses; a triage table read at 11px is a triage table nobody
   checks. */

.field-label {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin-bottom: 9px;
}

#queries {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.55;
  padding: 14px 16px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
#queries:focus { outline: none; border-color: var(--accent); }

.panel-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.panel-actions button {
  font-size: 18px;
  font-weight: 600;
  padding: 13px 26px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  font-family: inherit;
}
.panel-actions button:disabled { opacity: 0.55; cursor: progress; }
.panel-actions select {
  font-size: 16px;
  padding: 0 12px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.panel-hint { font-family: var(--mono); font-size: 14px; color: var(--text-3); }

.progress-row { display: flex; align-items: center; gap: 14px; }
.progress-bar {
  flex: 1 1 auto;
  min-width: 0;
  height: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; }
.progress-text { font-family: var(--mono); font-size: 14.5px; color: var(--text-2); white-space: nowrap; }

.panel-toolbar { display: flex; align-items: center; gap: 14px; margin: 22px 0 10px; flex-wrap: wrap; }

.tile.good { border-top-color: var(--benign); }
.tile.neutral { border-top-color: var(--border-strong); }
.tile.good .tile-figure { color: var(--benign); }
.tile.neutral .tile-figure { color: var(--text-3); }

.prow-group { margin: 28px 0 12px; }
.prow-group-name { font-family: var(--serif); font-size: 22px; margin: 0 0 4px; }
.prow-group-why { font-size: 15px; color: var(--text-2); margin: 0; max-width: 76ch; }

.prow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.prow-contradicted { border-left-color: var(--path); }
.prow-split { border-left-color: var(--medium); }
.prow-thin { border-left-color: var(--uncertain); }
.prow-concordant { border-left-color: var(--benign); }
.prow-unresolved { border-left-color: var(--border-strong); }

.prow-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.prow-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.prow-link {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
a.prow-link { text-decoration: none; border-bottom: 1px solid var(--border-strong); }
a.prow-link:hover { border-bottom-color: var(--accent); }
.prow-asked { font-family: var(--mono); font-size: 13.5px; color: var(--text-3); }

.prow-tier {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  white-space: nowrap;
  margin-left: auto;
}
.tone-bad { background: var(--path-bg); border-color: var(--path); color: var(--path); }
.tone-warn { background: var(--uncertain-bg); border-color: var(--medium); color: var(--medium); }
.tone-good { background: var(--benign-bg); border-color: var(--benign); color: var(--benign); }
.tone-neutral { background: var(--surface-2); color: var(--text-2); }

.prow-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; }
.prow-cell { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.prow-key {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.prow-val { font-family: var(--mono); font-size: 15.5px; }
.prow-codes { font-family: var(--mono); font-size: 14.5px; color: var(--text-2); overflow-wrap: anywhere; }

.p-path { background: var(--path-bg); color: var(--path); }
.p-benign { background: var(--benign-bg); color: var(--benign); }
.p-uncertain { background: var(--uncertain-bg); color: var(--uncertain); }
.p-none { background: var(--surface-2); color: var(--text-3); }

.prow-reasons { margin: 12px 0 0; padding-left: 20px; }
.prow-reasons li { font-size: 15.5px; line-height: 1.5; color: var(--text); margin-bottom: 3px; }
.prow-normal { color: var(--text-3) !important; }
.prow-err { color: var(--path) !important; font-family: var(--mono); font-size: 14.5px !important; }

.tier-def {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.tier-def .prow-tier { margin-left: 0; flex: 0 0 auto; }
.tier-def-text { font-size: 15.5px; line-height: 1.55; margin: 0; color: var(--text-2); max-width: 76ch; }

@media (max-width: 620px) {
  .prow-tier { margin-left: 0; }
  .tier-def { flex-direction: column; gap: 7px; }
}

/* ---------- keyboard focus ----------
   Two inputs removed the default outline and signalled focus with a border
   colour alone, which is a colour-only cue and disappears for anyone who
   cannot pick the difference out. Everything else relied on whatever the
   browser happens to draw.

   One explicit ring instead, on :focus-visible so it appears for keyboard
   users without putting a box around every mouse click. The offset keeps it
   clear of the element's own border, and the two-colour construction means it
   stays visible on both the page background and the tinted panels. */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.searchbar input:focus-visible,
#queries:focus-visible,
.searchbar select:focus-visible,
.panel-actions select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.searchbar button:focus-visible,
.panel-actions button:focus-visible {
  /* The button is already the accent colour, so an accent ring on it would
     not read. A gap in the page colour separates the two. */
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

/* A skip link, for anyone tabbing into a page whose first stop would
   otherwise be the masthead on every single navigation. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}
