/* «Судові справи» — стилі сайту. Світла й темна тема: prefers-color-scheme + ручний вибір (html[data-theme]).
   Колонка вмісту ≈720 px, один акцент, картки з тонкою рамкою. Ціль доступності — WCAG 2.2 AA. */

@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-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: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-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: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/manrope-cyrillic-800-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-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/manrope-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f6f7f9; --header: rgba(246, 247, 249, .78); --surface: rgba(255, 255, 255, .92); --card: #fff; --text: #14161b; --muted: #4a5060;
  --border: #e3e6ec; --border-strong: #8d94a3; --accent: #2457ff; --accent-ink: #fff; --accent-text: #1f4ee0; --accent-soft: #eaf0ff;
  --shadow: 0 10px 28px rgba(36, 87, 255, .25); --footer: #eef0f3; --ok: #1f7a4d; --ok-bg: #e9f7f0; --warn: #8a5a12; --warn-bg: #fff6e6; --warn-line: #e8c27a;
  --bad: #b42318; --bad-bg: #fdecea; --mark: #fff1b8; --focus: #2457ff;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark;
  --bg: #0f1115; --header: rgba(15, 17, 21, .7); --surface: rgba(24, 27, 33, .9); --card: #181b21; --text: #eef0f4; --muted: #a3a9b6;
  --border: #2a2f3a; --border-strong: #5a6274; --accent: #5b82ff; --accent-ink: #0b1030; --accent-text: #8eabff; --accent-soft: rgba(91, 130, 255, .16);
  --shadow: 0 10px 28px rgba(0, 0, 0, .4); --footer: #0b0d11; --ok: #6ee0a6; --ok-bg: rgba(76, 201, 140, .1); --warn: #f5c16c; --warn-bg: rgba(245, 177, 76, .1); --warn-line: rgba(245, 177, 76, .45);
  --bad: #ff8a80; --bad-bg: rgba(255, 99, 88, .12); --mark: rgba(255, 214, 10, .3); --focus: #8eabff;
} }
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0f1115; --header: rgba(15, 17, 21, .7); --surface: rgba(24, 27, 33, .9); --card: #181b21; --text: #eef0f4; --muted: #a3a9b6;
  --border: #2a2f3a; --border-strong: #5a6274; --accent: #5b82ff; --accent-ink: #0b1030; --accent-text: #8eabff; --accent-soft: rgba(91, 130, 255, .16);
  --shadow: 0 10px 28px rgba(0, 0, 0, .4); --footer: #0b0d11; --ok: #6ee0a6; --ok-bg: rgba(76, 201, 140, .1); --warn: #f5c16c; --warn-bg: rgba(245, 177, 76, .1); --warn-line: rgba(245, 177, 76, .45);
  --bad: #ff8a80; --bad-bg: rgba(255, 99, 88, .12); --mark: rgba(255, 214, 10, .3); --focus: #8eabff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; position: relative;
  /* Переноси лише цілими словами (правило засновника). */
  hyphens: none; overflow-wrap: normal; word-break: normal; }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-family: Manrope, Inter, sans-serif; font-weight: 800; font-size: clamp(28px, 6vw, 40px); letter-spacing: -.3px; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 28px 0 10px; }
