/* reference.css: Reference: a public register record, framed in heavy ink
   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: "Fira Sans Condensed Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 99.9%; ascent-override: 93.1%; descent-override: 26%; line-gap-override: 0%; }

:root {
  --accent: oklch(0.47 0.16 255);
  --pad: 16px;
  --max: 76rem;
  --measure: 34em;
  --radius: 0;
  --f-body: "Fira Sans Condensed", "Fira Sans Condensed Fallback", sans-serif;
  --f-ui: var(--f-body);
  --f-head: var(--f-body);
  --bg: oklch(0.925 0.01 250);
  --cell: oklch(0.993 0.003 250);
  --ink: oklch(0.19 0.03 255);
  --sub: oklch(0.4 0.035 255);
  --rule: oklch(0.19 0.03 255 / 0.25);
  --link: var(--accent);
  --on-accent: oklch(0.99 0 0);
  --field: oklch(0.42 0.03 255);
  --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.8 0.19 147);
  --yes-ink: oklch(0.18 0.04 150);
  --yes-word: oklch(0.18 0.04 150);
  --limit: oklch(0.85 0.15 85);
  --limit-ink: oklch(0.2 0.045 70);
  --limit-word: oklch(0.2 0.045 70);
  --no: oklch(0.68 0.2 28);
  --no-ink: oklch(0.15 0.04 25);
  --no-word: oklch(0.15 0.04 25);
  --info: oklch(0.76 0.12 240);
  --info-ink: oklch(0.17 0.04 250);
  --info-word: oklch(0.17 0.04 250);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --accent: oklch(0.78 0.12 250);
  --bg: oklch(0.16 0.02 255);
  --cell: oklch(0.22 0.025 255);
  --ink: oklch(0.93 0.012 250);
  --sub: oklch(0.77 0.03 250);
  --rule: oklch(0.93 0.012 250 / 0.25);
  --link: var(--accent);
  --on-accent: oklch(0.17 0.03 255);
  --field: oklch(0.66 0.04 250);

  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: oklch(0.78 0.12 250);
  --bg: oklch(0.16 0.02 255);
  --cell: oklch(0.22 0.025 255);
  --ink: oklch(0.93 0.012 250);
  --sub: oklch(0.77 0.03 250);
  --rule: oklch(0.93 0.012 250 / 0.25);
  --link: var(--accent);
  --on-accent: oklch(0.17 0.03 255);
  --field: oklch(0.66 0.04 250);

  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: "\2039"; 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; white-space: nowrap; }
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; }

ul.index { list-style: none; padding: 0; }
main > ul.index { margin-top: 28px; }
ul.index > li > a { display: flex; flex-wrap: wrap; 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 :is(.key, .t, .note) { min-width: 0; white-space: normal; overflow-wrap: break-word; }
ul.index .key { flex: 0 1 auto; max-width: 100%; font-variant-numeric: tabular-nums; }
ul.index .t { flex: 1 1 min(100%, 14em); }
ul.index .t { font-weight: 600; color: var(--link); }
ul.index .note { flex: 1 1 100%; color: var(--sub); }
ul.index > li > a:hover .t { text-decoration: underline; text-decoration-thickness: 2px; }
@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 { 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; } }

/* Reference: a public register record. Accent masthead with a scale bar, the record as a heavy ink frame of cells, field codes in a gutter */
body { font-variant-numeric: tabular-nums lining-nums; }
header { padding-bottom: 12px; background-color: var(--accent); color: var(--on-accent); background-image: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 40px), repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px); background-size: 100% 12px, 100% 5px; background-position: var(--pad) 100%; background-repeat: no-repeat; }
header .brand { min-height: 46px; font-size: 21px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; padding-top: 12px; counter-reset: sec; }
main > * { min-width: 0; }
main > :is(.crumbs, h1, .verdict, .lead, .meta) { position: relative; margin: 0; max-width: none; background: var(--cell); border: 0 solid var(--ink); border-width: 2px 4px 0; }
main > :first-child { border-top-width: 4px; }
main > .meta, main > .crumbs:not(:has(+ :is(h1, .verdict, .lead, .meta))) { border-bottom-width: 4px; }
main > .crumbs { min-height: 44px; padding: 0 12px; background: var(--ink); color: var(--cell); font-weight: 600; }
main > .crumbs a, main > .crumbs > :not(a), .crumbs > * + *::before { color: inherit; }
main > .crumbs + * { border-top-width: 0; }
main > :is(h1, .verdict, .lead, .meta) { padding: 10px 10px 12px 48px; }
main > :is(h1, .verdict, .lead, .meta)::before { position: absolute; inset: 0 auto 0 0; width: 38px; padding-top: 11px; border-right: 1px solid var(--ink); text-align: center; font: 600 16px/20px var(--f-ui); letter-spacing: 0; color: var(--sub); }
main > h1::before { content: "(54)"; }
main > .verdict::before { content: "(51)"; color: inherit; border-color: currentColor; }
main > .lead::before { content: "(57)"; }
main > .meta::before { content: "(22)"; }
main > h1 { font-size: 19px; line-height: 23px; font-weight: 700; letter-spacing: -.005em; }
main > .verdict { gap: 0; background: var(--t); }
main > .lead { font-size: 19px; line-height: 25px; font-weight: 500; letter-spacing: -.01em; }
mark { padding: 0 .16em; background: var(--accent); color: var(--on-accent); font-weight: 700; }
main > .meta { flex-direction: column; gap: 1px; padding-top: 9px; font-size: 16px; line-height: 21px; }
main > .btns { margin-top: 16px; }
.btn { min-height: 50px; border-width: 3px; font-weight: 700; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--cell); }
.btn.alt { background: var(--cell); color: var(--ink); border-color: var(--ink); }
.btn.alt:hover { background: var(--ink); color: var(--cell); }
main > dl { margin-top: 24px; background: var(--cell); border: 4px solid var(--ink); }
main > dl dt { padding: 9px 12px 0; border-top: 1px solid var(--ink); font-size: 16px; line-height: 20px; font-weight: 600; }
main > dl dt:first-child { border-top: 0; }
main > dl dd { padding: 1px 12px 11px; font-size: 24px; line-height: 29px; font-weight: 700; letter-spacing: -.015em; }
main > dl dd:has(> a) { font-size: 17px; line-height: 24px; font-weight: 500; letter-spacing: 0; }
main > section:not(#perevirka) { counter-increment: sec; }
main > section > h2 { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 24px; line-height: 28px; font-weight: 800; }
main > section:not(#perevirka) > h2::before { content: counter(sec, decimal-leading-zero); color: var(--accent); }
main > ul.index { margin-top: 24px; background: var(--cell); border: 4px solid var(--ink); }
ul.index > li > a { column-gap: 0; align-items: stretch; padding: 0; border-bottom: 1px solid var(--ink); }
ul.index > li:last-child > a { border-bottom: 0; }
ul.index .key { align-self: stretch; padding: 11px 10px; border-right: 1px solid var(--ink); font-weight: 700; color: var(--accent); }
ul.index .t { padding: 11px 12px 0; color: var(--ink); }
ul.index .note { padding: 0 12px 11px; font-size: 16px; }
ul.index > li > a:hover { background: color-mix(in oklch, var(--accent) 12%, var(--cell)); }
#perevirka { background: var(--cell); border: 4px solid var(--ink); padding: 0 14px 20px; }
#perevirka > h2 { display: block; margin: 0 -14px; padding: 10px 14px; border: 0; background: var(--ink); color: var(--cell); font-size: 23px; line-height: 27px; font-weight: 800; }
#perevirka > p { margin-top: 12px; }
#perevirka input:not([type="checkbox"]):not([type="radio"]), .chk input { background: var(--cell); }
#check-status { border-top-width: 4px; }
footer { margin-top: 48px; border-top: 4px solid var(--ink); }
@media (min-width: 48em) {
  header .brand { min-height: 60px; font-size: 25px; }
  main { padding-top: 24px; }
  main > .crumbs { padding: 0 24px; }
  main > :is(h1, .verdict, .lead, .meta) { padding: 14px 24px 16px 84px; }
  main > :is(h1, .verdict, .lead, .meta)::before { width: 64px; padding-top: 16px; }
  main > h1 { font-size: 28px; line-height: 33px; }
  main > .lead { font-size: 27px; line-height: 35px; }
  main > dl { grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr); }
  main > dl dt { padding: 16px; border-right: 1px solid var(--ink); }
  main > dl dd { padding: 10px 20px 12px; border-top: 1px solid var(--ink); font-size: 34px; line-height: 40px; }
  main > dl dd:nth-child(2) { border-top: 0; }
  main > dl dd:has(> a) { padding-top: 17px; font-size: 18px; line-height: 26px; }
  ul.index > li > a { font-size: 19px; }
}
@media (min-width: 64em) {
  main { grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem); }
  main > * { grid-column: 1 / -1; }
  main > .lead { grid-column: 1; border-right-width: 2px; border-bottom-width: 4px; padding-right: 32px; font-size: 30px; line-height: 39px; }
  main > .lead + .meta { grid-column: 2; border-left-width: 0; border-top-width: 2px; }
  ul.index:has(> li:nth-child(13)) { column-gap: 4px; column-rule: 4px solid var(--ink); }
}

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