/* Docs Drift demo page. No external assets. */
:root {
  --page: #f6f7f9;
  --surface: #ffffff;
  --ink: #14181f;
  --muted: #566070;
  --rule: #d4d9e1;
  --agree: #0b6e5b;
  --agree-wash: #e3f3ee;
  --clash: #b3214f;
  --clash-wash: #fbe7ee;
  --mark: #ffe27a;
  --mark-ink: #2b2200;
  --link: #1d4fb8;
  --sans: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", "Noto Sans", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SF Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #12151a;
    --surface: #1a1e25;
    --ink: #e9ecf1;
    --muted: #9aa5b5;
    --rule: #323944;
    --agree: #57c9ae;
    --agree-wash: #14302a;
    --clash: #f07a9f;
    --clash-wash: #3a1826;
    --mark: #7a6412;
    --mark-ink: #fff4c2;
    --link: #8fb2ff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
}
main, footer { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
code { font-family: var(--mono); font-size: 0.9em; }

/* ---------------------------------------------------------------- top */
.top { padding: 3.5rem 0 1.5rem; }
h1 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3.1rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.wordmark { margin: 0 0 1.1rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.005em; }
.wordmark::before { content: "≠"; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-right: 0.5rem; background: var(--ink); color: var(--page); border-radius: 4px; font-size: 1rem; }
.lede { max-width: 64ch; margin: 1.4rem 0 0; font-size: 1.125rem; color: var(--muted); }
.score { max-width: 64ch; margin: 1rem 0 0; font-size: 1.125rem; font-weight: 650; }

section { padding: 2.25rem 0 0.5rem; }
section > h2 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.plain { max-width: 68ch; margin: 0 0 1rem; }
p, li, td, dd { overflow-wrap: break-word; }
.note { color: var(--muted); max-width: 68ch; }

/* ----------------------------------------------------------- try it live */
#try { padding-top: 1rem; }
#live { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem 1.1rem; }
#live h3 { margin: 1.1rem 0 0.2rem; font-size: 1.05rem; }
#live h3:first-of-type { margin-top: 0.6rem; }
.live-status { margin: 0; padding: 0.45rem 0.7rem; border-radius: 4px; font-size: 0.93rem; font-weight: 600; background: var(--page); border-left: 3px solid var(--muted); }
.live-status.live-live { border-left-color: var(--agree); }
.live-status.live-exhausted, .live-status.live-unreachable, .live-status.live-replay { border-left-color: var(--clash); }
.live-hint { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.93rem; max-width: 72ch; }
.live-examples { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.6rem; }
.live-example, .live-btn {
  font: 600 0.9rem/1.2 var(--sans); padding: 0.45rem 0.8rem; border-radius: 4px; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink);
}
.live-btn { background: var(--ink); color: var(--page); }
.live-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.live-example:focus-visible, .live-btn:focus-visible, #live textarea:focus-visible, #live input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.live-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.live-pair label { display: block; font-size: 0.86rem; font-weight: 600; }
.live-pair label span { display: block; margin-bottom: 0.25rem; }
#live textarea, #live input[type="text"] {
  width: 100%; font: 0.84rem/1.5 var(--mono); color: var(--ink); background: var(--page);
  border: 1px solid var(--rule); border-radius: 4px; padding: 0.5rem 0.6rem;
}
#live textarea { resize: vertical; min-height: 8.5rem; }
#live input[type="text"] { max-width: 26rem; margin-right: 0.5rem; }
.live-actions { margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.live-out { margin-top: 0.7rem; font-size: 0.93rem; overflow-wrap: anywhere; }
.live-out p { margin: 0 0 0.45rem; max-width: 80ch; }
.live-verdict { font-weight: 700; font-size: 1.02rem; }
.live-verdict.is-listed { color: var(--clash); }
.live-verdict.is-clear { color: var(--agree); }
.live-note { color: var(--muted); }
.live-quote { font: 0.84rem/1.55 var(--mono); }
.live-quote b { font-family: var(--sans); }
.live-raw { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem 1rem; margin: 0.6rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.86rem; }
.live-raw dt { color: var(--muted); }
.live-raw dd { margin: 0; }
.live-item { padding: 0.6rem 0; border-top: 1px solid var(--rule); }

/* ------------------------------------------------------ a contradiction */
.contradiction { margin: 0 0 2.5rem; }
.contradiction h2, .contradiction h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.005em;
}
.hero .contradiction h2 { font-size: 1.35rem; }
.project { font-weight: 400; color: var(--muted); white-space: nowrap; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr) 2.25rem minmax(0, 1fr); align-items: stretch; }
.pane { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.pane.right { border-top: 3px solid var(--agree); }
.pane.wrong { border-top: 3px solid var(--clash); }
.pane.undecided { border-top: 3px solid var(--muted); }
.where {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; justify-content: space-between; align-items: baseline;
  margin: 0; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule);
  font: 0.82rem/1.4 var(--mono);
}
.where a { overflow-wrap: anywhere; }
.colon { opacity: 0.6; }
.verdict { font: 600 0.82rem/1.4 var(--sans); white-space: nowrap; }
.right .verdict { color: var(--agree); }
.wrong .verdict { color: var(--clash); }
.undecided .verdict { color: var(--muted); }

