/* iusta: главная. Материалы дела: листы с номерами, бланки с линиями и подписями под ними,
   синяя ручка для номеров и пометок, красный карандаш для главного, входящий штамп. */

@font-face { font-family: "PT Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/pt-serif-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/pt-serif-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/pt-serif-cyrillic-400-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/pt-serif-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Serif"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/pt-serif-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/pt-serif-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-weight: 400 700; font-display: swap; src: url("fonts/caveat-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat"; font-weight: 400 700; font-display: swap; src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --desk: #E6E0D2; --desk-2: #DDD6C6;
  --sheet: #FFFEFA; --ink: #1B1A17; --ink-2: #3A3832; --muted: #5E594F; --rule: #CBC3B1; --line: #2B2925;
  --pen: #2446A6; --pen-wash: rgba(36, 70, 166, 0.1); --red: #B3341F; --stamp: #3A3C9E; --ok: #2E6B3F;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --serif: "PT Serif", "Times New Roman", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --hand: "Caveat", "Segoe Print", cursive;
  --wrap: 1240px; --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 1px 1px rgba(60, 48, 24, 0.07), 0 14px 32px -16px rgba(60, 48, 24, 0.38);
  --sec: clamp(72px, 9vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--desk); color: var(--ink-2); font: 500 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, ol, ul, figure, blockquote { margin: 0; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: rgba(36, 70, 166, 0.18); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--ink); color: var(--sheet); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- кнопки и ссылки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border: 1.5px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink); font: 700 1rem/1.1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease); }
