/* OXtalign web. One stylesheet, no framework. Tokens first; light is the default and dark is its
   own set of values (not an inversion), chosen by the system unless the visitor picks one. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --page: #f6f5f1; --surface: #fdfdfb; --sunken: #efeee9; --stage: #f1f0eb;
  --ink: #16150f; --ink-2: #55534c; --ink-3: #69665e; --line: #e2e0d8; --line-2: #cfccc2;
  --accent: #1c5cab; --accent-soft: #e4eefb;
  --match: #1f9d5c; --match-soft: #e2f3e9; --miss: #c2562a; --miss-soft: #f9e9e1; --warn: #9a6a00; --warn-soft: #f8efd6;
  --a: #2a78d6; --b: #e0702f;
  --shadow: 0 1px 2px rgba(22,21,15,.05), 0 8px 28px rgba(22,21,15,.07);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --page: #0e0e0d; --surface: #181817; --sunken: #121211; --stage: #121211;
  --ink: #f0efec; --ink-2: #b9b7ad; --ink-3: #85827a; --line: #2a2a27; --line-2: #3a3a36;
  --accent: #6da7ec; --accent-soft: #14273f;
  --match: #3cc07a; --match-soft: #12301f; --miss: #ec835a; --miss-soft: #38190d; --warn: #e0b040; --warn-soft: #33290c;
  --a: #5598e7; --b: #ec8a4f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 32px rgba(0,0,0,.45);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --page: #0e0e0d; --surface: #181817; --sunken: #121211; --stage: #121211;
  --ink: #f0efec; --ink-2: #b9b7ad; --ink-3: #85827a; --line: #2a2a27; --line-2: #3a3a36;
  --accent: #6da7ec; --accent-soft: #14273f;
  --match: #3cc07a; --match-soft: #12301f; --miss: #ec835a; --miss-soft: #38190d; --warn: #e0b040; --warn-soft: #33290c;
  --a: #5598e7; --b: #ec8a4f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 32px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 var(--sans); font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
sub { font-size: .72em; line-height: 0; }
code { font: .88em var(--mono); background: var(--sunken); padding: 1px 5px; border-radius: 5px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: "zero" 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--page); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }

/* ── header ─────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 500 21px/1 var(--serif); letter-spacing: -.01em; }
.tabs { display: flex; gap: 2px; flex: 1; }
.tabs a { text-decoration: none; color: var(--ink-2); padding: 7px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.tabs a:hover { color: var(--ink); background: var(--sunken); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--sunken); }
.top-right { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.runtime { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.runtime .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.runtime[data-state="loading"] .dot { animation: pulse 1.1s ease-in-out infinite; }
.runtime[data-state="ready"] .dot { background: var(--match); }
.runtime[data-state="busy"] .dot { background: var(--accent); animation: pulse .9s ease-in-out infinite; }
.runtime[data-state="error"] .dot { background: var(--miss); }
@keyframes pulse { 50% { opacity: .3; } }
.boot-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .5s ease, opacity .5s ease .3s; }
.boot-bar.done i { width: 100% !important; opacity: 0; }
.pop { position: absolute; right: max(28px, calc(50vw - 552px)); top: 52px; width: 400px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; font-size: 13px; color: var(--ink-2); }
.pop h3 { margin: 0 0 6px; font: 600 13px var(--sans); color: var(--ink); }
.pop p { margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink); }

/* ── hero ───────────────────────────────────────────────────────────── */
.hero { padding: 36px 0 22px; max-width: 820px; }
h1 { font: 400 clamp(30px, 4.6vw, 44px)/1.08 var(--serif); letter-spacing: -.022em; margin: 0 0 14px; text-wrap: balance; }
.lede { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.private { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; white-space: nowrap; margin-left: 2px; }
.private svg { color: var(--match); }
.private svg { flex: none; position: relative; top: -1px; }

/* ── inputs ─────────────────────────────────────────────────────────── */
.pair-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pair-inputs .drop { min-height: 132px; }
.pair-inputs .drop-empty { gap: 7px; }
.pair-inputs .replace { align-self: flex-start; font-size: 12px; margin-top: 2px; }
.drop { position: relative; display: flex; flex-direction: column; min-height: 148px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--surface); padding: 18px 20px; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.filled { border-style: solid; border-color: var(--line); }
.drop.bad { border-color: var(--miss); }
.drop-tag { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.drop-tag i { width: 9px; height: 9px; border-radius: 50%; }
.drop-empty { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 10px 0 2px; }
.drop-empty strong { font: 500 19px/1.3 var(--serif); letter-spacing: -.01em; }
.drop-empty span { color: var(--ink-3); font-size: 13.5px; }
.linklike { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { text-decoration-color: currentColor; }
.drop-file { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-top: 10px; min-width: 0; }
.drop-file .name { font: 500 17px/1.3 var(--mono); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-file .meta { color: var(--ink-2); font-size: 13.5px; }
.drop-file .meta.err { color: var(--miss); }
.drop .clear { position: absolute; top: 10px; right: 10px; }
.drop textarea { width: 100%; flex: 1; min-height: 84px; margin-top: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); padding: 8px 10px; font: 12px/1.45 var(--mono); }
.paste-row { display: flex; gap: 8px; margin-top: 8px; }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.under-inputs { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.examples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.options { font-size: 13.5px; }
.options summary { cursor: pointer; color: var(--ink-2); list-style: none; padding: 5px 2px; font-weight: 500; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.options summary::-webkit-details-marker { display: none; }
.options summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); position: relative; top: -2px; transition: transform .15s; }
.options[open] summary::after { transform: rotate(225deg); top: 1px; }
.options[open] { flex-basis: 100%; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 28px; padding: 16px 18px; margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.opt { display: flex; flex-direction: column; gap: 4px; }
.opt > label { font-weight: 500; }
.opt small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.opt input[type="number"] { width: 92px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--page); padding: 0 8px; font-family: var(--mono); font-size: 13px; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--page); border-color: var(--ink); }
.btn.primary:hover { opacity: .88; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── result ─────────────────────────────────────────────────────────── */
.result { margin-top: 30px; }
.result:empty { margin: 0; }
.placeholder { border-top: 1px solid var(--line); padding: 26px 0 60px; color: var(--ink-3); font-size: 14px; }
.verdict { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 48px; align-items: start; padding: 28px 0 22px; border-top: 1px solid var(--line); }
.verdict-text h2 { display: flex; align-items: center; gap: 12px; margin: 0; font: 400 clamp(26px, 3.4vw, 34px)/1.1 var(--serif); letter-spacing: -.018em; }
.verdict-text h2 i { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--miss); position: relative; top: 1px; }
.verdict-text h2.full i { background: var(--match); }
.verdict-text h2.partial i { background: var(--warn); }
.aside { margin: -6px 0 18px; color: var(--ink-3); font-size: 13px; line-height: 1.5; max-width: 760px; text-wrap: pretty; }
.aside + .aside { margin-top: -10px; }
.stat .k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.stat .v { font: 400 46px/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.stat .v small { font-size: 22px; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.stat .v .of { color: var(--ink-3); }
.verdict-text { max-width: 560px; min-width: 0; }
.verdict-text p { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; text-wrap: pretty; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.full { background: var(--match-soft); color: var(--match); }
.badge.partial { background: var(--warn-soft); color: var(--warn); }
.badge.failed, .badge.error { background: var(--miss-soft); color: var(--miss); }
.badge.plain::before { display: none; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.badges .badge { height: 22px; font-size: 12px; font-weight: 500; }
.note { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); font-size: 13.5px; }
.note.err { background: var(--miss-soft); }

.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 30%); gap: 16px; align-items: start; }
.result-below { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.coverage { margin-top: 16px; }
.coverage summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.coverage[open] summary { margin-bottom: 8px; }
.coverage .mini { max-width: 500px; }
.kv dd { white-space: nowrap; }
.kv { min-width: 0; } .kv dt { min-width: 0; overflow-wrap: anywhere; }
.kv dd.plain { font-family: var(--sans); font-size: 12.5px; }
.kv dt[title] { text-decoration: underline dotted var(--line-2); text-underline-offset: 3px; cursor: help; }
.viewer { min-width: 0; background: var(--stage); border: 1px solid var(--line); border-radius: var(--r); }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; padding: 10px 12px; }
.viewer-stage { position: relative; height: clamp(300px, 47vh, 460px); }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.viewer canvas:active { cursor: grabbing; }
.viewer canvas:focus-visible { outline-offset: -2px; }
.viewer-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); }
.legend { display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-2); }
.viewer-stage > .legend { position: absolute; top: 0; right: 12px; pointer-events: none; background: var(--surface); padding: 4px 8px; border-radius: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hint { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.seg.zoom button { min-width: 32px; font-size: 16px; }
.seg button:not([aria-pressed="true"]):hover { color: var(--ink); }
.seg.toggles button[aria-pressed="true"] { background: var(--sunken); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.toggles button:not([aria-pressed="true"]) { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.grow { flex: 1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.card h3 { margin: 0 0 2px; font: 600 13px var(--sans); }
.card .sub { margin: 0 0 12px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.per-molecule .bars-wrap { max-height: min(420px, 49vh); overflow-y: auto; }
.bars { display: grid; gap: 3px; }
.bar-row { display: grid; grid-template-columns: 22px 1fr 46px; gap: 8px; align-items: center; font-size: 12px; height: 17px; border-radius: 4px; cursor: default; }
.bar-row:hover, .bar-row.on { background: var(--sunken); }
.bar-row:focus-visible { outline-offset: -2px; }
.bar-row .i { color: var(--ink-3); text-align: right; font-family: var(--mono); font-size: 11px; }
.bar-row .track { position: relative; height: 9px; }
.bar-row .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--match); min-width: 2px; }
.bar-row.miss .fill { background: var(--ink-3); opacity: .55; }
.bar-row .val { font-family: var(--mono); font-size: 11.5px; text-align: right; color: var(--ink); }
.bar-row.miss .val { color: var(--ink-3); }
.bars-wrap { position: relative; }
.tol-line { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed var(--ink-3); pointer-events: none; }
.tol-cap { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-3); }
table.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.mini th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 0 0 5px; font-size: 11.5px; }
table.mini td { padding: 4px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
table.mini td:last-child, table.mini th:last-child { text-align: right; }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.downloads .btn { width: 100%; }
.fine { color: var(--ink-3); font-size: 12px; margin: 10px 0 0; line-height: 1.45; }

/* ── batch & score ──────────────────────────────────────────────────── */
.bigdrop { min-height: 132px; align-items: center; justify-content: center; text-align: center; }
.bigdrop .drop-empty { align-items: center; }
.two-drops { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.filebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.filebar .count { font-weight: 500; }
.filebar .muted, .muted { color: var(--ink-3); }
.progress { margin-top: 18px; }
.progress-track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s linear; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.card input[type="range"] { width: 100%; accent-color: var(--ink); margin: 2px 0 0; }
.clusters { list-style: none; margin: 12px 0 0; padding: 0; max-height: 380px; overflow: auto; border-top: 1px solid var(--line); }
.clusters li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.clusters .cn { color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; flex: none; width: 20px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-top: 22px; max-height: 620px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.data td { padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover, table.data tbody tr:focus-visible { background: var(--sunken); }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
table.data td.file { font-family: var(--mono); font-size: 12.5px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.summary-line { display: flex; align-items: baseline; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.summary-line .big { font: 400 46px/1 var(--serif); letter-spacing: -.02em; }
.summary-line .big .of { color: var(--ink-3); }
.summary-line p { margin: 0; color: var(--ink-2); flex: 1; min-width: 220px; }

/* ── dialog ─────────────────────────────────────────────────────────── */
.pair-dialog { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--page); color: var(--ink); padding: 0 24px 24px; box-shadow: var(--shadow); }
.pair-dialog::backdrop { background: rgba(10,10,8,.45); backdrop-filter: blur(2px); }
.dialog-head { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 10px; background: var(--page); }
.dialog-title { font: 500 13.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair-dialog .result { margin-top: 0; }
.pair-dialog .verdict { border-top: 0; padding-top: 6px; }

/* ── about ──────────────────────────────────────────────────────────── */
.prose .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 56px; border-top: 1px solid var(--line); padding-top: 8px; }
.prose h2 { font: 500 22px/1.2 var(--serif); letter-spacing: -.01em; margin: 26px 0 8px; }
.prose p { margin: 0 0 12px; color: var(--ink-2); text-wrap: pretty; }
.prose b { color: var(--ink); font-weight: 600; }

.foot { width: 100%; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 32px; margin-top: 64px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 9px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); z-index: 60; max-width: calc(100vw - 32px); }

/* ── small screens ──────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .result-grid { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: auto auto; justify-content: start; gap: 18px 36px; }
  .verdict-text { grid-column: 1 / -1; max-width: none; }
  .prose .cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-in { gap: 10px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; }
  .tabs { order: 3; flex-basis: 100%; overflow-x: auto; }
  .top-right { margin-left: auto; }
  .hero { padding: 30px 0 20px; }
  .lede { font-size: 15px; }
  .private { white-space: normal; }
  .pair-inputs, .two-drops { grid-template-columns: 1fr; }
  .drop { min-height: 118px; }
  .stat .v { font-size: 36px; } .stat .v small { font-size: 18px; }
  .viewer-stage { height: clamp(252px, 40vh, 350px); }
  .hint { display: none; }
  .pair-dialog { padding: 0 14px 16px; }
  .pop { right: 16px; top: 50px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }
