/* verdict.css: Verdict: the tone fills the first screen
   Self-contained. Google Fonts link: see fonts.md. Change the accent with --accent.
   Light by default, dark via prefers-color-scheme, or force with <html data-theme="light|dark">. No script needed. */

@font-face { font-family: "Alumni Sans Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 71.2%; ascent-override: 126.4%; descent-override: 42.1%; line-gap-override: 0%; }
@font-face { font-family: "Onest Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 114.7%; ascent-override: 84.6%; descent-override: 26.2%; line-gap-override: 0%; }

:root {
  --accent: oklch(0.45 0.13 150);
  --pad: 16px;
  --max: 72rem;
  --measure: 32em;
  --radius: 6px;
  --f-body: "Onest", "Onest Fallback", system-ui, sans-serif;
  --f-ui: var(--f-body);
  --f-head: "Alumni Sans", "Alumni Sans Fallback", "Arial Narrow", sans-serif;
  --bg: oklch(0.985 0.005 145);
  --ink: oklch(0.18 0.03 150);
  --sub: oklch(0.4 0.03 150);
  --rule: oklch(0.18 0.03 150 / 0.2);
  --link: var(--accent);
  --on-accent: oklch(0.99 0 0);
  --field: oklch(0.52 0.03 150);
  --ok: oklch(0.5 0.13 150);
  --ok-bg: oklch(0.95 0.035 150);
  --bad: oklch(0.5 0.19 27);
  --bad-bg: oklch(0.95 0.025 27);
  --yes: oklch(0.46 0.13 150);
  --yes-ink: oklch(0.99 0 0);
  --yes-word: oklch(0.99 0 0);
  --limit: oklch(0.86 0.15 85);
  --limit-ink: oklch(0.18 0.01 260);
  --limit-word: oklch(0.18 0.01 260);
  --no: oklch(0.5 0.19 27);
  --no-ink: oklch(0.99 0 0);
  --no-word: oklch(0.99 0 0);
  --info: var(--accent);
  --info-ink: var(--on-accent);
  --info-word: var(--on-accent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --accent: oklch(0.74 0.12 150);
  --bg: oklch(0.18 0.02 150);
  --ink: oklch(0.95 0.01 145);
  --sub: oklch(0.78 0.02 145);
  --rule: oklch(0.95 0.01 145 / 0.2);
  --link: var(--accent);
  --on-accent: oklch(0.17 0.03 150);
  --field: oklch(0.6 0.03 150);
  --ok: oklch(0.75 0.12 150);
  --ok-bg: oklch(0.29 0.05 150);
  --bad: oklch(0.76 0.15 27);
  --bad-bg: oklch(0.29 0.06 27);
  --yes: oklch(0.46 0.13 150);
  --yes-ink: oklch(0.99 0 0);
  --yes-word: oklch(0.99 0 0);
  --limit: oklch(0.86 0.15 85);
  --limit-ink: oklch(0.18 0.01 260);
  --limit-word: oklch(0.18 0.01 260);
  --no: oklch(0.5 0.19 27);
  --no-ink: oklch(0.99 0 0);
  --no-word: oklch(0.99 0 0);
  --info: var(--accent);
  --info-ink: var(--on-accent);
  --info-word: var(--on-accent);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: oklch(0.74 0.12 150);
  --bg: oklch(0.18 0.02 150);
  --ink: oklch(0.95 0.01 145);
  --sub: oklch(0.78 0.02 145);
  --rule: oklch(0.95 0.01 145 / 0.2);
  --link: var(--accent);
  --on-accent: oklch(0.17 0.03 150);
  --field: oklch(0.6 0.03 150);
  --ok: oklch(0.75 0.12 150);
  --ok-bg: oklch(0.29 0.05 150);
  --bad: oklch(0.76 0.15 27);
  --bad-bg: oklch(0.29 0.06 27);
  --yes: oklch(0.46 0.13 150);
  --yes-ink: oklch(0.99 0 0);
  --yes-word: oklch(0.99 0 0);
  --limit: oklch(0.86 0.15 85);
  --limit-ink: oklch(0.18 0.01 260);
  --limit-word: oklch(0.18 0.01 260);
  --no: oklch(0.5 0.19 27);
  --no-ink: oklch(0.99 0 0);
  --no-word: oklch(0.99 0 0);
  --info: var(--accent);
  --info-ink: var(--on-accent);
  --info-word: var(--on-accent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.5; font-kerning: normal; font-variant-numeric: lining-nums; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
main { flex: 1 0 auto; display: flow-root; padding-bottom: 24px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
a { color: var(--link); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, ul, ol, dl, pre { margin: 0; }
p, li, dd { text-wrap: pretty; }

header .brand { display: inline-flex; align-items: center; min-height: 48px; color: inherit; text-decoration: none; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; column-gap: .5em; font-size: 16px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs > * + *::before { content: "/"; display: inline-block; margin-right: .5em; color: var(--sub); text-decoration: none; }
.crumbs > :not(a) { color: var(--sub); }
@media (max-width: 47.99em) {
  .crumbs > :not(a), .crumbs a:not(:last-of-type) { display: none; }
  .crumbs a:last-of-type::before { content: "/"; display: inline-block; margin-right: .4em; color: inherit; }
}

main > h1 { margin-top: 8px; }
main > .lead { margin-top: 10px; max-width: 32em; }
mark { background: none; color: inherit; font-weight: 700; }
#first-screen mark { background: var(--accent); color: var(--on-accent); font-weight: 800; padding: 0 .1em; white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
main > .meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 2px 1.1em; font-size: 16px; line-height: 1.35; color: var(--sub); }
main > .meta span:first-child { color: var(--ink); font-weight: 600; }

.btns { display: flex; flex-wrap: wrap; gap: 12px; }
main > .btns { margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: inherit; font-family: var(--f-ui); font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.alt { background: transparent; color: var(--ink); border-color: currentColor; }
.btn.alt:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

main > dl { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr); }
main > dl dt { color: var(--sub); }
main > dl dd { margin: 0; }

.verdict { margin-top: 12px; display: grid; gap: 2px; padding: 12px 14px; background: var(--t); color: var(--t-ink); }
.verdict strong { font-size: 1.6em; line-height: 1.1; color: var(--t-word); }
.verdict[data-tone="yes"] { --t: var(--yes); --t-ink: var(--yes-ink); --t-word: var(--yes-word); }
.verdict[data-tone="limit"] { --t: var(--limit); --t-ink: var(--limit-ink); --t-word: var(--limit-word); }
.verdict[data-tone="no"] { --t: var(--no); --t-ink: var(--no-ink); --t-word: var(--no-word); }
.verdict[data-tone="info"] { --t: var(--info); --t-ink: var(--info-ink); --t-word: var(--info-word); }

ol.steps { list-style: none; padding: 0; counter-reset: st; display: grid; gap: 28px; }
main > ol.steps { margin-top: 40px; }
ol.steps > li { counter-increment: st; position: relative; padding-left: 52px; }
ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: -4px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-family: var(--f-ui); font-weight: 700; }
ol.steps h3 { font-size: 1.1em; line-height: 1.3; margin-bottom: 4px; }
ol.steps p { max-width: var(--measure); }
dl.step-meta { margin-top: 10px; padding-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; border-top: 1px solid var(--rule); font-size: 16px; }
dl.step-meta dd + dt { margin-top: 6px; }
dl.step-meta dt { color: var(--sub); }
dl.step-meta dd { margin: 0; font-weight: 500; }
@media (min-width: 48em) { dl.step-meta { grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; } dl.step-meta dd + dt { margin-top: 0; } }
main > dl dd a { font-size: inherit; }

main > section { margin-top: 40px; }
main > section > h2, #perevirka > h2 { font-size: 1.4em; line-height: 1.2; }
main > section > * + * { margin-top: 12px; }
main > section p, main > section ul { max-width: var(--measure); }
main > section ul { padding-left: 1.2em; }
main > section li + li { margin-top: 6px; }

pre.verse { margin-top: 40px; max-width: 40em; font-family: inherit; font-size: 1.05em; line-height: 1.5; white-space: pre-wrap; hyphens: none; }
pre.verse:has(> span) { white-space: normal; }
pre.verse > span { display: block; position: relative; white-space: pre-wrap; padding-left: 1.5em; text-indent: -1.5em; }
pre.verse > span:empty { min-height: 1.5em; }
pre.verse > span[data-n]::after { content: attr(data-n); position: absolute; top: 0; right: 100%; margin-right: 10px; text-indent: 0; font-family: var(--f-ui); font-size: 15px; color: var(--sub); font-variant-numeric: tabular-nums; }

/* Hub rows grow with their text; every cell can shrink and wrap. */
ul.index { list-style: none; padding: 0; }
ul.index :is(.key, .t, .note) { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
:where(header .wrap, .crumbs, .meta, .btns, dl, .verdict, .steps, .index, .index li, .index a, form, label, footer .wrap, footer p) > * { min-width: 0; }
main > ul.index { margin-top: 28px; }
ul.index > li > a { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 14px; align-items: baseline; min-height: 44px; padding: 10px 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
ul.index .key { grid-row: auto; white-space: normal; font-variant-numeric: tabular-nums; }
ul.index .t { font-weight: 600; color: var(--link); }
ul.index .note { grid-column: auto; color: var(--sub); }
ul.index > li > a:hover .t { text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 40em) {
  ul.index > li > a { grid-template-columns: minmax(0, var(--key-w, 4.4em)) minmax(0, 1fr) minmax(0, .65fr); }
  ul.index .key { grid-row: auto; }
  ul.index .note { grid-column: 3; text-align: right; }
}
@media (min-width: 64em) {
  ul.index:has(> li:nth-child(13)) { columns: 2; column-gap: 56px; }
  ul.index > li { break-inside: avoid; }
}

#perevirka { margin-top: 48px; }
#perevirka > p { margin-top: 8px; max-width: var(--measure); }
#perevirka form { margin-top: 20px; max-width: 30rem; display: grid; gap: 16px; }
#perevirka label:not(.chk) { display: grid; gap: 6px; font-family: var(--f-ui); font-weight: 600; }
#perevirka input:not([type="checkbox"]):not([type="radio"]), #perevirka textarea, #perevirka select { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--field); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: inherit; font-size: max(16px, 1em); font-weight: 400; transition: border-color .15s, box-shadow .15s; }
#perevirka input:not([type="checkbox"]):not([type="radio"]):hover { border-color: var(--ink); }
#perevirka input:not([type="checkbox"]):not([type="radio"]):focus-visible, #perevirka textarea:focus-visible, #perevirka select:focus-visible { outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.field-error { display: none; margin-top: -8px; color: var(--bad); font-family: var(--f-ui); font-size: 16px; line-height: 1.35; font-weight: 600; }
label:has(> input[aria-invalid="true"]) + .field-error, label:has(> input:user-invalid) + .field-error { display: block; }
label:has(> input[aria-invalid="true"]) > input, label > input:user-invalid { border-color: var(--bad) !important; }
label:has(> input[aria-invalid="true"]) > input:focus-visible, label > input:user-invalid:focus-visible { box-shadow: 0 0 0 2px var(--bad) !important; }
.chk { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 8px; font-family: var(--f-ui); line-height: 1.4; cursor: pointer; }
.chk input { --box: 26px; -webkit-appearance: none; appearance: none; flex: none; display: grid; place-content: center; width: var(--box); height: var(--box); margin: max(0px, calc((1lh - var(--box)) / 2)) 0 0; border: 2px solid var(--field); border-radius: var(--chk-r, 0); background: var(--bg); color: var(--on-accent); cursor: pointer; transition: background-color .12s, border-color .12s; }
.chk input::before { content: ""; width: calc(var(--box) * .46); height: calc(var(--box) * .24); margin-top: -3px; border: solid currentColor; border-width: 0 0 3px 3px; transform: rotate(-45deg) scale(0); transition: transform .12s; }
.chk input:hover { border-color: var(--ink); }
.chk input:checked { background: var(--accent); border-color: var(--accent); }
.chk input:checked::before { transform: rotate(-45deg) scale(1); }
.chk input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chk input[aria-invalid="true"], .chk input:user-invalid { border-color: var(--bad); }
@media (forced-colors: active) { .chk input { -webkit-appearance: auto; appearance: auto; } .chk input::before { display: none; } }
#perevirka form .btn { justify-self: start; }
#check-status { display: none; position: relative; margin: 0; padding: 11px 14px 12px 48px; border-top: 3px solid var(--st); background: var(--st-bg); color: var(--ink); font-family: var(--f-ui); font-weight: 600; line-height: 1.4; }
#check-status::before { content: ""; position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--chk-r, 0); background: var(--st); color: var(--bg); font-size: 15px; font-weight: 700; line-height: 1; }
form:is([data-state="sending"], [data-state="ok"], [data-state="error"]) #check-status { display: block; }
form[data-state="sending"] { --st: var(--accent); --st-bg: transparent; }
form[data-state="ok"] { --st: var(--ok); --st-bg: var(--ok-bg); }
form[data-state="error"] { --st: var(--bad); --st-bg: var(--bad-bg); }
form[data-state="sending"] :is(label, .field-error) { opacity: .55; pointer-events: none; }
form[data-state="sending"] .btn { background: transparent; color: var(--accent); border-color: var(--accent); cursor: progress; pointer-events: none; }
form[data-state="sending"] .btn::after { content: "\2026"; }
form[data-state="sending"] #check-status::before { background: none; border: 3px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: check-spin .9s linear infinite; }
@keyframes check-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { form[data-state="sending"] #check-status::before { animation: none; border-color: var(--accent); } }
form[data-state="ok"] #check-status::before { content: "\2713"; }
form[data-state="error"] #check-status::before { content: "!"; }
form[data-state="ok"] .btn { background: transparent; color: var(--ink); border-color: var(--rule); }

footer { margin-top: 48px; padding: 20px 0 40px; border-top: 1px solid var(--rule); color: var(--sub); font-size: 16px; }
footer .wrap { display: grid; gap: 8px; }
footer p { max-width: var(--measure); }
footer p:has(> a) { display: flex; flex-wrap: wrap; column-gap: 20px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }

@media (min-width: 48em) { :root { --pad: 32px; } main > section { margin-top: 56px; } }

/* Verdict: a full-strength block, compact on phones. */
:root { --chk-r: 4px; }
header .brand { font-weight: 700; font-size: 17px; }
/* Negative gutter margins reach the page edge. The clipped shadow extends
   only the fill past the content maximum, without viewport-width overflow. */
main > .verdict { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; margin-inline: calc(-1 * var(--pad)); padding: 12px var(--pad); border: 0; border-radius: 0; min-height: 0; max-height: 34svh; overflow: auto; box-shadow: 0 0 0 100vmax var(--t); clip-path: inset(0 -100vmax); }
main > .verdict strong { display: block; flex: none; font-family: var(--f-head); max-width: 100%; font-size: clamp(3.5rem, 20vw, 7rem); line-height: .9; font-weight: 800; letter-spacing: -.012em; overflow-wrap: anywhere; color: var(--t-ink); }
main > .verdict span { display: block; flex: none; width: 100%; max-width: 32ch; font-size: 1.25rem; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; color: var(--t-ink); }
@media (forced-colors: active) { main > .verdict { border: 2px solid CanvasText; box-shadow: none; clip-path: none; } }
main:has(> .verdict) > h1 { margin-top: 8px; font-size: 14px; line-height: 18px; font-weight: 500; }
main:has(> .verdict) > .lead { margin-top: 6px; font-size: 17px; line-height: 22px; font-weight: 500; }
main:has(> .verdict) mark { font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
main:has(> .verdict) > .meta { margin-top: 12px; line-height: 20px; }
main:has(> .verdict) > .meta span:first-child { color: inherit; font-weight: 700; }
main:has(> .verdict) > .meta + * { margin-top: 28px; }
/* pages without a verdict: the answer leads, the headline steps back */
main:not(:has(.verdict)) > h1 { margin-top: 10px; font-size: 16px; line-height: 21px; font-weight: 600; color: var(--sub); }
main:not(:has(.verdict)) > .lead { margin-top: 6px; font-size: 22px; line-height: 29px; font-weight: 650; letter-spacing: -.01em; }
main:not(:has(.verdict)) mark { font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
main:not(:has(.verdict)) > .meta { margin-top: 16px; padding-top: 8px; border-top: 5px solid var(--ink); }
main > dl { border-top: 5px solid var(--ink); }
main > dl dt { padding-top: 8px; }
main > dl dd { padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-weight: 500; }
main > section > h2, #perevirka > h2 { font-family: var(--f-body); font-weight: 500; font-size: 17px; line-height: 23px; }
ul.index { --key-w: 4.4rem; border-top: 5px solid var(--ink); }
ul.index .key { font-family: var(--f-head); font-weight: 800; font-size: 26px; line-height: 1; color: var(--ink); }
ul.index .t { color: var(--ink); }
@media (min-width: 48em) {
  main > .verdict { min-height: 40vh; max-height: none; justify-content: center; overflow: visible; padding-block: 32px; }
  main:has(> .verdict) > h1 { font-size: 20px; line-height: 26px; }
  main:has(> .verdict) > .lead { font-size: 24px; line-height: 34px; max-width: 32em; }
  main:not(:has(.verdict)) > h1 { margin-top: 20px; font-size: 18px; line-height: 24px; }
  main:not(:has(.verdict)) > .lead { font-size: 32px; line-height: 40px; max-width: 26em; }
  main > dl { grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; }
  main > dl > * { padding: 8px 0; border-bottom: 1px solid var(--rule); }
}

:root, :root[data-theme="light"], :root[data-theme="dark"]{--accent:#7a2e2e;--on-accent:#ffffff}