.btn-ink { background: var(--ink); color: var(--sheet); }
.btn-ink:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }
.lnk { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.lnk:hover { color: var(--pen); }

/* ---------- шапка */
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 800 1.375rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 22px; }
.brand-line { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-motto { padding-left: 16px; border-left: 1px solid var(--rule); color: var(--muted); font: italic 400 1.0625rem/1.3 var(--serif); white-space: nowrap; }

/* ---------- заголовки разделов */
.kicker { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 18px; color: var(--muted); font: 700 0.8125rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.ldk { color: var(--pen); font: 600 1.5rem/1 var(--hand); letter-spacing: 0; text-transform: none; transform: rotate(-4deg); }
h2 { font: 700 clamp(2rem, 1.4rem + 2.4vw, 3.25rem)/1.08 var(--serif); letter-spacing: -0.01em; }
.lead { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.5; color: var(--ink-2); }
.sec { padding-block: calc(var(--sec) * 0.6); }
.hero + .sec { padding-top: calc(var(--sec) * 0.4); }
.sec:last-child { padding-bottom: var(--sec); }
.sec-text > * + * { margin-top: 18px; }
.sec-text h2 + p { margin-top: 24px; }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.sec-head h2 + .lead { margin-top: 22px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.split-r { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* ---------- лист */
.sheet { position: relative; container-type: inline-size; background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); border-radius: 2px; }
.ld { position: absolute; top: 14px; right: 22px; display: flex; align-items: baseline; gap: 4px; color: var(--ink); font: 400 0.8125rem/1 var(--serif); }
.ld b { min-width: 2.2em; padding: 0 0.3em; border-bottom: 1px solid var(--line); color: var(--pen); font: 600 1.6rem/0.8 var(--hand); text-align: center; transform: rotate(-3deg); }

/* ---------- документ внутри листа: размер шрифта идёт от ширины листа, как на бумаге */
.doc { font: 400 clamp(10.5px, 2.4cqi, 15px)/1.45 var(--serif); color: var(--ink); }
.doc p + p { margin-top: 0.15em; }
.d-title { font-weight: 700; font-size: 1.32em; letter-spacing: 0.02em; text-align: center; line-height: 1.15; }
.d-title.sm { font: 700 1.05rem/1.2 var(--serif); letter-spacing: 0.14em; }
.d-sub { font-weight: 700; text-align: center; line-height: 1.2; }
.u { position: relative; display: inline-block; min-height: 1.35em; padding: 0 0.3em; border-bottom: 1px solid var(--line); text-align: center; vertical-align: baseline; }
.u[data-cap] { margin-bottom: 0.95em; }
.u[data-cap]::after { content: "(" attr(data-cap) ")"; position: absolute; left: 0; right: 0; top: 100%; padding-top: 1px; font-size: 0.58em; line-height: 1.15; text-align: center; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1 1 auto; min-width: 2em; text-align: left; }
.w-2 { min-width: 2.2em; } .w-month { min-width: 5.5em; } .w-place { min-width: 14em; } .w-sign { min-width: 9em; } .w-name { min-width: 9em; }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; margin-top: 1.3em; }
.d-date { white-space: nowrap; }
.d-times { margin: 0.9em 0 0.9em 2.2em; }
.d-times p + p { margin-top: 0.25em; }
.d-line, .d-q, .d-sign { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.2em 0.45em; margin-top: 0.45em; }
.d-line .u[data-cap]::after { white-space: normal; }
.d-just, .d-par { text-align: justify; hyphens: auto; }
.paper-tpl .d-just { text-align: left; }
.d-just { margin: 0.5em 0 0.4em; }
.d-par { text-indent: 2.2em; margin-top: 0.35em; }
.d-q > span:first-child, .d-line > span:first-child:not(.u) { flex: 0 1 auto; min-width: 0; }
.d-in { padding-left: 2.2em; }
.d-sign { flex-wrap: nowrap; gap: 1.4em; margin: 0.9em 0 0.4em 2.2em; }
.d-sign .u { flex: 0 1 9em; min-width: 0; }
.d-sign b { margin-right: auto; }
.d-gap { margin: 0.8em 0; color: var(--muted); letter-spacing: 0.6em; text-align: center; }

/* ---------- первый экран: вопрос, ваш бланк и протокол из него */
.hero { padding: clamp(24px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); }
.hero-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px clamp(32px, 5vw, 72px); align-items: end; }
h1 { font: 700 clamp(2.5rem, 1rem + 4.2vw, 5rem)/1 var(--serif); letter-spacing: -0.02em; overflow-wrap: break-word; }
.hero .lead { margin-top: 0; max-width: 30rem; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 26px; }

.demo { display: grid; grid-template-columns: minmax(0, 1fr) 136px minmax(0, 1fr); align-items: start; margin-top: clamp(48px, 6vw, 80px); }
.paper { position: relative; container-type: inline-size; padding: 50px 6% 40px 8%; background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); border-radius: 2px; }
.paper .doc { font-size: clamp(10.5px, 2.75cqi, 14px); }
.paper .d-title { margin-top: 0.4em; }
.paper-tpl { transform: rotate(-1.1deg); }
.paper-res { transform: rotate(0.9deg); margin-top: 44px; }
.paper-tab { position: absolute; top: -26px; left: 22px; padding: 7px 11px 6px; background: var(--ink); color: var(--sheet); font: 500 0.75rem/1 var(--mono); border-radius: 3px 3px 0 0; white-space: nowrap; max-width: calc(100% - 44px); overflow: hidden; text-overflow: ellipsis; }
.tag { font: 500 0.8em/1.3 var(--mono); color: var(--pen); background: var(--pen-wash); padding: 0 0.25em; border-radius: 2px; white-space: nowrap; transition: background-color 0.25s, color 0.25s; }
.tag.done { color: var(--muted); background: rgba(27, 26, 23, 0.05); }
.val { display: inline-block; clip-path: inset(0 100% 0 0); transition: clip-path 0.6s steps(16, end), background-color 0.25s; }
.val.on { clip-path: inset(0 0 0 0); }
html:not(.js) .val { clip-path: none; }
.tag.hl, .val.hl { background: rgba(36, 70, 166, 0.2); }
.demo-mid { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 150px; }
.run { position: relative; width: 116px; height: 116px; border: 0; border-radius: 50%; padding: 0; background: var(--stamp); color: #FFFFFF; font: 800 0.875rem/1.15 var(--sans); cursor: pointer; transform: rotate(-8deg);
  box-shadow: 0 0 0 4px var(--desk), 0 0 0 6px var(--stamp), 0 14px 26px -12px rgba(40, 40, 120, 0.6); transition: transform 0.3s var(--ease); }
