/* COMPARE. Same look as TRACE: black ground, one amber accent. Tokens match the BioPharma Foundry front page. */
:root {
  --bg: #000000;
  --surface: #0a0a0b;
  --raised: #111113;
  --line: #232326;
  --line-strong: #3a3a3f;
  --ink: #f4f4f1;
  --soft: #b9b9bd;
  --muted: #8e8e93;
  --amber: #f2a93b;
  --amber-hi: #ffd08a;
  --amber-soft: rgba(242, 169, 59, 0.12);
  --danger: #ff8a65;
  --danger-soft: rgba(255, 138, 101, 0.1);
  --proj: rgba(255, 255, 255, 0.045);
  --font-display: lft-etica, sans-serif;
  --font-body: myriad-variable, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --on-amber: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-stretch: 95%;
  font-variation-settings: "wdth" 95;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-hi); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); }

.wrap {
  max-width: 1296px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), 4vw);
  padding-right: max(16px, env(safe-area-inset-right, 0px), 4vw);
}
@media (min-width: 1400px) { .wrap { padding-left: 48px; padding-right: 48px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name { line-height: 1.1; }
.brand-full { font-family: var(--font-mono); font-size: 11px; line-height: 1.25; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--soft); font-size: 15px; font-weight: 500; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 4px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--amber); }

/* Page head */
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.page-head h1 { font-size: 34px; line-height: 1.1; }
.lede { color: var(--soft); font-size: 17px; max-width: 62ch; }

.field { margin-top: 14px; min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.drop.over textarea { border-color: var(--amber); background: var(--amber-soft); }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; margin: 0;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--on-amber); font-weight: 600; }
.btn.primary:hover { background: var(--amber-hi); border-color: var(--amber-hi); color: var(--on-amber); }
.btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn:focus-within { outline: 2px solid var(--amber); outline-offset: 3px; }

.msg { font-size: 14px; border-radius: 4px; padding: 10px 12px; margin-top: 12px; border: 1px solid var(--line-strong); color: var(--soft); background: var(--raised); }
.msg.err { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.msg.warn { color: var(--amber-hi); background: var(--amber-soft); border-color: var(--amber); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; color: var(--muted); font-size: 13px; }
.site-footer p { max-width: 70ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer nav a { color: var(--soft); }

/* Help page */
.help { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-bottom: 72px; align-items: start; }
@media (max-width: 860px) { .help { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 860px) { .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; } }
.toc a { color: var(--soft); font-size: 14px; padding: 8px 10px; border-radius: 4px; min-height: 40px; display: inline-flex; align-items: center; }
.toc a:hover { color: var(--amber); background: var(--raised); }
.doc { font-family: myriad-variable, sans-serif; display: flex; flex-direction: column; gap: 44px; min-width: 0; max-width: 78ch; }
.doc section { scroll-margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.doc h2 { font-size: 28px; line-height: 1.1; }
.doc h3 { font-size: 18px; margin-top: 8px; }
.doc p, .doc li { color: var(--soft); font-size: 17px; line-height: 1.6; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code { font-size: 13px; background: var(--raised); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--ink); }
.eq { font-family: var(--font-mono); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.7; }
.codeblock { font-family: var(--font-mono); font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.doc table { font-size: 13px; }
.doc td, .doc th { text-align: left; white-space: normal; vertical-align: top; }
.doc .tablewrap { max-height: none; }
details { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
details summary { cursor: pointer; padding: 14px 16px; min-height: 48px; color: var(--ink); font-weight: 500; }
details[open] summary { border-bottom: 1px solid var(--line); }
details p { padding: 14px 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
[hidden] { display: none !important; }

/* ---- MESSAGE ---------------------------------------------------------------------------------------------------- */
.narrow { max-width: 860px; margin: 0 auto; padding-bottom: 72px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; padding: 0; list-style: none; }
.steps a, .steps span { display: inline-block; font-size: 14px; color: var(--muted); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); }
.steps a { color: var(--soft); }
.steps a:hover { border-color: var(--amber); color: var(--amber); }
.steps .on { background: var(--amber-soft); color: var(--ink); font-weight: 650; border-color: var(--amber); }
.sec { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 20px 22px; margin-top: 14px; }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; }
.sec-h .n { font: 600 12px var(--font-mono); color: var(--amber); }
.sec-h h2 { font-size: 19px; }
.req { font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: auto; }
.req.r { color: var(--amber); }
.sec .sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.sub2 { font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.sub2:first-of-type { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 14px var(--font-body); color: var(--soft); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.chip:hover { border-color: var(--amber); color: var(--amber); }
.chip[aria-pressed="true"] { background: var(--amber-soft); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.chip.oth { border-style: dashed; color: var(--muted); }
.other { display: flex; gap: 8px; margin-top: 10px; max-width: 520px; }
.other input { flex: 1; }
.fld label { display: block; font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.fld input, .fld select, .fld textarea, .other input { width: 100%; font: inherit; font-size: 15.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 11px 13px; min-height: 44px; }
.fld textarea { height: auto; white-space: pre-wrap; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .other input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.fld + .fld { margin-top: 16px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.actions .btn.primary { padding: 0 26px; font-size: 16px; min-height: 50px; }
.note2 { color: var(--muted); font-size: 13px; }
.err2 { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger); border-radius: 6px; padding: 10px 14px; margin-top: 14px; font-size: 14.5px; }
.working { color: var(--soft); margin-top: 14px; font-size: 15px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.opt-tab { font: 500 14px var(--font-body); color: var(--soft); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.opt-tab:hover { border-color: var(--amber); color: var(--amber); }
.opt-tab[aria-selected="true"] { background: var(--amber-soft); border-color: var(--amber); color: var(--ink); font-weight: 650; }
.mainmsg { border: 2px solid var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 18px 22px; margin-bottom: 14px; }
.small { display: block; font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ed { width: 100%; font: inherit; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px; margin: 0 -6px; resize: none; overflow: hidden; line-height: 1.4; }
.ed:hover { border-color: var(--line-strong); }
.ed:focus { outline: none; border-color: var(--amber); background: var(--bg); }
.mainmsg .ed { font-size: 21px; font-weight: 650; font-family: var(--font-display); }
.reason { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 14px 20px; margin-top: 10px; }
.reason .ed { font-size: 16px; font-weight: 600; }
.bk { font-size: 14px; color: var(--soft); margin-top: 6px; }
.bk.no { color: var(--danger); }
.bk b { font-weight: 650; }
.changes { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 6px; padding: 12px 16px; margin: 0 0 14px; background: var(--surface); font-size: 14.5px; color: var(--soft); }
.changes b { color: var(--ink); }
.changes ul { margin: 6px 0 0; padding-left: 20px; }
.ck { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.ck:first-child { border-top: 0; }
.dot { width: 22px; height: 22px; border-radius: 50%; margin-top: 2px; }
.dot.green { background: #2e8b57; } .dot.yellow { background: #d9a21b; } .dot.red { background: #c0392b; } .dot.na { background: transparent; border: 2px dashed var(--line-strong); }
.ck h3 { font-size: 16px; margin-bottom: 2px; }
.ck .tag { font: 600 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-left: 8px; color: var(--muted); }
.ck p { color: var(--soft); font-size: 15px; line-height: 1.5; margin-top: 4px; }
.ck .fix { color: var(--ink); }
.disc { margin-top: 28px; color: var(--muted); font-size: 13px; max-width: 70ch; }
.fine { color: var(--muted); font-size: 13px; margin-top: 10px; }
@media (max-width: 600px) { .sec { padding: 16px; } .mainmsg .ed { font-size: 18px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sec.flat { margin-top: 14px; padding-top: 6px; padding-bottom: 6px; }
.mainmsg.top { margin-top: 12px; }
.mm { font-weight: 650; font-size: 18px; }
.actions.tight { margin-top: 0; }
.fld.gap { margin-top: 18px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; color: var(--soft); min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--amber); }
.bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; font-size: 14px; color: var(--soft); }
.bar span { border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 12px; background: var(--surface); }
.bar b { color: var(--ink); }
.box { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 16px 20px; margin-top: 14px; }
.box h2 { font-size: 19px; margin-bottom: 4px; }
.box .ed { font-size: 16px; font-weight: 500; margin: 0; }
.out { white-space: pre-wrap; font-size: 16px; line-height: 1.5; margin: 8px 0 0; }
.claim { padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.claim:first-of-type { border-top: 0; }
.claim p { margin: 0; font-weight: 600; }
.up { margin-top: 28px; }
.box .actions.tight { margin-top: 14px; }
.box .sub { margin: 0 0 4px; }
.box .changes { margin: 12px 0 0; }

/* Segments on the result page */
.seg { margin: 28px 0 0; }
.seg h2 { font-size: 20px; margin-bottom: 2px; }
.seg h2 .tag { font: 600 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-left: 10px; color: var(--muted); }
.seg > .sub { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.ck p.basis { font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.off { margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.off summary { cursor: pointer; }
.off ul { margin: 8px 0 0 18px; padding: 0; }
.off li { margin: 4px 0; }