.quote {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  padding: 0.6rem 0; font: 0.86rem/1.6 var(--mono);
}
.ln { padding: 0 0.7rem 0 0.75rem; color: var(--muted); text-align: right; user-select: none; opacity: 0.75; }
.src { padding-right: 0.75rem; white-space: pre-wrap; overflow-wrap: anywhere; }
mark { background: var(--mark); color: var(--mark-ink); padding: 0.05em 0.2em; border-radius: 3px; }
.wrong mark { background: var(--clash-wash); color: var(--clash); box-shadow: inset 0 -2px 0 var(--clash); }
.right mark { background: var(--agree-wash); color: var(--agree); box-shadow: inset 0 -2px 0 var(--agree); }

.seam { display: grid; place-items: center; position: relative; }
.seam::before { content: ""; position: absolute; top: 0.75rem; bottom: 0.75rem; left: 50%; border-left: 1px dashed var(--rule); }
.seam span {
  position: relative; display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  background: var(--page); color: var(--clash); font: 700 1.15rem/1 var(--sans);
}

.evidence {
  overflow-wrap: anywhere;
  margin: 0.7rem 0 0; padding-left: 0.85rem; border-left: 3px solid var(--agree);
  max-width: 78ch; font-size: 0.95rem;
}
.meta { margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; color: var(--muted); font-size: 0.86rem; }
.meta code { overflow-wrap: anywhere; }

/* --------------------------------------------------------------- numbers */
.funnel { list-style: none; margin: 0 0 1.25rem; padding: 0; border-top: 2px solid var(--ink); }
.funnel li {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: 1rem; align-items: center;
  padding: 0.55rem 0; border-bottom: 1px solid var(--rule);
}
.funnel b { grid-row: span 2; font-size: 1.7rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; text-align: right; }
.funnel .bar { display: block; height: 0.5rem; background: var(--ink); border-radius: 2px; }
.funnel li:last-child .bar { background: var(--agree); }
.funnel li > span:last-child { font-size: 0.93rem; color: var(--muted); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0 0 1.4rem; border-bottom: 1px solid var(--rule); }
.split p { margin: 0; padding: 0.2rem 1rem 1rem 0; font-size: 0.93rem; color: var(--muted); }
.split p + p { padding-left: 1rem; border-left: 1px solid var(--rule); }
.split b { display: block; color: var(--ink); font-size: 1.45rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.012em; margin-bottom: 0.2rem; font-variant-numeric: tabular-nums; }
.split p:last-child b { color: var(--clash); }

.status { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.82rem; font-weight: 650; border: 1.5px solid currentColor; white-space: nowrap; }
.status-open { color: var(--link); }
.status-merged { color: var(--agree); }
.status-closed, .status-pending { color: var(--muted); }
table.prs { min-width: 34rem; }
table.prs td:first-child { white-space: nowrap; }

video { display: block; width: 100%; max-width: 60rem; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; }

.table-wrap { overflow-x: auto; margin: 1.25rem 0 0.75rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: 0.88rem; }
th, td { padding: 0.45rem 0.7rem; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 600; color: var(--muted); line-height: 1.25; vertical-align: bottom; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.commit { display: block; font: 0.78rem var(--mono); color: var(--muted); }

/* ----------------------------------------------------------------- steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2.5rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 1.8rem; height: 1.8rem; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 700; font-size: 0.95rem;
}
.steps h3 { margin: 0 0 0.3rem; font-size: 1.05rem; line-height: 1.35; }
.steps p { margin: 0; font-size: 0.95rem; }

/* -------------------------------------------------------- false positives */
.fps { list-style: none; margin: 0 0 1.25rem; padding: 0; border-top: 1px solid var(--rule); }
.fps li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.fp-where { margin: 0; font-size: 0.86rem; overflow-wrap: anywhere; }
.fp-where a { font-family: var(--mono); font-size: 0.95em; }
.fp-why { margin: 0.2rem 0 0; max-width: 78ch; color: var(--muted); font-size: 0.93rem; }
.tier { font-weight: 650; }

.limits { margin: 0; padding-left: 1.2rem; max-width: 70ch; }
.limits li { margin-bottom: 0.5rem; }
.cmd { margin: 0; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }

footer { padding-top: 2.5rem; padding-bottom: 3rem; color: var(--muted); font-size: 0.86rem; }
footer p { max-width: 70ch; margin: 0; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* ---------------------------------------------------------------- narrow */
@media (max-width: 760px) {
  .top { padding-top: 2.25rem; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .live-pair { grid-template-columns: minmax(0, 1fr); }
  .live-raw { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .live-raw dd { margin-bottom: 0.4rem; }
  #live input[type="text"] { max-width: none; margin-right: 0; }
  .seam { height: 2rem; }
  .seam::before { top: 50%; bottom: auto; left: 0.75rem; right: 0.75rem; border-left: 0; border-top: 1px dashed var(--rule); }
  .funnel li { grid-template-columns: 4.2rem minmax(0, 1fr); column-gap: 0.75rem; }
  .funnel b { font-size: 1.4rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .project { white-space: normal; }
}
@media (max-width: 420px) {
  .quote { font-size: 0.8rem; }
  .ln { padding: 0 0.5rem 0 0.55rem; }
  .split b { font-size: 1.25rem; }
}