.run::before { content: ""; position: absolute; inset: 9px; border: 1.5px dashed rgba(255, 255, 255, 0.55); border-radius: 50%; }
.run span { position: relative; }
.run:hover { transform: rotate(0deg) scale(1.05); }
.run:active { transform: rotate(0deg) scale(0.96); }
.run:focus-visible { outline: 2px solid var(--pen); outline-offset: 8px; }
.demo-arrow { width: 100px; height: 50px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 1.2s var(--ease); }
.demo.seen .demo-arrow, html:not(.js) .demo-arrow { stroke-dashoffset: 0; }
.demo-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(32px, 5vw, 72px); max-width: 1080px; margin-top: clamp(44px, 5vw, 64px); }
.demo-notes p { color: var(--ink-2); }

/* ---------- от следствия следствию */
.motto { display: flex; flex-direction: column; font: 700 clamp(2.1rem, 9.4vw, 7.25rem)/0.98 var(--serif); letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); }
.motto span:last-child { align-self: flex-end; }
.letter-sheet { max-width: 760px; margin: clamp(32px, 4vw, 56px) 0 0 auto; padding: 64px clamp(22px, 8cqi, 76px) 36px; font: 400 1.125rem/1.6 var(--serif); }
.letter-sheet p + p { margin-top: 0.8em; }
.letter-sheet p:not(.l-to) { text-indent: 2em; }
.l-to { font-weight: 700; }
.l-sign { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 22px; }
.l-sign svg { width: 130px; height: auto; fill: none; stroke: var(--pen); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- допрос */
.steno { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.steno-col { padding: 56px clamp(20px, 4cqi, 48px) 40px; }
.steno-col + .steno-col { border-left: 1px dashed var(--rule); }
.steno-h { margin-bottom: 16px; color: var(--muted); font: 700 0.75rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.said { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font: 500 0.9375rem/1.5 var(--sans); }
.said li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); column-gap: 10px; }
.said time { grid-row: span 2; color: var(--muted); font: 400 0.8125rem/1.7 var(--mono); }
.said b { color: var(--pen); font: 800 0.75rem/1.5 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; }
.said li.w b { color: var(--ink); }
.said p { color: var(--ink); }
.hints { margin-top: 26px; padding: 14px 16px; border-left: 3px solid var(--pen); background: #F6F3EA; font-size: 0.9375rem; }
.hints .steno-h { margin-bottom: 8px; }
.hints p + p { margin-top: 6px; }
.steno .doc { font-size: 1.0625rem; line-height: 1.6; }
.steno .d-par { text-align: left; }
.d-qa { text-indent: 0; }
.chk { background: none; color: inherit; text-decoration: underline dotted var(--red) 2px; text-underline-offset: 4px; }
.flag { display: inline-block; margin-left: 6px; color: var(--red); font: 600 1.2rem/1 var(--hand); font-style: normal; text-indent: 0; transform: rotate(-3deg); }
.note { max-width: 760px; margin-top: 20px; color: var(--muted); font-size: 0.9375rem; }

/* ---------- MCP */
.facts { margin-top: 26px; padding: 0; list-style: none; }
.facts li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 8px; height: 8px; border: 1.5px solid var(--ink); border-radius: 50%; }
.chat { background: #FBFAF6; border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; font-size: 0.9688rem; }
.chat-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: #F3F0E8; font-size: 0.875rem; }
.chat-bar b { color: var(--ink); }
.chat-dots { display: inline-flex; gap: 6px; }
.chat-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.chat-on { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; }
.chat-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.chat-log { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 22px 20px 26px; list-style: none; }
.msg { max-width: 88%; line-height: 1.5; }
.msg.me { align-self: flex-end; padding: 11px 15px; background: var(--ink); color: var(--sheet); border-radius: 14px 14px 3px 14px; }
.msg.me code { color: #E8E2D2; }
.msg.ai { align-self: flex-start; color: var(--ink); }
.tool { align-self: flex-start; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 11px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--muted); font: 400 0.8125rem/1.4 var(--mono); }
.tool span { color: var(--ok); font-weight: 400; }
.tool span::before { content: "✓ "; }
code { font: 400 0.875em/1 var(--mono); overflow-wrap: anywhere; }
.chat-input { display: flex; align-items: center; justify-content: space-between; margin: 0 16px 16px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); color: #736D61; font-size: 0.9375rem; }
.chat-input i { width: 26px; height: 26px; border-radius: 50%; background: var(--desk-2); }
.js .chat.wait .chat-log > li { opacity: 0; transform: translateY(8px); }
.chat-log > li { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.js .chat.wait .chat-log > li.in { opacity: 1; transform: none; }

/* ---------- опись: строки с отточием и листами, справа лист выбранной строки */
.opis-box { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.opis-list { position: relative; margin: 0; padding: 0; list-style: none; }
.opis-list li { position: relative; border-bottom: 1px solid var(--rule); }
.opis-list li:first-child { border-top: 1px solid var(--rule); }
.opis-list button { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 15px 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.opis-list .n { flex: none; width: 2.2ch; color: var(--muted); font: 500 0.8125rem/1 var(--mono); }
.opis-list .t { color: var(--muted); font: 700 clamp(1.125rem, 0.9rem + 0.7vw, 1.5rem)/1.2 var(--serif); transition: color 0.25s, transform 0.35s var(--ease); }
.opis-list .leader { flex: 1; min-width: 24px; border-bottom: 2px dotted rgba(27, 26, 23, 0.3); transform: translateY(-5px); }
.opis-list .lds { flex: none; color: var(--muted); font: 500 0.8125rem/1 var(--mono); }
.opis-list li:hover .t, .opis-list li.on .t { color: var(--ink); }
.opis-list li.on .t { transform: translateX(8px); }
.opis-list li.on .n, .opis-list li.on .lds { color: var(--pen); }
.entry p { padding: 0 0 18px calc(2.2ch + 14px); color: var(--ink-2); }
.opis sup { color: var(--red); font-weight: 700; }
.opis-stage { display: none; }
.js .opis-stage { display: block; position: sticky; top: 12vh; }
.js .entry { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stage-sheet { min-height: 340px; padding: 64px clamp(24px, 7cqi, 56px) 44px; transform: rotate(0.8deg); }
.stage-k { color: var(--muted); font: 700 0.75rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.stage-sheet h3 { margin-top: 12px; font: 700 clamp(1.5rem, 1.1rem + 1vw, 2rem)/1.15 var(--serif); }
.stage-sheet > p:last-child { margin-top: 16px; font: 400 1.0625rem/1.6 var(--serif); color: var(--ink); }
.stage-sheet.swap h3, .stage-sheet.swap > p { animation: swap 0.45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.opis-note { margin-top: 18px; color: var(--muted); font: 400 0.875rem/1.4 var(--serif); }

/* ---------- ходатайство */
.petition { padding: 64px clamp(20px, 6cqi, 64px) 48px; font: 400 1.0625rem/1.55 var(--serif); color: var(--ink); }
.pt-to { margin-left: auto; width: min(100%, 22rem); }
.pt-from { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.pt-from > span { padding-top: 6px; }
.blank { flex: 1; display: flex; flex-direction: column; }
.blank input { width: 100%; min-height: 40px; padding: 6px 4px 2px; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; background: transparent; color: var(--pen); font: 600 1.45rem/1.2 var(--hand); outline: none; }
.blank input::placeholder { color: #736D61; font: 400 1rem/1.2 var(--serif); }
.blank input:focus-visible { border-bottom-color: var(--pen); box-shadow: 0 2px 0 var(--pen); }
.blank input[aria-invalid="true"] { border-bottom-color: var(--red); }
.cap { margin-top: 3px; font-size: 0.75rem; color: var(--ink-2); text-align: center; }
.cap::before { content: "("; } .cap::after { content: ")"; }
.err { display: block; min-height: 1.2em; color: var(--red); font: 600 1.25rem/1.1 var(--hand); }
.err:empty { min-height: 0; }
.pt-title { margin-top: 36px; text-align: center; font: 700 1.25rem/1.2 var(--serif); letter-spacing: 0.18em; }
.pt-text { margin-top: 18px; text-indent: 2.2em; }
.pt-via { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 14px 0 6px; padding: 0; border: 0; }
.pt-via label { position: relative; display: inline-flex; cursor: pointer; }
.pt-via input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-via span { position: relative; padding: 6px 14px; font-weight: 700; }
.pt-via span::after { content: ""; position: absolute; inset: -2px -4px; border: 2px solid var(--pen); border-radius: 50%; transform: rotate(-4deg) scale(0.9); opacity: 0; transition: opacity 0.2s var(--ease), transform 0.25s var(--ease); }
.pt-via input:checked + span::after { opacity: 1; transform: rotate(-4deg); }
.pt-via input:focus-visible + span { outline: 2px solid var(--pen); outline-offset: 4px; }
.blank-wide { margin-top: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pt-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-top: 30px; }
.pt-date { padding-bottom: 22px; }
.pt-sign { display: flex; flex-direction: column; }
.sign-pad { position: relative; width: 220px; height: 76px; border-bottom: 1.5px solid var(--line); }
.sign-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sign-hint { position: absolute; left: 50%; top: 50%; color: rgba(36, 70, 166, 0.32); font: 600 1.7rem/1 var(--hand); font-style: normal; white-space: nowrap; pointer-events: none; transform: translate(-50%, -46%) rotate(-4deg); transition: opacity 0.2s; }
.sign-pad.drawn .sign-hint { opacity: 0; }
.sign-clear { position: absolute; right: 0; top: -22px; padding: 2px 6px; border: 0; background: none; color: var(--muted); font: 500 0.75rem/1 var(--mono); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sign-clear:hover { color: var(--red); }
.sent .sign-pad canvas { pointer-events: none; cursor: default; }
.sent .sign-clear { display: none; }
.pt-send { display: flex; justify-content: flex-end; margin-top: 26px; }
.status { min-height: 1.5em; margin-top: 16px; font: 600 0.9375rem/1.45 var(--sans); color: var(--ok); }
.status[data-state="error"] { color: var(--red); }
.stamp { position: absolute; left: clamp(12px, 5cqi, 48px); top: 58px; width: 180px; height: auto; color: var(--stamp); mix-blend-mode: multiply; pointer-events: none; opacity: 0; transform: rotate(-7deg) scale(1.25); }
.stamp text { font-family: var(--sans); }
.stamp .st-h { font-size: 15px; font-weight: 800; letter-spacing: 0.06em; }
.stamp .st-l { font-size: 15px; font-weight: 600; }
.stamp .st-v { font: 700 28px var(--hand); }
.stamped .stamp { animation: stamp 0.42s cubic-bezier(0.3, 1.4, 0.5, 1) forwards; }
@keyframes stamp { to { opacity: 0.88; transform: rotate(-7deg) scale(1); } }

/* ---------- подвал */
.foot { padding-block: 40px 56px; border-top: 1px solid var(--rule); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; }
.cert { font: 400 1.0625rem/1.4 var(--serif); color: var(--ink); }
.hand { color: var(--pen); font: 600 1.5rem/1 var(--hand); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-sign { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 1060px) {
  .hero-top, .split, .split-r { grid-template-columns: minmax(0, 1fr); }
  .split > .sheet, .split > .chat, .split > form { max-width: 760px; }
  .demo { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .paper-res { margin-top: 0; }
  .demo-mid { flex-direction: row; justify-content: center; margin: 34px 0 44px; }
  .demo-arrow { width: 64px; transform: rotate(90deg) scaleX(-1); }
  .demo-notes { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .steno { grid-template-columns: minmax(0, 1fr); }
  .opis-box { grid-template-columns: minmax(0, 1fr); }
  .js .opis-stage { display: none; }
  .js .opis-list li.on .entry { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .opis-list li.on .t { transform: none; }
  .steno-col + .steno-col { border-left: 0; border-top: 1px dashed var(--rule); padding-top: 32px; }
  .letter-sheet { margin-left: 0; }
}
@media (max-width: 760px) {
  .foot-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .top-nav { gap: 14px; }
  .brand-motto { display: none; }
  .opis-list button { gap: 10px; padding: 13px 0; }
  .opis-list .t { font-size: 1.0625rem; }
  .opis-list .leader { min-width: 12px; }
  .entry p { padding-left: calc(2.2ch + 10px); }
  .paper { padding: 44px 16px 28px 20px; }
  .paper-tpl .doc { max-height: 360px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .d-head { flex-direction: column; gap: 0.6em; }
  .d-sign { gap: 0.8em; margin-left: 0; }
  .letter-sheet { padding: 56px 20px 28px; font-size: 1.0625rem; }
  .steno-col { padding: 48px 18px 28px; }
  .petition { padding: 56px 18px 36px; }
  .pt-to { width: 100%; }
  .stamp { width: 150px; top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