h3 { font-size: 18px; margin: 22px 0 8px; }
p { margin: 0 0 12px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 14px; background: var(--card); border: 2px solid var(--accent); border-radius: 10px; }
.skip:focus { left: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Шапка */
.top { position: relative; z-index: 1; border-bottom: 1px solid var(--border); background: var(--header); backdrop-filter: blur(6px); }
.top-in { max-width: 720px; margin: 0 auto; padding: 12px 20px; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; text-decoration: none; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; } :root[data-theme="dark"] .theme-btn .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .moon { display: block; } :root:not([data-theme="light"]) .theme-btn .sun { display: none; } }
.brand { justify-self: center; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text); text-align: center; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
:root[data-theme="dark"] .brand img { outline: 1px solid rgba(255, 255, 255, .18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { outline: 1px solid rgba(255, 255, 255, .18); } }
.brand-name { font-family: Manrope, Inter, sans-serif; font-size: 22px; font-weight: 800; }
.brand-sub { font-size: 13px; color: var(--muted); }
.brand-dot { color: var(--accent); }

/* Перемикач документів */
.docs { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.docs a { text-decoration: none; text-align: center; padding: 11px 6px; min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 11px; border: 1px solid transparent; color: var(--muted); font-weight: 600; font-size: 15px; line-height: 1.2; }
.docs a:hover { color: var(--text); background: var(--accent-soft); }
.docs a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 700; }
@media (max-width: 520px) { .docs { display: flex; overflow-x: auto; scrollbar-width: none; } .docs::-webkit-scrollbar { display: none; } .docs a { flex: none; padding: 8px 14px; white-space: nowrap; } }

/* Основний вміст */
main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 18px 20px 64px; }
.home { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.h-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.h-tabs button { min-height: 44px; padding: 4px 6px; border-radius: 10px; border: 1.5px solid transparent; background: transparent; color: var(--muted); font: 800 14px/1.2 Manrope, Inter, sans-serif; cursor: pointer; }
.h-tabs button:hover { color: var(--text); }
.h-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
/* Рамка вкладки — сталої висоти, список праворуч прокручується */
.h-panel { height: 270px; }
.h-panel[hidden] { display: none !important; }
.h-pick { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; }
.h-topics { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); overflow-y: auto; }
.h-topics button { flex: 1; min-height: 44px; max-height: 60px; padding: 4px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 14px/1.25 Inter, sans-serif; text-align: left; cursor: pointer; }
.h-topics button:hover { color: var(--text); }
.h-topics button[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.h-subj { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.h-subj[hidden] { display: none; }
.h-note { font-size: 12px; color: var(--muted); padding: 0 2px; }
.h-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; scrollbar-width: thin; overscroll-behavior: contain; }
.h-list a { flex: none; min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.3; display: flex; align-items: center; }
.h-list a:hover { border-color: var(--accent); }
.h-info { padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); overflow-y: auto; font-size: 15px; }
.h-facts { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.cta { align-self: center; margin-top: 4px; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 36px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font: 800 18px Manrope, Inter, sans-serif; box-shadow: var(--shadow); }
.cta:hover { filter: brightness(1.06); }
.alt { align-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; font-weight: 600; text-decoration: none; }
.alt svg { width: 18px; height: 18px; }
.free { margin: 0; text-align: center; color: var(--muted); font-size: 15px; }
.examples { margin-top: 6px; }
.examples h2 { margin: 0 0 8px; text-align: center; font: 800 18px Manrope, Inter, sans-serif; }
.ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ex { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text); }
.ex-card { width: 100%; height: 170px; overflow: hidden; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); display: flex; flex-direction: column; gap: 4px; font-size: 7.5px; line-height: 1.4; }
.ex:hover .ex-card { border-color: var(--accent); }
.ex-paper { background: #fff; color: #14161b; }
.ex-card .r { align-self: flex-end; width: 64%; }
.ex-card .c { text-align: center; }
.ex-card .b { font-weight: 700; }
.ex-card .m { color: var(--muted); }
.ex-paper .m { color: #4a5060; }
.ex-dl { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; background: var(--ok-bg); }
.ex-dl .ok { color: var(--ok); font-weight: 700; }
.ex-dl b { font: 800 12px Manrope, Inter, sans-serif; }
.ex-cap { padding: 1px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); }
@media (min-width: 600px) { .h-pick { grid-template-columns: 200px minmax(0, 1fr); } .ex-card { height: 210px; font-size: 9.5px; padding: 12px; } .ex-dl b { font-size: 14px; } }
@media (max-width: 380px) { .h-pick { grid-template-columns: 124px minmax(0, 1fr); } .h-tabs button, .h-topics button { font-size: 13px; } }
@media (max-width: 520px) { .h-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .h-tabs button { min-height: 40px; } .h-panel { height: 250px; } .free { font-size: 13px; } .ex-card { height: 150px; } .home { padding-top: 4px; } }

.page-head { margin: 18px 0 8px; }
.page-head p { color: var(--muted); }
.doc-page h2 { font-size: 20px; }
/* Тексти сторінок — за шириною колонки, переноси лише цілими словами */
.doc-page p, .doc-page li, .page-head p { text-align: justify; hyphens: manual; -webkit-hyphens: manual; }
.doc-page .flow p, .doc-page .flow li, .doc-page .soon-badge { text-align: left; }
/* Методика: схема ядра */
.flow { margin: 16px 0 20px; }
.doc-page .flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; position: relative; }
.flow-step { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.flow-step:not(:last-child)::after { content: ""; position: absolute; left: 33px; bottom: -22px; width: 2px; height: 22px; background: var(--accent); }
.flow-step:not(:last-child)::before { content: ""; position: absolute; left: 28px; bottom: -28px; border: 6px solid transparent; border-top-color: var(--accent); z-index: 1; }
.flow-step p { margin: 4px 0 0; font-size: 15px; }
.flow-n { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font: 800 16px/32px Manrope, Inter, sans-serif; text-align: center; }
.flow-core { border: 2px solid var(--accent); background: var(--accent-soft); }
.flow-core .flow-n { background: var(--accent); color: var(--accent-ink); }
.flow-data { border-style: dashed; }
.doc-page .flow-sub { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-page .flow-sub li { margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 14px; }
.flow figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
/* Заглушки «скоро» */
.soon-badge { display: inline-block; margin: 4px 0 14px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
/* Форма зворотного зв'язку */
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-status { min-height: 1.5em; margin: 6px 0 0; font-weight: 600; }
.fb-status.ok { color: var(--ok); } .fb-status.bad { color: var(--bad); }
/* Калькулятори: дві вкладки */
.calc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 8px 0 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.calc-tabs button { min-height: 48px; border-radius: 10px; border: 1.5px solid transparent; background: transparent; color: var(--muted); font: 800 16px Manrope, Inter, sans-serif; cursor: pointer; }
.calc-tabs button:hover { color: var(--text); }
.calc-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.doc-page ul, .doc-page ol { padding-left: 22px; margin: 0 0 12px; }
.doc-page li { margin: 4px 0; }
.updated { font-size: 14px; color: var(--muted); }

/* Елементи форм і майстрів */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card > :last-child { margin-bottom: 0; }
details.card > summary { cursor: pointer; min-height: 24px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--border); margin: 12px 0; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--text); }
.notice.bad { background: var(--bad-bg); border-color: var(--bad); }
.notice.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--text); }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); font-weight: 600; }
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.btn { position: relative; }
fieldset { border: 0; padding: 0; margin: 14px 0; min-width: 0; }
legend { padding: 0; }
.field { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type="text"], input[type="date"], input[type="number"], input[type="email"], select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
textarea { min-height: 88px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; cursor: pointer; min-height: 44px; padding-top: 10px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.wz-step h2 { margin-top: 8px; }
/* Майстер: прогрес, кроки, підсумок */
.wz-prog { margin: 4px 0 12px; }
.wz-prog-t { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 12px; font-size: 14px; color: var(--muted); }
.wz-all summary { min-height: 44px; display: flex; align-items: center; color: var(--accent-text); font-weight: 600; cursor: pointer; }
.wz-all[open] { flex-basis: 100%; }
.wz-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.wz-bar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.wz-nav { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 2px; }
.wz-tab { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.wz-tab:hover { background: var(--accent-soft); }
.wz-tab.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.wz-tab[disabled] { color: var(--muted); cursor: not-allowed; background: none; }
.wz-n { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.wz-tab.done .wz-n { background: var(--ok); border-color: var(--ok); color: var(--card); }
.wz-tab.on .wz-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wz-rail { display: none; }
.wz-step h2 { outline: none; }
.wz-topic { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 64px; }
.wz-go { color: var(--muted); font-size: 22px; line-height: 1; }
.wz-back { margin: 0 0 4px; }
.wz-scan-btns .btn { flex: 1 1 150px; }
.wz-scan details summary { min-height: 44px; display: flex; align-items: center; color: var(--accent-text); cursor: pointer; }
.wz-move { position: sticky; bottom: 0; z-index: 2; margin: 16px 0 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); flex-wrap: nowrap; }
.wz-move:empty { display: none; }
.wz-move [data-act="next"] { flex: 1; gap: 0; min-height: 52px; font-size: 17px; }
.wz-move [data-act="back"] { min-height: 52px; }
.wz-nx { display: none; }
.wz-side { display: none; }
.wz-side.last { display: block; margin-top: 20px; }
.wz-side h2 { font-size: 18px; margin: 0 0 10px; }
.wz-sum { margin: 0 0 12px; display: grid; gap: 10px; font-size: 15px; }
.wz-sum dt { color: var(--muted); font-size: 13px; }
.wz-sum dd { margin: 0; font-weight: 600; }
.wz-sum dd.ok { color: var(--ok); } .wz-sum dd.warn { color: var(--warn); } .wz-sum dd.bad { color: var(--bad); }
.wz-store { border-top: 1px solid var(--border); padding-top: 8px; }
.wz-store p { margin: 0 0 6px; }
@media (min-width: 1100px) {
  main.wide { max-width: 1180px; }
  main.wide .page-head, main.wide > .docs { max-width: 720px; }
  .wz { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
  .wz-rail { display: block; position: sticky; top: 16px; }
  .wz .wz-all { display: none; }
  .wz-side, .wz-side.last { display: block; margin: 0; position: sticky; top: 16px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); }
  .wz-move { position: static; border: 0; background: none; padding: 0; }
  .wz-move [data-act="next"] { flex: none; padding: 10px 28px; }
  .wz-nx { display: inline; }
}

.wz-move { justify-content: space-between; }
.wz-msg { min-height: 1.5em; font-weight: 600; color: var(--accent-text); }
.wz-cards { display: grid; gap: 8px; }
.wz-card { width: 100%; font: inherit; color: var(--text); text-align: left; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.wz-card.on { border-color: var(--accent); background: var(--accent-soft); }
.wz-card input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.wz-card > span, .wz-v > span { display: flex; flex-direction: column; gap: 2px; }
.wz-risk { display: block; }
.wz-dl { border-width: 1.5px; }
.wz-dl p { margin: 0 0 4px; }
.wz-dl .dl-st { font-weight: 700; }
.wz-dl.ok .dl-st { color: var(--ok); } .wz-dl.warn .dl-st { color: var(--warn); } .wz-dl.bad .dl-st { color: var(--bad); }
.wz-dl .dl-date { font: 800 28px/1.15 Manrope, Inter, sans-serif; }
.wz-dl.ok { border-color: var(--ok); background: var(--ok-bg); }
.wz-dl.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.wz-dl.bad { border-color: var(--bad); background: var(--bad-bg); }
.wz-seg { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.wz-checks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.wz-checks li { padding: 10px 12px 10px 38px; border-radius: 10px; border: 1px solid var(--border); position: relative; background: var(--card); }
.wz-checks li::before { position: absolute; left: 12px; top: 9px; font-weight: 800; }
.wz-checks li.blocker { border-color: var(--bad); background: var(--bad-bg); } .wz-checks li.blocker::before { content: "!"; color: var(--bad); }
.wz-checks li.warning { border-color: var(--warn-line); background: var(--warn-bg); } .wz-checks li.warning::before { content: "!"; color: var(--warn); }
.wz-checks li.info::before, .wz-checks li.ok::before { content: "i"; color: var(--accent-text); }
.wz-doc { background: #fff; color: #111; border: 1px solid var(--border); border-radius: 8px; padding: 28px 30px; font: 14px/1.5 "Times New Roman", Times, serif; overflow-x: auto; }
.wz-doc p { margin: 0 0 6px; }
.wz-doc .a-center { text-align: center; } .wz-doc .a-right { text-align: right; } .wz-doc .a-justify { text-align: justify; }
.wz-doc .sp { height: 10px; }
.wz-doc mark { background: #fff1b8; color: #111; }
.wz-print { position: fixed; width: 0; height: 0; border: 0; left: -10px; top: -10px; }

.wz-list .card { margin: 8px 0; }
.wz-pick { display: grid; gap: 8px; }
.wz-pick a, .wz-pick button { text-align: left; justify-content: flex-start; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.suggest { border: 2px solid var(--accent); }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 14px; margin: 8px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.res { margin: 0 0 6px; font: 800 30px/1.15 Manrope, Inter, sans-serif; }
.res.muted { color: var(--border-strong); }
.res-k { margin: 0; font-size: 14px; color: var(--muted); }
.seg-f { margin: 14px 0; }
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--border); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 6px 8px; border-radius: 9px; text-align: center; font-size: 15px; line-height: 1.2; }
.seg input:checked + span { background: var(--card); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.calc-out p:last-child { margin-bottom: 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 8px 6px; vertical-align: top; }
.tbl { overflow-x: auto; }

/* Підвал: посилання по центру, текст за шириною, дрібний шрифт */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--footer); }
.foot-in { max-width: 720px; margin: 0 auto; padding: 20px 20px 32px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; margin-bottom: 6px; font-size: 14px; }
.foot nav a { color: var(--text); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.foot nav a:hover { text-decoration: underline; }
.foot p { margin: 0; font-size: 12px; line-height: 1.45; text-align: justify; hyphens: manual; -webkit-hyphens: manual; }
.foot p.small { font-size: 11px; }
.foot p.c { text-align: center; }
.foot b { color: var(--text); }
.foot .c a { color: var(--text); text-decoration: none; }
@media (max-width: 480px) {
  .top-in { padding: 10px 12px; gap: 8px; }
  .brand-name { font-size: 19px; }
  .brand-sub { font-size: 12px; }
  main { padding: 14px 14px 48px; }
  .wz-doc { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .top, .foot, .docs, .wz-nav, .wz-move, .wz-prog, .wz-side, .row, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Кабінет «Мої справи» (етап E) */
input[type="password"], input[type="time"], input[type="file"] { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
input[type="file"] { padding: 8px; }
input[type="radio"] { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.cc-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cc-nav a { color: var(--text); font-weight: 600; text-decoration: none; padding: 10px 2px; }
.cc-nav a[aria-current="page"] { color: var(--accent-text); box-shadow: inset 0 -2px 0 var(--accent); }
.cc-nav .btn { margin-left: auto; }
.cc-nav .cc-sync { flex-basis: 100%; text-align: right; }
.g-btn { min-height: 44px; margin: 8px 0; color-scheme: normal; }
.cc-acct { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cc-acct .btn { margin-left: auto; }
code { font-variant-numeric: tabular-nums; word-spacing: .2em; }
.cc-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.cc-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; }
.cc-card:hover { border-color: var(--accent); }
.cc-card .pill { justify-self: start; }
.cc-dl { font-size: 14px; color: var(--muted); }
.cc-dl.bad { color: var(--bad); font-weight: 600; }
.cc-top h2 { margin: 6px 0 4px; }
.cc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.cc-tabs .wz-tab { width: auto; border: 1px solid var(--border); background: var(--surface); }
.cc-tabs .wz-tab.on { border-color: var(--accent); background: var(--accent-soft); }
.cc-sec { margin: 18px 0; }
.cc-sec h2 { font-size: 20px; }
.cc-sum, .cc-offers, .cc-files, .cc-dls, .cc-tl, .cc-vers { padding-left: 20px; }
.cc-sum li, .cc-offers li, .cc-files li, .cc-tl li { margin: 8px 0; }
.cc-offers li, .cc-files li { display: grid; gap: 4px; }
.cc-dls { list-style: none; padding-left: 0; }
.cc-vers li { margin: 10px 0; display: grid; gap: 2px; }
.cc-vers .row, .cc-files .row { margin: 4px 0; }
.cc-prop { display: grid; gap: 4px; }
.cc-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.linkish { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent-text); font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.linkish:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 520px) { .cc-2 { grid-template-columns: 1fr; } .cc-nav .btn { margin-left: 0; } .cc-nav .cc-sync { text-align: left; } }
/* Хід справи: вертикальний ланцюжок документів по інстанціях */
.cc-inst { font-size: 15px; text-transform: none; color: var(--muted); margin: 22px 0 6px; }
.cc-steps { list-style: none; margin: 0; padding: 0; }
.cc-step { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 14px; }
.cc-step::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.cc-steps .cc-step:last-child::before { display: none; }
.cc-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--card); margin-top: 11px; z-index: 1; }
.s-done .cc-dot { background: var(--accent); border-color: var(--accent); }
.s-next .cc-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.s-later { opacity: .72; }
.cc-step-b { min-width: 0; }
.cc-step-h { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.s-next .cc-step-h { border-color: var(--accent); }
.cc-step-h:hover, .cc-item:hover { border-color: var(--accent); }
.cc-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; margin-top: 6px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cc-item .small { grid-column: 1; }
.cc-item .pill { grid-row: 1 / span 2; grid-column: 2; }
.cc-panel { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--border); }
.cc-panel .row { margin: 8px 0; }
.cc-view { width: min(900px, 96vw); max-height: 92vh; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); padding: 14px; }
.cc-view::backdrop { background: rgba(10, 12, 18, .55); }
.cc-view-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.cc-view-top h2 { font-size: 18px; margin: 0; }
.cc-frame { width: 100%; height: 62vh; border: 1px solid var(--border); border-radius: 10px; background: #fff; margin-top: 10px; }
