/* Державний портал ДВВ штату NG — стиль офіційного державного ресурсу */
:root {
  --ink: #13223b;
  --ink-2: #3d4a63;
  --ink-3: #6a7386;
  --paper: #ffffff;
  --canvas: #f3f1ec;
  --canvas-2: #e9e5dc;
  --rule: #d6cfbf;
  --rule-2: #e6e0d3;
  --navy: #0e2747;
  --navy-2: #173d68;
  --navy-3: #22507f;
  --navy-ink: #0e2747;
  --gold: #a8823a;
  --gold-2: #c9a95e;
  --gold-3: #efe4c8;
  --red: #9b2a26;
  --red-bg: #f6e7e5;
  --green: #2c6a4c;
  --green-bg: #e5f0ea;
  --amber: #93600f;
  --amber-bg: #f6edd9;
  --blue: #2a5b98;
  --blue-bg: #e7eef7;
  --serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
  --r: 3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 14.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.005em; }
h1 { font-size: 30px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.3; }
h3 { font-size: 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-3); }
.mono { font-family: var(--mono); font-size: 0.94em; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.right { text-align: right; }
.spacer { flex: 1; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 24px; align-items: start; }

/* ───────── Верхня смуга та шапка ───────── */
.statebar {
  background: var(--navy);
  color: #c7d1e0;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.statebar .inner { display: flex; gap: 16px; align-items: center; padding: 6px 28px; }
.statebar b { color: #fff; font-weight: 500; }
.statebar .mode { display: inline-flex; gap: 6px; align-items: center; }
.statebar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); display: inline-block; }
.statebar .dot.live { background: #5fbf8a; }

.header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: inset 0 -3px 0 var(--navy);
}
.header .inner { display: flex; align-items: center; gap: 18px; padding: 14px 28px 17px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img, .brand svg { width: 42px; height: 49px; }
.brand .t1 { font: 600 11px/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.brand .t2 { font: 600 21px/1.15 var(--serif); color: var(--navy-ink); }
.brand .t3 { font-size: 12px; color: var(--ink-3); }
.btn.themebtn { width: 36px; height: 36px; padding: 0; color: var(--ink-2); flex: none; }
.btn.themebtn svg { width: 20px; height: 20px; flex: none; }
/* Меню під ім’ям: виїжджає при наведенні на ім’я або аватар */
.who { position: relative; }
.whobtn { display: flex; align-items: center; gap: 12px; padding: 5px 8px; border: 0; border-radius: 6px; background: none; color: inherit; text-align: right; cursor: pointer; }
.who:hover .whobtn, .who:focus-within .whobtn, .who.open .whobtn { background: var(--canvas); }
.whotxt, .whotxt .name, .whotxt .pos { display: block; }
.whotxt .name { font-weight: 600; }
.whotxt .pos { font-size: 12.5px; color: var(--ink-3); max-width: 340px; }
.whobtn .chev { display: block; color: var(--ink-3); transition: transform .16s ease; }
.whobtn .chev svg { display: block; width: 16px; height: 16px; }
.who:hover .chev, .who:focus-within .chev, .who.open .chev { transform: rotate(180deg); }
.whomenu {
  position: absolute; right: 0; top: 100%; min-width: 240px; z-index: 40; padding: 6px; text-align: left;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 16px 36px rgba(12, 20, 34, 0.2);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.whomenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.who:hover .whomenu, .who:focus-within .whomenu, .who.open .whomenu { opacity: 1; visibility: visible; transform: translateY(5px); }
.whomenu a, .whomenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 4px; background: none; color: var(--ink); font-size: 13.5px; text-align: left; cursor: pointer; }
.whomenu a:hover, .whomenu button:hover { background: var(--canvas); text-decoration: none; }
.whomenu svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.whomenu [data-logout], .whomenu [data-logout] svg { color: var(--red); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--navy-2); color: #fff;
  display: grid; place-items: center; font: 600 13px var(--sans); letter-spacing: 0.04em; flex: none;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--gold-2);
}

.regime {
  background: var(--red);
  color: #fff;
  font-size: 13px;
}
.regime .inner { padding: 8px 28px; display: flex; gap: 12px; align-items: center; }
.regime b { letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }

/* ───────── Каркас ───────── */
.layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: calc(100vh - 110px); }
.side {
  background: var(--paper);
  border-right: 1px solid var(--rule);
  padding: 18px 0 40px;
  position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto;
}
.side h4 {
  margin: 20px 24px 6px; font: 600 10.5px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
}
.side h4:first-child { margin-top: 4px; }
.side a {
  display: flex; gap: 11px; align-items: center; padding: 7px 24px 7px 21px; color: var(--ink-2);
  border-left: 3px solid transparent; font-size: 14px;
}
.side a svg { width: 17px; height: 17px; flex: none; color: var(--ink-3); }
.side a:hover { background: var(--canvas); text-decoration: none; color: var(--ink); }
.side a.on { border-left-color: var(--gold); background: #f7f4ec; color: var(--navy-ink); font-weight: 600; }
.side a.on svg { color: var(--gold); }
.side .count { margin-left: auto; font: 600 11px var(--sans); background: var(--navy); color: #fff; border-radius: 9px; padding: 1px 7px; }
.side .sub a { padding-left: 49px; font-size: 13.5px; }

.main { padding: 26px 36px 80px; max-width: 1240px; width: 100%; }
.crumbs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); }
.pagehead { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.pagehead .lead { color: var(--ink-2); margin-top: 6px; max-width: 760px; }
.pagehead .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.footer { border-top: 1px solid var(--rule); background: var(--paper); color: var(--ink-3); font-size: 12px; }
.footer .inner { padding: 16px 36px; display: flex; gap: 18px; flex-wrap: wrap; }

/* ───────── Картки й таблиці ───────── */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); }
.card > .hd { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--rule-2); }
.card > .hd h3 { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.card > .hd .aside { margin-left: auto; font-size: 12.5px; }
.card > .bd { padding: 16px 18px; }
.card > .bd.flush { padding: 0; }
.card.plain { border-color: var(--rule-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th {
  text-align: left; font: 600 10.5px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--rule); background: #faf8f4; white-space: nowrap;
}
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.link { cursor: pointer; }
table.t tr.link:hover td { background: #faf8f3; }
table.t td .sub { color: var(--ink-3); font-size: 12px; }
/* Таблиця в картці ніколи не залазить під сусідню колонку (форма праворуч): картка гортається вбік, довгі слова переносяться */
.card > .bd:has(> table.t) { overflow-x: auto; }
table.t td { overflow-wrap: anywhere; }
table.t td.nowrap, table.t td .nowrap { overflow-wrap: normal; }
table.t td.act { white-space: nowrap; width: 1%; }
/* Довгий текст у клітинці: перші рядки й «ще…» */
details.more summary { cursor: pointer; color: var(--navy-3, #22507f); font-size: 12px; list-style: none; margin-top: 2px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { display: none; }
.regno { font-family: var(--mono); font-size: 12.5px; color: var(--navy-ink); white-space: nowrap; border-left: 2px solid var(--gold-2); padding-left: 7px; }

.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-family: var(--serif); font-size: 16px; font-weight: 600; margin-bottom: 4px; }

/* ───────── Мітки, кнопки ───────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font: 600 10.5px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase;
  padding: 4px 7px 3px; border-radius: 2px; border: 1px solid currentColor; white-space: nowrap; background: var(--paper);
}
.tag.green { color: var(--green); background: var(--green-bg); border-color: #b9d6c6; }
.tag.red { color: var(--red); background: var(--red-bg); border-color: #e3bcb8; }
.tag.amber { color: var(--amber); background: var(--amber-bg); border-color: #e4cf9f; }
.tag.blue { color: var(--blue); background: var(--blue-bg); border-color: #bccde3; }
.tag.gray { color: var(--ink-3); background: #f2f1ee; border-color: var(--rule); }
.tag.navy { color: #fff; background: var(--navy); border-color: var(--navy); }
.tag.gold { color: #6f5420; background: var(--gold-3); border-color: #dcc791; }
.pill { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill.late { color: var(--red); font-weight: 600; }
.pill.soon { color: var(--amber); font-weight: 600; }
.law { display: inline-block; font-size: 11.5px; color: #6f5420; background: #f7f0de; border-left: 2px solid var(--gold-2); padding: 2px 8px; border-radius: 0 2px 2px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px;
  border-radius: var(--r); border: 1px solid var(--navy); background: var(--navy); color: #fff; font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn:focus-visible, .side a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.btn svg { width: 16px; height: 16px; }
.btn.sec { background: var(--paper); color: var(--navy-ink); border-color: #b9c2d0; }
.btn.sec:hover { border-color: var(--navy); background: #f8f9fb; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--navy-ink); padding: 0 8px; }
.btn.ghost:hover { background: var(--canvas); }
.btn.danger { background: var(--paper); border-color: #d9aaa6; color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: #94722f; border-color: #94722f; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 14.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ───────── Форми ───────── */
.form { display: grid; gap: 16px; }
.form.cols { grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.fld label.l { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fld label.l .req { color: var(--red); margin-left: 2px; }
.fld .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.inp, .fld input[type=text], .fld input[type=number], .fld input[type=date], .fld input[type=datetime-local], .fld input[type=password], .fld select, .fld textarea {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid #c8c1b1; border-radius: var(--r); background: #fff; color: var(--ink);
}
.fld textarea { height: auto; min-height: 92px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .inp:focus { border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(34, 80, 127, 0.12); outline: none; }
.fld .pair { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.fld .money { position: relative; }
.fld .money::before { content: "$"; position: absolute; left: 11px; top: 9px; color: var(--ink-3); }
.fld .money input { padding-left: 22px; }
.chk { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.chk input { margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--navy); flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 18px; }
.confirm { background: #faf7ef; border: 1px solid #e5d9b8; border-radius: var(--r); padding: 9px 12px; }
.note { background: #f7f5ef; border-left: 3px solid var(--gold-2); padding: 10px 14px; font-size: 13px; color: var(--ink-2); }
.note.warn { background: var(--amber-bg); border-left-color: var(--amber); color: #5d3f0b; }
.note.err { background: var(--red-bg); border-left-color: var(--red); color: var(--red); }
.note.ok { background: var(--green-bg); border-left-color: var(--green); color: #1f4a35; }
.listrows .lrow { display: grid; gap: 8px; grid-template-columns: 1fr 1fr auto; align-items: end; padding: 10px; border: 1px dashed var(--rule); border-radius: var(--r); margin-bottom: 8px; }
.formerr { color: var(--red); font-size: 13px; }
.formbar { display: flex; gap: 10px; align-items: center; padding-top: 6px; }

/* ───────── Вкладки, фільтри ───────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a, .tabs button {
  padding: 9px 14px; color: var(--ink-2); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-size: 13.5px;
}
.tabs a.on, .tabs button.on { color: var(--navy-ink); border-bottom-color: var(--gold); font-weight: 600; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 12px/1 var(--mono); padding: 6px 9px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); color: var(--ink-2); cursor: pointer;
}
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .inp { max-width: 340px; }
/* Реєстр адвокатів: заголовки двох частин */
.regh { font-size: 16px; font-weight: 600; margin: 20px 0 8px; color: var(--ink); }

/* ───────── Головна ───────── */
.greet { display: flex; gap: 18px; align-items: center; }
.greet .date { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.task { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--rule-2); color: var(--ink); }
.task:last-child { border-bottom: 0; }
.task:hover { background: #faf8f3; text-decoration: none; }
.task .k { font: 600 10.5px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); width: 168px; flex: none; }
.task .ti { flex: 1; }
.task svg.chev { width: 16px; height: 16px; color: var(--ink-3); }
.stat { padding: 16px 18px; border-right: 1px solid var(--rule-2); }
.stat:last-child { border-right: 0; }
.stat .v { font: 600 26px/1.1 var(--serif); color: var(--navy-ink); }
.stat .l { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.quick a {
  display: flex; gap: 12px; align-items: center; padding: 13px 15px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); color: var(--ink); font-weight: 500;
}
.quick a:hover { border-color: var(--navy-3); text-decoration: none; }
.quick a svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.event { display: flex; gap: 14px; padding: 11px 18px; border-bottom: 1px solid var(--rule-2); color: var(--ink); }
.event:last-child { border-bottom: 0; }
.event:hover { background: #faf8f3; text-decoration: none; }
.event .d { width: 48px; text-align: center; flex: none; border: 1px solid var(--rule); border-radius: 2px; }
.event .d b { display: block; font: 600 18px/1.1 var(--serif); color: var(--navy-ink); padding-top: 3px; }
.event .d span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; background: var(--navy); color: #fff; padding: 2px 0; }

/* ───────── Каталог документів ───────── */
.cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.cat a {
  display: block; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 15px 16px 14px; color: var(--ink); position: relative;
}
.cat a:hover { border-color: var(--navy-3); text-decoration: none; box-shadow: 0 2px 10px rgba(14, 39, 71, 0.06); }
.cat a .ix { font: 500 11.5px var(--mono); color: var(--gold); letter-spacing: .02em; }
.cat a .tt { font: 600 15.5px/1.3 var(--serif); margin: 6px 0 8px; color: var(--navy-ink); }
.cat a .lw { font-size: 12px; color: var(--ink-3); }
.cat a.locked { background: #faf9f6; border-style: dashed; cursor: default; }
.cat a.locked .tt { color: var(--ink-3); }
.cat a.locked:hover { border-color: var(--rule); box-shadow: none; }
.groupt { font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 26px 0 10px; display: flex; gap: 10px; align-items: center; }
.groupt::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ───────── Бланк документа — за зразком Указу № УКЗ-029: герб, Times New Roman, подвійна рамка, підпис і печатка ───────── */
/* Розміри — як на аркуші A4 шириною 794 px; «mini» — стисле прев’ю поруч із формою */
/* Справи прокуратури: вільна — жовта, у роботі — синя, завершена — зелена; прострочена блимає червоно-жовтим */
:root {
  --pc-free-bg: #fff6d4; --pc-free-line: #d9a91f;
  --pc-taken-bg: #e7eef9; --pc-taken-line: #3f78c5;
  --pc-done-bg: #e3f2e8; --pc-done-line: #3a9a62;
  --pc-red: #d62d2d; --pc-yel: #f2c200;
}
html[data-theme="dark"] {
  --pc-free-bg: #2d2711; --pc-free-line: #b8921c;
  --pc-taken-bg: #14263f; --pc-taken-line: #4f86d6;
  --pc-done-bg: #12301f; --pc-done-line: #38a468;
  --pc-red: #f05252; --pc-yel: #f5c518;
}
.pc-mon .bd { display: grid; gap: 16px; }
.pc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.pc-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--rule); border-left-width: 4px; border-radius: var(--r); background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.pc-tile .n { font: 600 24px/1.1 var(--sans); }
.pc-tile .t { font-size: 12.5px; color: var(--ink-3); }
.pc-tile[aria-pressed="true"] { outline: 2px solid var(--navy-3); outline-offset: 1px; }
.pc-t-free { border-left-color: var(--pc-free-line); }
.pc-t-taken { border-left-color: var(--pc-taken-line); }
.pc-t-done { border-left-color: var(--pc-done-line); }
.pc-t-late { border-left-color: var(--pc-red); }
.pc-mongrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
.pc-h { margin: 0 0 8px; font: 600 12px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.pc-late { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pc-late li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 8px; border-radius: var(--r); background: var(--red-bg); cursor: pointer; font-size: 13.5px; }
.pc-days, .pc-red { color: var(--pc-red); font-weight: 600; }
.pc-stats { margin: 14px 0 10px; }
.pc-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(150px, auto); gap: 14px 18px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--rule); border-left: 5px solid var(--pc-line, var(--rule)); border-radius: var(--r); background: var(--pc-bg, var(--paper)); }
.pc-free { --pc-bg: var(--pc-free-bg); --pc-line: var(--pc-free-line); }
.pc-taken { --pc-bg: var(--pc-taken-bg); --pc-line: var(--pc-taken-line); }
.pc-done { --pc-bg: var(--pc-done-bg); --pc-line: var(--pc-done-line); }
.pc-row.late { box-shadow: 0 0 0 2px var(--pc-red), inset 0 0 0 2px var(--pc-yel); }
@keyframes pclate {
  0%, 100% { box-shadow: 0 0 0 2px var(--pc-red), inset 0 0 0 2px var(--pc-yel); }
  50% { box-shadow: 0 0 0 2px var(--pc-yel), inset 0 0 0 2px var(--pc-red); }
}
@media (prefers-reduced-motion: no-preference) { .pc-row.late { animation: pclate 1.6s ease-in-out infinite; } }
.pc-row.pc-focus { outline: 3px solid var(--navy-3); outline-offset: 2px; }
.pc-title { font-size: 15px; overflow-wrap: anywhere; }
.pc-title .mono { font-size: 12.5px; color: var(--ink-3); margin-right: 4px; }
.pc-meta { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.pc-mat { margin-top: 8px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.pc-pros { margin-top: 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.pc-lab { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.pc-assign { margin-top: 6px; }
.pc-assign select { max-width: 240px; }
.pc-steps { font-size: 13.5px; }
.pc-step { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 3px 0; }
.pc-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--rule); border-radius: 50%; background: var(--paper); flex: none; }
.pc-dot svg { width: 12px; height: 12px; }
.pc-step.ok .pc-dot { border-color: var(--green); color: var(--green); }
.pc-st { min-width: 150px; font-weight: 600; }
.pc-step + .pc-h { margin-top: 10px; }
.pc-lock { font-size: 13px; color: var(--ink-3); }
.pc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pc-latetag { color: #3a0000; background: var(--pc-yel); border-color: var(--pc-red); font-weight: 600; }
@media (max-width: 1100px) { .pc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pc-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; } }
@media (max-width: 720px) { .pc-row, .pc-mongrid { grid-template-columns: minmax(0, 1fr); } .pc-st { min-width: 0; } }
.sheetwrap { display: flex; justify-content: center; }
/* Документ, перенесений з Discord: сторінки бланка — картинками */
.imp-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.imp-pages > a { display: block; width: 100%; max-width: 794px; }
.imp-page { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 50, 0.08), 0 10px 30px rgba(20, 30, 50, 0.08); }
/* Архів Discord */
.sheet {
  --doc: "Times New Roman", Tinos, "Liberation Serif", serif;
  background: #fff; width: 100%; max-width: 794px; padding: 64px 78px 56px; position: relative;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.08), 0 10px 30px rgba(20, 30, 50, 0.08);
  font: 14.5px/1.239 var(--doc); color: #111; overflow: clip;
  /* Жоден рядок не виходить за аркуш: надто довге слово переноситься всередині */
  overflow-wrap: anywhere;
  /* Лист A4 (210×297): довший текст подовжує аркуш, нижній колонтитул — унизу сторінки */
  display: flex; flex-direction: column; aspect-ratio: 210 / 297;
}
.sheet > .sbody { flex: 1 0 auto; display: flex; flex-direction: column; }
.sheet.formal { padding: 70px 78px 66px; }
.sheet.formal::before, .sheet.formal::after { content: ""; position: absolute; pointer-events: none; }
.sheet.formal::before { inset: 45px; border: 1px solid #111; }
.sheet.formal::after { inset: 55.5px; border: 0.6px solid #222; }
.sheet .arms { display: block; width: 53.4px; height: 65.8px; margin: 0 auto 18.2px; }
.sheet .org1, .sheet .org2, .sheet .org3 { text-align: center; }
.sheet .org1 { font: 700 16px/21.3px var(--doc); }
.sheet .org2 { font: 700 15.5px/21.3px var(--doc); }
.sheet .org3 { font: 400 15.5px/21.3px var(--doc); }
.sheet .rule2 { border: 0; border-top: 1.3px solid #111; border-bottom: 0.6px solid #111; height: 5.1px; margin: 9.5px 0 7.6px; }
.sheet .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 0 6.7px; }
.sheet .meta.m2 { margin-top: 9.4px; }
.sheet .meta .cls { font-size: 11px; letter-spacing: 0.02em; }
.sheet .kind { text-align: center; font: 700 20.3px/1.2 var(--doc); text-transform: uppercase; margin-top: 23.6px; }
.sheet .kind2 { text-align: center; font: 700 14px/1.3 var(--doc); letter-spacing: 0.08em; margin-top: 2px; }
.sheet .ttl { text-align: center; font: 700 16.7px/1.225 var(--doc); margin: 12.8px 24px 17.2px; }
.sheet p { margin: 0 0 9.5px; text-align: justify; text-indent: 1.3em; hyphens: manual; }
.sheet p.item { text-indent: 0; }
.sheet p.ragged, .sheet.ogp p.ragged, .sheet.ogp p.dash > span.ragged { text-align: left; }
.sheet p.dir { text-indent: 0; text-align: center; font: 700 15.3px/18px var(--doc); margin: 14.3px 0 13.8px; }
.sheet p.dir span { letter-spacing: 0.25em; }
/* Підпис — після тексту, з проміжком як на зразку (на довгому документі — менше) */
.sheet .gap { flex: 1 1 0; min-height: 48px; max-height: 114px; }
.sheet .sign { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; position: relative; min-height: 130px; padding: 0 6.7px; }
.sheet .sign .pos { max-width: 300px; }
.sheet .sign .who2 { width: 199px; text-align: right; }
.sheet .sign .hand { font: 400 34px/1 "Great Vibes", "Segoe Script", cursive; color: #1c2f6b; height: 56px; margin-top: 8px; display: flex; align-items: flex-end; justify-content: center; white-space: nowrap; }
.sheet .sign .hand:not(.img) { transform: rotate(-4deg); overflow: hidden; }
.sheet .sign .hand.img { height: 61px; margin-top: 2.5px; justify-content: flex-end; }
.sheet .sign .hand.img img { max-height: 56px; max-width: 100%; object-fit: contain; }
.sheet .sign .line { border-top: 0.6px solid #1a1a1a; margin-top: 6px; }
.sheet .sign .cap { font-size: 10.5px; line-height: 1.3; text-align: center; margin-top: 3.3px; }
.sheet .seal { position: absolute; left: 50%; top: 18px; width: 110px; height: 110px; margin-left: -55px; pointer-events: none; mix-blend-mode: multiply; }
.sheet .foot { margin-top: 24px; padding-top: 6px; border-top: 0.6px solid #d9dce2; display: flex; justify-content: space-between; font: 9.5px/1.4 var(--sans); color: #6b7383; gap: 16px; }
.sheet .foot > :last-child { white-space: nowrap; flex: none; }
.sheet.mini { padding: 30px 34px 26px; font-size: 12px; box-shadow: 0 1px 2px rgba(20, 30, 50, 0.08); border: 1px solid var(--rule-2); }
.sheet.mini.formal { padding: 40px 42px 34px; }
.sheet.mini.formal::before { inset: 14px; }
.sheet.mini.formal::after { inset: 19px; }
.sheet.mini .arms { width: 34px; height: 41.9px; margin-bottom: 10px; }
.sheet.mini .org1, .sheet.mini .org2, .sheet.mini .org3 { font-size: 12px; line-height: 1.35; }
.sheet.mini .rule2 { margin: 7px 0 6px; }
.sheet.mini .meta { padding: 0; }
.sheet.mini .meta .cls { font-size: 9px; }
.sheet.mini .kind { font-size: 15px; margin-top: 14px; }
.sheet.mini .ttl { font-size: 13px; margin: 8px 10px 12px; }
.sheet.mini p { margin-bottom: 7px; }
.sheet.mini p.dir { font-size: 12.5px; line-height: 1.3; margin: 10px 0; }
.sheet.mini .gap { min-height: 26px; max-height: 40px; }
.sheet.mini .sign { min-height: 92px; padding: 0; }
.sheet.mini .sign .who2 { width: 150px; }
.sheet.mini .sign .hand { font-size: 27px; height: 40px; }
.sheet.mini .sign .hand.img { height: 46px; }
.sheet.mini .sign .hand.img img { max-height: 42px; }
.sheet.mini .seal { width: 80px; height: 80px; margin-left: -40px; top: 16px; }
.sheet.mini .foot { font-size: 9px; margin-top: 16px; }
/* Бланк Генеральної прокуратури — пропорції зразка Постанови ОГП № 00-14 (аркуш 794 px) */
.sheet.ogp { padding: 8px 62px 40px; font: 16.5px/1.6 var(--doc); }
.sheet.ogp .oarms { display: block; width: 136px; height: auto; margin: 0 auto; }
.sheet.ogp .oorg, .sheet.ogp .okind { text-align: center; font: 700 18.5px/1.2 var(--doc); color: #1d2734; }
.sheet.ogp .oorg { margin-top: 22px; }
.sheet.ogp .okind { margin-top: 37px; }
.sheet.ogp .ometa { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; margin: 8px 66px 0 36px; font-size: 16px; }
.sheet.ogp .ometa span:nth-child(2) { padding: 0 24px; }
.sheet.ogp .ometa span:last-child { text-align: right; }
.sheet.ogp .ometa span { white-space: nowrap; }
/* Вужчий аркуш (сторінка документа поруч із реквізитами): рядок «дата | місто | №» без бічних відступів */
.sheet.ogp { container-type: inline-size; }
@container (max-width: 600px) {
  .sheet.ogp .ometa { margin: 8px 0 0; font-size: 14.5px; }
  .sheet.ogp .ometa span:nth-child(2) { padding: 0 12px; }
  .sheet.ogp p.dash { margin-left: 12px; grid-template-columns: 26px 1fr; }
  .sheet.ogp .osign { padding-left: 0; }
}
.sheet.ogp .ottl { text-align: center; font: 700 16.5px/1.35 var(--doc); margin: 26px 20px 0; }
.sheet.ogp p { margin: 22px 0 0; text-indent: 2.2em; text-align: justify; }
.sheet.ogp p + p { margin-top: 10px; }
.sheet.ogp p.dash { display: grid; grid-template-columns: 34px 1fr; text-indent: 0; margin: 14px 0 0 32px; }
.sheet.ogp p:not(.dash) + p.dash { margin-top: 40px; }
.sheet.ogp p.odir { text-indent: 0; margin-top: 16px; }
.sheet.ogp p.odir + p.dash { margin-top: 12px; }
.sheet.ogp .oforce { text-align: center; font-weight: 700; margin-top: 46px; }
.sheet.ogp .gap { min-height: 40px; max-height: 120px; }
.sheet.ogp .osign { position: relative; min-height: 190px; padding-left: 36px; }
.sheet.ogp .osign .who { line-height: 1.6; max-width: 330px; position: relative; z-index: 1; }
.sheet.ogp .osign .mark { position: absolute; right: -46px; top: -22px; width: 380px; height: 220px; pointer-events: none; }
/* Попередній перегляд: підпис і печатка блідо — після підписання вони стануть звичайними */
.sheet .sign.ghost .hand, .sheet .sign.ghost .seal, .sheet.ogp .mark.ghost { opacity: 0.38; }
.sheet.ogp .oseal { position: absolute; right: 0; top: 0; width: 162px; height: auto; mix-blend-mode: multiply; }
.sheet.ogp .ohand { position: absolute; right: 120px; top: 92px; font: 400 34px/1 "Great Vibes", "Segoe Script", cursive; color: #22262e; transform: rotate(-8deg); white-space: nowrap; }
.sheet.ogp img.ohand { max-height: 96px; max-width: 220px; transform: rotate(-4deg); top: 82px; }
.sheet.ogp.mini { padding: 6px 30px 24px; font-size: 12px; line-height: 1.55; }
.sheet.ogp.mini .oarms { width: 80px; }
.sheet.ogp.mini .oorg, .sheet.ogp.mini .okind { font-size: 13.5px; }
.sheet.ogp.mini .oorg { margin-top: 12px; }
.sheet.ogp.mini .okind { margin-top: 18px; }
.sheet.ogp.mini .ometa { margin: 6px 10px 0; font-size: 11.5px; }
.sheet.ogp.mini .ometa span:nth-child(2) { padding: 0 10px; }
.sheet.ogp.mini .ottl { font-size: 12.5px; margin-top: 14px; }
.sheet.ogp.mini p { margin-top: 12px; }
.sheet.ogp.mini p.dash { grid-template-columns: 20px 1fr; margin-left: 14px; margin-top: 8px; }
.sheet.ogp.mini p:not(.dash) + p.dash { margin-top: 18px; }
.sheet.ogp.mini .oforce { margin-top: 24px; }
.sheet.ogp.mini .osign { min-height: 120px; padding-left: 10px; }
.sheet.ogp.mini .osign .mark { right: -20px; top: -10px; width: 240px; height: 140px; }
.sheet.ogp.mini .oseal { width: 100px; }
.sheet.ogp.mini .ohand { font-size: 24px; right: 72px; top: 58px; }
.sheet.ogp.mini img.ohand { max-height: 60px; max-width: 140px; top: 52px; }
.sheet .wm {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-28deg); font: 700 82px/1 var(--sans); letter-spacing: 0.1em;
  color: rgba(155, 42, 38, 0.13); white-space: nowrap; pointer-events: none; border: 6px solid rgba(155, 42, 38, 0.13); padding: 6px 24px; z-index: 1;
}
.sheet .wm.draft { color: rgba(19, 34, 59, 0.07); border-color: rgba(19, 34, 59, 0.07); }
/* Печатка за зразком: два кола, напис угорі й унизу, у центрі — орел із печатки зразка */
.sealc { display: block; position: relative; }
.sealc svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sealc i { position: absolute; left: 16.83%; top: 16.83%; width: 66.35%; height: 66.35%; background: var(--seal, #102c4a);
  -webkit-mask: url(/img/seal-eagle.png) center / 100% 100% no-repeat; mask: url(/img/seal-eagle.png) center / 100% 100% no-repeat; }

/* Підказки учасників Discord у формах реєстру */
.mpick { position: relative; }
.mpick .mlist { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 10px 28px rgba(14, 39, 71, 0.16); max-height: 320px; overflow: auto; padding: 4px; }
.mpick .mitem { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 3px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.mpick .mitem:hover, .mpick .mitem.on { background: var(--canvas); }
.mpick .mitem.off { opacity: 0.55; cursor: not-allowed; }
.mpick .mitem img { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--canvas-2); }
.mpick .mn { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.mpick .mn b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpick .mn span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpick .mt { flex: none; }
.mpick .mnone { padding: 10px; color: var(--ink-3); font-size: 13px; }

/* Кадровий реєстр: Прем’єр-міністр і віцепрем’єр-міністри */
.card.leaders { margin-bottom: 18px; }
.card.leaders td.pos { vertical-align: top; width: 22%; border-right: 1px solid var(--rule-2); }
.card.leaders tr.cur td:not(.pos) { background: var(--green-bg); }
html[data-theme="dark"] .card.leaders tr.cur td:not(.pos) { background: rgba(70, 150, 105, 0.16); }

/* ───────── Кабмін ───────── */
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.seat { border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; background: var(--paper); position: relative; }
.seat .p { font: 600 10px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.seat .h { font-weight: 600; margin-top: 4px; }
.seat.on { border-color: #9cc4ae; background: #f3f8f5; }
.seat.on::after { content: "присутній"; position: absolute; top: 9px; right: 10px; font: 600 9.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.seat.vacant .h { color: var(--ink-3); font-weight: 400; font-style: italic; }
.quorum { display: flex; gap: 4px; }
.quorum i { width: 22px; height: 8px; background: var(--canvas-2); border-radius: 1px; }
.quorum i.on { background: var(--green); }
.quorum i.mark { box-shadow: 2px 0 0 var(--navy); }
.agenda { counter-reset: q; }
.qitem { border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); margin-bottom: 14px; }
.qitem .qh { display: flex; gap: 12px; padding: 14px 18px; align-items: flex-start; }
.qitem .qn { font: 600 22px/1 var(--serif); color: var(--gold); width: 26px; flex: none; }
.qitem .qt { flex: 1; }
.qitem .qt b { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.qitem .qb { padding: 0 18px 16px 56px; }
.qitem .qb .txt { white-space: pre-line; font: 14px/1.6 var(--serif); color: var(--ink-2); margin-bottom: 12px; }
.qitem.voting { border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(34, 80, 127, 0.09); }
.votebar { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; margin: 8px 0 6px; position: relative; }
.votebar i { height: 12px; background: var(--canvas-2); border-radius: 1px; }
.votebar i.za { background: var(--green); }
.votebar i.proty { background: var(--red); }
.votebar i.utr { background: #a2a9b6; }
.votebtns { display: flex; gap: 8px; margin: 10px 0; }
.votebtns .btn { min-width: 130px; }
.votebtns .btn.chosen { box-shadow: 0 0 0 3px var(--gold-2); }
.btn.za { background: var(--green); border-color: var(--green); }
.btn.proty { background: var(--red); border-color: var(--red); }
.btn.utr { background: #6d7585; border-color: #6d7585; }
.roll { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; font-size: 13px; margin-top: 8px; }

/* ───────── Стадії законопроєкту ───────── */
.stepper { display: flex; gap: 0; margin: 6px 0 22px; }
.stepper div { flex: 1; position: relative; padding-top: 18px; font-size: 12px; color: var(--ink-3); text-align: center; }
.stepper div::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--rule); }
.stepper div::after { content: ""; position: absolute; top: 0; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--rule); }
.stepper div.done { color: var(--ink-2); }
.stepper div.done::before, .stepper div.done::after { background: var(--navy); border-color: var(--navy); }
.stepper div.cur { color: var(--navy-ink); font-weight: 600; }
.stepper div.cur::after { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-3); }
.stepper div.bad::after { background: var(--red); border-color: var(--red); }
.lawtext { font: 15px/1.7 var(--serif); white-space: pre-line; }
.progress { height: 6px; background: var(--canvas-2); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--navy-3); }
.petition { padding: 16px 18px; border-bottom: 1px solid var(--rule-2); }
.petition:last-child { border-bottom: 0; }

/* ───────── Особова картка, посвідчення ───────── */
.profile { display: flex; gap: 18px; align-items: center; }
.profile .avatar { width: 62px; height: 62px; font-size: 20px; }
.profile .n { font: 600 24px/1.2 var(--serif); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: var(--rule); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--ink-3); }
.idcard {
  width: 560px; height: 354px; border-radius: 14px; overflow: hidden; position: relative; background: #fbfaf6; border: 1px solid var(--rule);
  box-shadow: 0 12px 30px rgba(14, 39, 71, 0.16); font-family: var(--sans); margin: 0 auto;
}
.idcard .band { background: var(--navy); color: #fff; height: 74px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 3px solid var(--gold-2); }
.idcard .band svg { width: 36px; height: 42px; }
.idcard .band .a { font: 600 10px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #c9d3e3; }
.idcard .band .b { font: 600 17px/1.2 var(--serif); }
.idcard .body { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px 22px; }
.idcard .photo { width: 120px; height: 150px; border: 1px solid var(--rule); background: linear-gradient(#eef0f4, #e2e6ee); display: grid; place-items: center; font: 600 36px var(--serif); color: var(--navy-2); }
.idcard .f { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 7px; }
.idcard .v { font-size: 15px; font-weight: 600; }
.idcard .nm { font: 700 21px/1.2 var(--serif); color: var(--navy); }
.idcard .no { position: absolute; right: 22px; top: 92px; font: 500 13px var(--mono); color: var(--red); }
.idcard .sealmini { position: absolute; right: 26px; bottom: 18px; width: 84px; height: 84px; opacity: .8; transform: rotate(-10deg); }

/* ───────── Вхід ───────── */
.login { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }
.login .left {
  background: var(--navy); color: #dfe6f0; padding: 56px 64px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login .left::before {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 64px), repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 64px);
}
.login .left > * { position: relative; }
.login .left svg.big { width: 92px; height: 107px; }
.login .left .t1 { font: 600 12px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); margin-top: 34px; }
.login .left h1 { color: #fff; font-size: 40px; line-height: 1.12; margin-top: 10px; max-width: 460px; }
.login .left .lead { margin-top: 18px; font-size: 15px; line-height: 1.6; max-width: 460px; color: #c6d0df; }
.login .left blockquote { margin: 40px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--gold-2); font: italic 15px/1.6 var(--serif); color: #dbe3ee; max-width: 460px; }
.login .left blockquote cite { display: block; font: normal 12px var(--sans); color: #98a7bd; margin-top: 8px; }
.login .left .bottom { margin-top: auto; padding-top: 40px; font-size: 12px; color: #8e9db4; }
.login .rpanel { display: flex; align-items: center; justify-content: center; padding: 48px 40px; position: relative; }
.login .rpanel .btn.themebtn { position: absolute; top: 18px; right: 18px; }
.login .box { width: 100%; max-width: 470px; }
.login .box h2 { font-size: 26px; }
.steps { list-style: none; padding: 0; margin: 18px 0 22px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 7px 0; font-size: 14px; color: var(--ink-2); }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font: 600 12px var(--sans); flex: none; }
.dbtn { display: inline-flex; gap: 6px; align-items: center; background: #5865f2; color: #fff; border-radius: 4px; padding: 2px 9px; font: 500 13px var(--sans); }
.demo { margin-top: 26px; border: 1px dashed #c9b98f; background: #fbf8ef; border-radius: var(--r); padding: 16px 18px; }
.demo h3 { font-family: var(--sans); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #6f5420; }

/* ───────── Імітація Discord ───────── */
.dc { background: #313338; color: #dbdee1; border-radius: 6px; font: 14.5px/1.4 "gg sans", "Segoe UI", system-ui, sans-serif; overflow: hidden; }
.dc .ch { background: #2b2d31; padding: 10px 16px; font-weight: 600; color: #f2f3f5; border-bottom: 1px solid #1f2023; display: flex; gap: 8px; align-items: center; }
.dc .ch .hash { color: #80848e; font-size: 20px; line-height: 1; }
.dc .msg { display: flex; gap: 14px; padding: 10px 16px; }
.dc .msg:hover { background: #2e3035; }
.dc .msg + .msg { border-top: 1px solid #3a3c42; }
.dc .ava { width: 40px; height: 40px; border-radius: 50%; background: #1e3a64; display: grid; place-items: center; flex: none; }
.dc .ava svg { width: 24px; height: 28px; }
.dc .un { color: #f2f3f5; font-weight: 600; }
.dc .bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; margin-left: 4px; vertical-align: 1px; }
.dc .ts { color: #949ba4; font-size: 12px; margin-left: 6px; }
.dc .where { color: #949ba4; font-size: 12px; }
.dc .content { margin-top: 2px; white-space: pre-wrap; }
.dc .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.dc .embed { margin-top: 6px; background: #2b2d31; border-left: 4px solid #b8892d; border-radius: 4px; padding: 10px 14px 12px; max-width: 520px; }
.dc .embed .et { font-weight: 600; color: #f2f3f5; margin-bottom: 4px; }
.dc .embed .ed { white-space: pre-wrap; font-size: 14px; }
.dc .embed .efs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; }
.dc .embed .ef { grid-column: 1 / -1; }
.dc .embed .ef.in { grid-column: auto; }
.dc .embed .en { font-weight: 600; color: #f2f3f5; font-size: 13px; }
.dc .embed .ev { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.dc .embed .eft { font-size: 12px; color: #949ba4; margin-top: 8px; }
.dc code { background: #1e1f22; border-radius: 3px; padding: 1px 4px; font-size: 13px; }
.dc .spoiler { background: #1e1f22; color: transparent; border-radius: 3px; padding: 0 3px; cursor: pointer; }
.dc .spoiler.open { color: inherit; }
.dc .dbtns { display: flex; gap: 8px; margin-top: 8px; }
.dc .dbtn2 { background: #5865f2; color: #fff; border-radius: 3px; padding: 6px 14px; font-size: 14px; font-weight: 500; border: 0; }
.dc .dbtn2.link { background: #4e5058; }
.dc .sys { color: #949ba4; font-size: 13px; padding: 7px 16px 7px 70px; }
.dc .sys b { color: #dbdee1; font-weight: 500; }
.dc .eph { color: #949ba4; font-size: 12px; margin-top: 4px; }
.dc .docimg { display: block; max-width: 300px; margin-top: 8px; border-radius: 4px; border: 1px solid #3f4147; background: #fff; }

/* ───────── Модальні вікна, повідомлення ───────── */
.modal-bg { position: fixed; inset: 0; background: rgba(12, 20, 34, 0.46); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--paper); width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow: auto; border-radius: 4px; box-shadow: 0 24px 60px rgba(12, 20, 34, 0.3); border-top: 4px solid var(--navy); }
.modal .mh { display: flex; align-items: center; padding: 18px 22px 12px; gap: 12px; }
.modal .mh h2 { font-size: 21px; }
.modal .mb { padding: 4px 22px 22px; }
.modal .x { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 4px; }
.modal .x svg { width: 20px; height: 20px; }
#toasts { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 3px; box-shadow: 0 10px 30px rgba(12, 20, 34, 0.25); max-width: 420px; font-size: 13.5px; border-left: 4px solid var(--gold-2); }
.toast.err { background: #5f1c19; border-left-color: #e09b95; }

.loading { padding: 60px; text-align: center; color: var(--ink-3); }

/* ───────── Темна тема ───────── */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eaf0;
  --ink-2: #c3c9d4;
  --ink-3: #8f98a9;
  --paper: #171c26;
  --canvas: #0e121a;
  --canvas-2: #232a37;
  --rule: #2e3646;
  --rule-2: #262d3a;
  --navy: #2b5f99;
  --navy-2: #3872b3;
  --navy-3: #5b91cf;
  --navy-ink: #a9c7ec;
  --gold: #d3b067;
  --gold-2: #c9a95e;
  --gold-3: #3b3222;
  --red: #e8908a;
  --red-bg: #351a1b;
  --green: #6fc79d;
  --green-bg: #152a20;
  --amber: #deb054;
  --amber-bg: #30261a;
  --blue: #86b6ea;
  --blue-bg: #18283c;
}
/* Бланки, посвідчення й підпис лишаються папером — зі світлими кольорами */
html[data-theme="dark"] .sheet, html[data-theme="dark"] .idcard, html[data-theme="dark"] .sigpaper {
  color-scheme: light;
  --ink: #13223b; --ink-2: #3d4a63; --ink-3: #6a7386; --paper: #ffffff; --canvas: #f3f1ec; --canvas-2: #e9e5dc; --rule: #d6cfbf; --rule-2: #e6e0d3;
  --navy: #0e2747; --navy-2: #173d68; --navy-3: #22507f; --navy-ink: #0e2747; --gold: #a8823a; --gold-2: #c9a95e; --gold-3: #efe4c8; --red: #9b2a26;
}
html[data-theme="dark"] .statebar { background: #090d14; }
html[data-theme="dark"] .regime { background: #8a2420; }
html[data-theme="dark"] .login .left { background: #0f2240; }
html[data-theme="dark"] .side a.on { background: #202736; }
html[data-theme="dark"] table.t th { background: #1c222e; }
html[data-theme="dark"] table.t tr.link:hover td, html[data-theme="dark"] .task:hover, html[data-theme="dark"] .event:hover { background: #1c222e; }
html[data-theme="dark"] .tag.green, html[data-theme="dark"] .tag.red, html[data-theme="dark"] .tag.amber, html[data-theme="dark"] .tag.blue { border-color: currentColor; }
html[data-theme="dark"] .tag.gray { background: #232a37; }
html[data-theme="dark"] .tag.gold { color: #e3c987; border-color: #5b4c2c; }
html[data-theme="dark"] .law { color: #e3c987; background: #2b2518; }
html[data-theme="dark"] .btn.sec { border-color: #3c465a; }
html[data-theme="dark"] .btn.sec:hover { background: #1f2533; border-color: var(--navy-3); }
html[data-theme="dark"] .btn.danger { border-color: #7a3b37; }
html[data-theme="dark"] .btn.za { background: #2c6a4c; border-color: #2c6a4c; }
html[data-theme="dark"] .btn.proty { background: #9b2a26; border-color: #9b2a26; }
html[data-theme="dark"] .inp, html[data-theme="dark"] .fld input[type=text], html[data-theme="dark"] .fld input[type=number], html[data-theme="dark"] .fld input[type=date],
html[data-theme="dark"] .fld input[type=datetime-local], html[data-theme="dark"] .fld input[type=password], html[data-theme="dark"] .fld select, html[data-theme="dark"] .fld textarea { background: #11161f; border-color: #3a4457; }
html[data-theme="dark"] .confirm { background: #1f2229; border-color: #4c4128; }
html[data-theme="dark"] .note { background: #1c2230; }
html[data-theme="dark"] .note.warn { background: var(--amber-bg); color: #f0d194; }
html[data-theme="dark"] .note.err { background: var(--red-bg); }
html[data-theme="dark"] .note.ok { background: var(--green-bg); color: #a9e0c4; }
html[data-theme="dark"] .cat a.locked { background: #141923; }
html[data-theme="dark"] .seat.on { background: #15261e; border-color: #2f6a4c; }
html[data-theme="dark"] .demo { background: #1f1c14; border-color: #5b4c2c; }
html[data-theme="dark"] .demo h3 { color: #e3c987; }
html[data-theme="dark"] .toast { background: #24416a; }

@media (max-width: 1100px) {
  .split, .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--rule); }
  .main { padding: 20px 16px 60px; }
  .login { grid-template-columns: 1fr; }
  .login .left { padding: 36px 28px; }
  .form.cols { grid-template-columns: 1fr; }
  .header .inner, .statebar .inner, .regime .inner { padding-left: 16px; padding-right: 16px; }
  .whotxt .pos { display: none; }
  .idcard { transform: scale(.6); transform-origin: top left; }
}

@media (max-width: 640px) {
  .sheet, .sheet.formal { padding: 40px 26px 30px; }
  .sheet.formal::before { inset: 10px; }
  .sheet.formal::after { inset: 14px; }
  .sheet .sign { padding: 0; }
  .sheet .sign .who2 { width: 140px; }
  .sheet .seal { width: 80px; height: 80px; margin-left: -40px; }
  .sheet.ogp { padding: 6px 22px 30px; font-size: 14.5px; }
  .sheet.ogp .oarms { width: 96px; }
  .sheet.ogp .ometa { margin: 8px 0 0; font-size: 13.5px; }
  .sheet.ogp .ometa span:nth-child(2) { padding: 0 10px; }
  .sheet.ogp p.dash { margin-left: 8px; grid-template-columns: 22px 1fr; }
  .sheet.ogp .osign { padding-left: 0; min-height: 170px; }
  .sheet.ogp .osign .mark { right: -16px; transform: scale(0.75); transform-origin: top right; }
}

@media print {
  body { background: #fff; }
  .statebar, .header, .side, .footer, .regime, .noprint, #toasts, .pagehead, .crumbs { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  .split { display: block; }
  .sheet { box-shadow: none; max-width: none; padding: 18mm 20mm; }
  .idcard { box-shadow: none; }
}

/* ───────── Портал ЕМД: бланк наказу за зразком наказів Головного лікаря ЕМД ───────── */
.brand img { width: 50px; height: 50px; object-fit: contain; }
.login .left img.big, .login img.big { width: 150px; height: 150px; object-fit: contain; }
.sheet.emd { padding: 0; color: #1b1b22; font: 16px/1.32 var(--doc); width: 794px; max-width: none; flex: none;
  /* Кожен аркуш — рівно A4 (794×1123 px = 210×297 мм); що не вміщується — переходить на наступний аркуш (App.pageSheets).
     Тон паперу — виміряний по стовпцях зразка nak3, з якого вирізані шапка й низ */
  aspect-ratio: auto; height: 1123px;
  background: url(/img/blank3-side-l.png) left top / 44.45px auto repeat-y, url(/img/blank3-side-r.png) right top / 44.45px auto repeat-y,
    linear-gradient(90deg, #f0dbbc 5.3%, #f1e0c6 10.8%, #f3e2c8 20.9%, #f5e4c8 34.5%, #f4e3c9 48.1%, #f5e4c8 60%, #f4e3c9 73.5%, #f0dfc5 85.4%, #ebdabe 92.2%, #e9d5ba 94.7%); }
.sheetwrap { min-width: 0; overflow: hidden; }
@media print { .sheet.emd { zoom: 1 !important; } }
.sheet.emd .etop, .sheet.emd .ebot { display: block; width: 100%; height: auto; }
/* Бічні поля й лінії рамки — смуги з того самого зразка під усім аркушем (повторюються по висоті); шапка й низ плавно в них переходять,
   тож лінії йдуть від шапки до кутів низу без розриву й без шва */
/* Обрізка — через contain: paint, не overflow (урок порталу ДВВ v=59: Safari на iPhone інакше обрізає бланк) */
.sheet.emd { overflow: visible; contain: paint; }
.sheet.emd .ebody { flex: 1 1 0; min-height: 0; contain: paint; position: relative; padding: 0 60px; }
.epages { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
#r .epages { gap: 0; }
#r .epages > .sheet.emd + .sheet.emd { border-top: 2px solid #fff; }
/* Верх аркуша-продовження — віддзеркалений низ бланка; текст заходить на його прозору нижню частину */
.sheet.emd.cont .etop { margin-bottom: -64px; }
.sheet.emd.cont .ebody { padding-top: 0; }
.sheet.emd .epno { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 13px; color: #1d2556; }
.sheet.emd p.cut, .sheet.emd li.cut > span:last-child { text-align-last: justify; }
.sheet.emd p.cont { text-indent: 0; margin-top: 0; }
.sheet.emd li.cut { margin-bottom: 0; }
/* Ледь не вміщується на аркуш — щільніші відступи (як .tight у ДВВ) */
.sheet.emd.tight .ekind { font-size: 54px; margin-top: 8px; }
.sheet.emd.tight .eno { font-size: 28px; }
.sheet.emd.tight .erule { margin: 5px 0; }
.sheet.emd.tight .epre { margin-top: 6px; }
.sheet.emd.tight .edir { margin: 10px 0 8px; font-size: 27px; }
.sheet.emd.tight .eitems li { margin-bottom: 5px; }
.sheet.emd.tight .ebasis { margin-top: 8px; }
.sheet.emd.tight .esign { margin-top: 8px; min-height: 132px; }
.sheet.emd.tight .emark { height: 132px; }
@media print { .epages { display: block; } .epages > .sheet.emd { break-after: page; box-shadow: none; } }
.sheet.emd .etop { margin-bottom: -14px; position: relative; z-index: 0; }
/* верх нижнього колонтитула прозорий (текст зразка прибрано) — туди може заходити текст наказу */
.sheet.emd .ebot { margin-top: -62px; position: relative; z-index: 0; }
.sheet.emd .ebody { z-index: 1; }
.sheet.emd .ekind { text-align: center; font: 700 62px/1 var(--doc); color: #1d2556; letter-spacing: .06em; margin-top: 16px; }
.sheet.emd .eno { text-align: center; font: 700 32px/1.1 var(--doc); color: #1d2556; margin-top: 2px; }
.sheet.emd .estate { text-align: right; font: 700 15px/1 var(--doc); color: #1d2556; margin-top: -14px; }
.sheet.emd .erule { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.sheet.emd .erule i { flex: 1; height: 4px; border-top: 1.5px solid #b68a3c; border-bottom: 1px solid #d4ad5f; }
.sheet.emd .erule img { width: 22px; height: 22px; }
.sheet.emd .ettl { font: 700 18px/1.25 var(--doc); color: #1d2556; max-width: 62%; }
.sheet.emd .epre { text-indent: 2.2em; text-align: justify; margin: 10px 0 0; }
.sheet.emd .edir { text-align: center; font: 700 30px/1 var(--doc); color: #1d2556; letter-spacing: .04em; margin: 16px 0 12px; }
.sheet.emd .eitems { list-style: none; margin: 0; padding: 0 4px 0 26px; }
.sheet.emd .eitems li { display: grid; grid-template-columns: 42px 1fr; margin: 0 0 9px; text-align: justify; }
.sheet.emd .eitems li .n { text-align: left; }
.sheet.emd .ebasis { margin: 14px 0 0; }
.sheet.emd .esign { display: grid; grid-template-columns: minmax(240px, 1fr) 160px minmax(170px, 1fr); align-items: center; gap: 10px; margin-top: 18px; min-height: 150px; }
.sheet.emd .epos { font: 700 16px/1.25 var(--doc); color: #1d2556; }
.sheet.emd .edate { font-weight: 400; color: #1d2556; margin: 22px 0 0 40px; font-size: 16px; white-space: nowrap; }
.sheet.emd .emark { position: relative; height: 150px; }
.sheet.emd .eseal { position: absolute; inset: 0; width: 150px; height: 150px; margin: auto; opacity: .9; mix-blend-mode: multiply; }
.sheet.emd .eseal svg { width: 100%; height: 100%; }
.sheet.emd .ehand { position: absolute; left: -10px; right: -40px; bottom: 18px; text-align: center; font: 400 34px/1 "Great Vibes", "Segoe Script", cursive; color: #1c2f6b; transform: rotate(-6deg); white-space: nowrap; }
.sheet.emd .ename { text-align: right; font-size: 16px; color: #1b1b22; overflow-wrap: anywhere; }
.sheet.emd .eacq { margin: 4px 0 0; color: #1d2556; }
.sheet.emd .eacq div:first-child { margin-left: 60px; }
.sheet.emd .eacq div + div { margin-left: 50px; }
.sheet.emd .wm { z-index: 3; }
.sheet.emd.mini { font-size: 12px; }
.sheet.emd.mini .ekind { font-size: 40px; }
.sheet.emd.mini .eno { font-size: 22px; }
/* Чекліст підвищення */
.check { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 10px 16px; border-bottom: 1px solid var(--rule-2); }
.check:last-child { border-bottom: 0; }
.check .ok { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--canvas-2); color: var(--ink-3); }
.check .ok.on { background: var(--green-bg); color: var(--green); }
.check .tt { font-size: 14px; }
.check .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.reqrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule-2); cursor: pointer; }
.reqrow:hover { background: var(--canvas); }
.reqrow:last-child { border-bottom: 0; }
.reqrow .tt { font-weight: 600; }
.reqrow .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.dl2 { display: grid; grid-template-columns: 190px 1fr; gap: 6px 14px; font-size: 14px; }
.dl2 dt { color: var(--ink-3); }
.dl2 dd { margin: 0; word-break: break-word; white-space: pre-line; }
.typebtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.typebtns button { text-align: left; padding: 12px 14px; border: 1px solid var(--rule); background: var(--paper); border-radius: var(--r); cursor: pointer; }
.typebtns button:hover:not([disabled]) { border-color: var(--navy-3); }
.typebtns button[disabled] { opacity: .55; cursor: not-allowed; }
.typebtns b { display: block; font-size: 14px; }
.typebtns span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.guardok { color: var(--green); font-weight: 600; }

.sheet.emd .ehand.img { transform: rotate(-3deg); bottom: 22px; display: flex; justify-content: center; }
.sheet.emd .ehand.img img { max-height: 74px; max-width: 220px; object-fit: contain; }
.sigbox { display: flex; align-items: center; justify-content: center; min-height: 110px; border: 1px dashed var(--rule); border-radius: var(--r); background: #fbf7ee; padding: 10px; }
.sigbox img { max-height: 90px; max-width: 100%; }

/* Вимога ДВВ у «Міжвідомчих запитах» — бланк ДВВ (App.dvvPaper), як на сторінці документа ДВВ */
.dvvwrap { overflow-x: auto; overflow-y: hidden; padding: 2px 0 6px; }
.dvvdoc .sealc i { -webkit-mask-image: url(/img/dvv/seal-eagle.png); mask-image: url(/img/dvv/seal-eagle.png); }
.dvvterm { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--amber, #b7791f); background: var(--canvas); font-size: 13.5px; }
.dvvacts { margin-top: 0; }
.dvvwrap > .dvvdoc { min-width: 343px; }
@media (max-width: 640px) { .dvvcard > .bd { padding: 10px 6px; } .dvvterm { margin: 0 4px 10px; } }

/* ───────── Бланк ДВВ у «Міжвідомчих запитах» — аркуші A4, як на порталі ДВВ (App.dvvPaginate) ───────── */
/* Обрізка — contain: paint, не overflow (Safari на iPhone інакше тримає висоту аркуша й обрізає текст) */
.sheet.dvvdoc { overflow: visible; contain: paint; }
.pages { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.sheet.dvvdoc.tight .gap { min-height: 12px; }
.sheet.dvvdoc.tight p { margin-bottom: 5px; }
.sheet.dvvdoc.tight .foot { margin-top: 12px; }
.sheet.dvvdoc.tight .arms { margin-bottom: 12px; }
.sheet.dvvdoc.tight .kind { margin-top: 14px; }
.sheet.dvvdoc.tight .ttl { margin: 8px 24px 10px; }
.sheet.dvvdoc.tight p.dir { margin: 9px 0; }
.sheet.dvvdoc.ogp.tight p { margin-top: 12px; }
.sheet.dvvdoc.ogp.tight p + p, .sheet.dvvdoc.ogp.tight p.dash { margin-top: 8px; }
.sheet.dvvdoc.ogp.tight p:not(.dash) + p.dash { margin-top: 20px; }
.sheet.dvvdoc.ogp.tight .oforce { margin-top: 24px; }
.sheet.dvvdoc.ogp.tight .gap { min-height: 14px; }
.sheet.dvvdoc p.cut { text-align-last: justify; }
.sheet.dvvdoc p.cont { text-indent: 0; }
.sheet.dvvdoc.ogp p.dash.cont { display: block; margin-left: 66px; }
.sheet.dvvdoc.ogp p.dash.cont + p.dash, .sheet.dvvdoc p.cont { margin-top: 0; }
.sheet.dvvdoc .foot .pno { white-space: nowrap; flex: none; }
.sheet.dvvdoc .foot.pnoonly { justify-content: center; text-align: center; }
@media (max-width: 640px) { .sheet.dvvdoc { aspect-ratio: auto; } }
@media print { .pages { gap: 0; } .sheet.page { break-after: page; } }
