/* ZAVERIM site, on top of design system 11 (tokens.css + components.css).
   Rules: white screen, one action per step, large readable text.
   No tinted pills, no dots before labels, no coloured words, no dashes in copy.
   Colour is used only for the action button. */

html, body { overflow-x: clip; }
body, .PRGRM_root { background: var(--PRGRM_color-white); color: var(--PRGRM_color-ink); }
.PRGRM_root [hidden] { display: none !important; }

/* ---- shared ---- */
.z-wrap { width: min(100% - 48px, 1120px); margin-inline: auto; padding-bottom: 96px; }
/* Narrow columns (login, documents) sit inside .z-wrap, so the footer under them keeps the full site width. */
.z-narrow { width: min(100%, 640px); margin-inline: auto; }
.z-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.z-logo { display: block; line-height: 0; }
.z-logo img { display: block; height: 30px; width: auto; }
.z-user { display: flex; align-items: center; gap: 16px; font-size: 17px; color: var(--PRGRM_color-body); }
/* The address opens a small account window: on hover, on click, from the keyboard. */
.z-me { position: relative; }
.z-me-btn { padding: 8px 0; font: inherit; color: var(--PRGRM_color-body); background: none; border: 0; cursor: pointer; }
.z-me-btn:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 4px; }
.z-me-pop { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 30; width: max-content; min-width: 280px; max-width: min(460px, 90vw); padding: 20px; border-radius: 16px; background: var(--PRGRM_color-white); box-shadow: 0 16px 40px rgba(16,29,27,.18); }
.z-me:hover .z-me-pop, .z-me.open .z-me-pop { display: grid; gap: 16px; justify-items: center; text-align: center; }
.PRGRM_root .z-me-addr { margin: 0; font-size: 17px; font-weight: 600; color: var(--PRGRM_color-ink); overflow-wrap: anywhere; }

.PRGRM_root .z-h1 { margin: 32px 0 16px; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.PRGRM_root .z-h2 { margin: 56px 0 16px; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 28px; line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.PRGRM_root .z-text { margin: 0 0 16px; max-width: 760px; font-size: 18px; line-height: 1.5; color: var(--PRGRM_color-body); }
.PRGRM_root .z-error { margin: 0 0 16px; font-size: 18px; font-weight: 600; color: #b3261e; }
.PRGRM_root .z-ok { margin: 16px 0; font-size: 18px; font-weight: 600; color: var(--PRGRM_color-ink); }
.z-mono { font-family: ui-monospace, Consolas, monospace; font-size: 15px; word-break: break-all; }
.z-break { word-break: break-word; overflow-wrap: anywhere; }
.z-center { text-align: center; }

.z-btn { min-height: 56px; padding: 0 28px; font-size: 18px; }
.z-btn-small { min-height: 44px; padding: 0 16px; font-size: 16px; white-space: nowrap; }
.PRGRM_root .z-btn-new, .z-btn-new { min-height: 52px; padding: 0 24px; font-size: 18px; background: var(--PRGRM_color-white); color: var(--PRGRM_color-ink); border: 2px solid var(--PRGRM_color-green-dark); box-shadow: none; }
.z-btn-new:hover { background: var(--PRGRM_color-green-soft); }
.z-btn:focus-visible, .z-btn-small:focus-visible, .z-btn-new:focus-visible, .z-input:focus-visible, .z-area:focus-visible, .z-check-input:focus-visible, .z-link:focus-visible {
  outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 4px;
}
.z-btn:disabled, .z-btn-small:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.z-btn:active, .z-btn-small:active, .z-btn-new:active { transform: translateY(0); }
.PRGRM_root .z-link, .z-link { color: var(--PRGRM_color-ink); text-decoration: underline; text-underline-offset: 4px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.z-input, .z-area, .z-check-input {
  min-height: 56px; padding: 0 20px; box-sizing: border-box; width: 100%;
  border: 1px solid #b9c0c9; border-radius: 16px;
  background: var(--PRGRM_color-white); color: var(--PRGRM_color-ink);
  font: 400 18px var(--PRGRM_font-body);
}
.z-area { padding: 14px 20px; min-height: 120px; line-height: 1.45; resize: vertical; }
.z-input::placeholder, .z-area::placeholder, .z-check-input::placeholder { color: var(--PRGRM_color-muted); }
.z-form { display: flex; gap: 12px; align-items: center; margin: 0 0 16px; }
.z-form .z-input { flex: 1; min-width: 0; }
.z-field { display: block; margin: 0 0 16px; }
.z-field > span { display: block; margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.z-field > small { display: block; margin: 6px 0 0; font-size: 15px; color: var(--PRGRM_color-body); }
.z-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* ---- cabinet table ---- */
.z-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 32px 0 16px; }
.PRGRM_root .z-head .z-h1 { margin: 0; }
.z-table { border-collapse: collapse; width: 100%; font-size: 18px; margin: 0 0 16px; }
.z-table th, .z-table td { text-align: left; vertical-align: middle; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--PRGRM_color-line); }
.z-table th { font-weight: 600; font-size: 16px; color: var(--PRGRM_color-body); }
.z-table th:last-child, .z-table td:last-child { padding-right: 0; }
.z-table .z-sub { display: block; font-size: 16px; color: var(--PRGRM_color-body); }
.z-actions { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
.z-actions .z-btn-small, .z-table .z-btn-small { padding: 0 12px; font-size: 15px; }
.z-table th, .z-table td { padding-right: 12px; }
.z-table td:first-child { white-space: nowrap; }

/* ---- date filter and calendar ---- */
.z-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; font-size: 18px; color: var(--PRGRM_color-body); }
.z-date { min-height: 48px; min-width: 150px; padding: 0 18px; border: 1px solid #b9c0c9; border-radius: 16px; background: var(--PRGRM_color-white); color: var(--PRGRM_color-body); font: 400 18px var(--PRGRM_font-body); text-align: left; cursor: pointer; }
.z-date:hover, .z-date[aria-expanded="true"] { border-color: var(--PRGRM_color-ink); }
.z-date.z-date-set { color: var(--PRGRM_color-ink); font-weight: 600; }
.z-date:focus-visible, .z-cal button:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 3px; }
.z-cal { position: absolute; z-index: 50; width: 328px; padding: 16px; background: var(--PRGRM_color-white); border: 1px solid #b9c0c9; border-radius: 20px; box-shadow: 0 20px 48px rgba(16, 29, 27, .18); font-family: var(--PRGRM_font-body); color: var(--PRGRM_color-ink); }
.z-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.z-cal-title { font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 20px; }
.z-cal-nav { width: 40px; height: 40px; border: 1px solid transparent; border-radius: 12px; background: none; font-size: 26px; line-height: 1; color: var(--PRGRM_color-ink); cursor: pointer; }
.z-cal-nav:hover { border-color: #b9c0c9; }
.z-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.z-cal-dow { text-align: center; font-size: 14px; color: var(--PRGRM_color-body); padding: 4px 0 8px; }
.z-cal-day { height: 38px; border: 1px solid transparent; border-radius: 12px; background: none; font: 400 17px var(--PRGRM_font-body); color: var(--PRGRM_color-ink); cursor: pointer; }
.z-cal-day:hover { border-color: #b9c0c9; }
.z-cal-day.z-cal-today { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.z-cal-day.z-cal-on { background: var(--PRGRM_color-ink); color: var(--PRGRM_color-white); }
.z-cal-foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--PRGRM_color-line); font-size: 16px; }
.PRGRM_root .z-open, .z-open { font-weight: 600; }

/* ---- protocol page: the document with a panel of its sheets ---- */
.z-doc-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.z-doc-top { flex: none; display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--PRGRM_color-line); }
.PRGRM_root .z-doc-title { margin: 0; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 24px; letter-spacing: -.02em; }
.z-doc-grow { flex: 1; }
.z-doc { flex: 1; min-height: 0; display: flex; }
.z-doc-side { width: 280px; flex: none; overflow-y: auto; padding: 16px; border-right: 1px solid var(--PRGRM_color-line); }
.z-doc-main { flex: 1; min-width: 0; background: #e9ebee; }
.z-doc-main iframe { width: 100%; height: 100%; border: 0; display: block; }
.z-doc-item { display: block; width: 100%; text-align: left; padding: 14px 16px; margin: 0 0 16px; border: 1px solid #b9c0c9; border-radius: 12px; background: var(--PRGRM_color-white); cursor: pointer; font-family: var(--PRGRM_font-body); color: var(--PRGRM_color-ink); }
.z-doc-item:hover, .z-doc-paper:hover { border-color: var(--PRGRM_color-ink); }
.z-doc-name { display: block; font-size: 18px; font-weight: 600; }
.z-doc-sub { display: block; font-size: 15px; color: var(--PRGRM_color-body); }
.z-doc-sheet { margin: 0 0 20px; }
.z-doc-paper { display: block; width: 100%; aspect-ratio: 210 / 297; padding: 8px; border: 1px solid #b9c0c9; background: var(--PRGRM_color-white); cursor: pointer; }
.z-doc-paper img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center top; }
.z-doc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 17px; }
.z-doc-item:focus-visible, .z-doc-paper:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 3px; }

/* ---- landing: everything on one screen ---- */
.z-land { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.z-check { display: flex; gap: 8px; }
.z-check-input { width: 220px; min-height: 48px; font-size: 17px; border-radius: var(--PRGRM_radius-pill); }
/* The landing is one screen also on a laptop, where the browser leaves 600-700px of height:
   the title, gaps and the lead follow the window height as well as its width. */
.z-hero { align-self: center; padding: clamp(8px, 1.5vh, 24px) 0 clamp(16px, 3vh, 48px); max-width: 1100px; }
.PRGRM_root .z-title { margin: 0; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: clamp(40px, min(6.4vw, 8vh), 92px); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.PRGRM_root .z-lead { margin: clamp(16px, 4vh, 32px) 0 0; max-width: 900px; font-family: var(--PRGRM_font-heading); font-weight: 300; font-size: clamp(20px, min(1.8vw, 3vh), 26px); line-height: 1.35; color: var(--PRGRM_color-ink); }
/* The key fact sits above the button in the lead's font. The button green is too light for text (1.8:1 on white),
   so the text takes the dark green of the design system (3.7:1 at this size). */
.PRGRM_root .z-lead-note { margin-top: clamp(12px, 2vh, 20px); font-weight: 400; color: var(--PRGRM_color-green-dark); }
.z-lead-key { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.z-cta { margin-top: clamp(18px, 3vh, 40px); min-height: 64px; padding: 0 40px; font-size: 20px; }
/* Zoom of the document on the protocol page, as in a PDF reader. */
.z-fit { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #b9c0c9; border-radius: 16px; }
.z-fit button { padding: 8px 16px; border: 0; border-radius: 12px; font: inherit; font-size: 16px; color: var(--PRGRM_color-body); background: none; white-space: nowrap; cursor: pointer; }
.z-fit button[aria-pressed="true"] { color: var(--PRGRM_color-white); background: var(--PRGRM_color-ink); }
.z-fit button:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 2px; }

/* The create window (/app/create/): pages count, then the upload with progress. */
.PRGRM_root .z-create-pages { font-size: 24px; font-weight: 600; color: var(--PRGRM_color-ink); }
.z-dialog:focus { outline: none; }
.z-dialog-foot .z-left { margin-right: auto; } /* "back" at the left edge, the main action at the right */
@media (max-width: 520px) { .z-dialog-narrow .z-dialog-foot .z-btn { flex: 1 1 100%; } } /* one under the other, full width */
.z-create-work { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 8px 0; }
.PRGRM_root .z-create-work .z-text { margin: 0; }
.z-track { width: 100%; height: 8px; border-radius: 999px; background: var(--PRGRM_color-green-soft); overflow: hidden; }
.z-track > div { width: 0; height: 100%; border-radius: 999px; background: var(--PRGRM_color-green); transition: width .3s; }

/* Long operations: the page is covered, a green spinner turns. */
/* margin: auto centres the window: the design system's root class resets margins to 0. */
.z-busy { margin: auto; outline: none; min-width: 300px; padding: 36px 44px; border: 0; border-radius: 20px; text-align: center; color: var(--PRGRM_color-ink); background: var(--PRGRM_color-white); box-shadow: 0 28px 72px rgba(16,29,27,.25); }
.z-busy[open] { display: grid; justify-items: center; gap: 18px; }
/* The window takes focus when it opens; it has nothing to press, so no focus ring. */
#zv-busy:focus, #zv-busy:focus-visible { outline: none; }
.z-busy::backdrop { background: rgba(25,27,30,.45); cursor: progress; }
.PRGRM_root .z-busy-text { margin: 0; max-width: 420px; font-size: 18px; line-height: 1.45; }
.z-spin { width: 52px; height: 52px; border: 5px solid var(--PRGRM_color-green-soft); border-top-color: var(--PRGRM_color-green); border-radius: 50%; animation: z-spin .8s linear infinite; }
@keyframes z-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .z-spin { animation-duration: 2.4s; } }

/* Footer on every public page: documents, contact, requisites of the owner. */
.z-foot { position: relative; margin-top: 48px; padding: 20px 0 24px; border-top: 2px solid var(--PRGRM_color-green); }
.z-land .z-foot { margin-top: 0; }
@media (max-height: 640px) {
  .z-land .z-cta { min-height: 54px; }
  .z-land .z-foot { padding: 8px 0; }
}
@media (max-height: 720px) {
  .z-land .z-top { padding: 12px 0; }
  .z-land .z-foot { padding: 12px 0 12px; }
  .PRGRM_root .z-land .z-foot p { margin-bottom: 2px; }
  .z-land .z-foot-links { margin-bottom: 2px; }
}
.PRGRM_root .z-foot p { margin: 0 0 4px; font-size: 16px; line-height: 1.5; color: var(--PRGRM_color-body); }
.z-foot-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 6px; font-size: 16px; line-height: 1.5; }
.PRGRM_root .z-foot-links a { color: var(--PRGRM_color-ink); text-decoration: underline; text-underline-offset: 4px; }
.PRGRM_root .z-foot-links a[aria-current="page"] { text-decoration: none; }
.PRGRM_root .z-foot p a { color: var(--PRGRM_color-ink); text-decoration: underline; text-underline-offset: 4px; }
.z-foot p a:focus-visible, .z-foot-links a:focus-visible, .z-legal a:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 3px; }

/* Offer and privacy policy */
.z-legal-wrap { width: min(100%, 860px); margin-inline: auto; }
.PRGRM_root .z-legal .z-h1 { font-size: clamp(28px, 3.4vw, 44px); overflow-wrap: break-word; }
.PRGRM_root .z-legal .z-h2 { margin: 40px 0 12px; font-size: 26px; }
.PRGRM_root .z-legal .z-text { max-width: none; }
.PRGRM_root .z-legal a { color: var(--PRGRM_color-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.z-legal-req .z-text { margin: 0 0 4px; }
.z-legal-table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 18px; line-height: 1.45; color: var(--PRGRM_color-body); }
.z-legal-table th { padding: 0 24px 10px 0; border-bottom: 1px solid var(--PRGRM_color-line); font-size: 17px; font-weight: 600; text-align: left; color: var(--PRGRM_color-ink); }
.z-legal-table td { padding: 12px 24px 12px 0; border-bottom: 1px solid var(--PRGRM_color-line); vertical-align: top; }
.z-legal-table td:first-child { width: 50%; color: var(--PRGRM_color-ink); }

/* ---- wizard ---- */
.z-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.z-steps > li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; padding: 24px 0; border-bottom: 1px solid var(--PRGRM_color-line); }
.z-steps > li::before { content: counter(step); font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 34px; line-height: 1; color: var(--PRGRM_color-ink); }
.PRGRM_root .z-steps h3 { margin: 0 0 8px; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.PRGRM_root .z-steps p { margin: 0 0 12px; font-size: 18px; line-height: 1.5; color: var(--PRGRM_color-body); max-width: 760px; }
.z-steps > li.z-locked { opacity: .4; }
.z-steps ol { margin: 0 0 12px; padding-left: 24px; font-size: 17px; line-height: 1.6; color: var(--PRGRM_color-body); }
/* Manual install: each line is one action, its button right under it. */
.z-steps .z-install { max-width: 760px; }
.z-install > li { margin: 0 0 14px; }
.z-install .z-nowrap { white-space: nowrap; } /* a folder name is never split at its hyphen */
.z-install-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 6px; }
.z-addr { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--PRGRM_color-line); border-radius: 10px; font: 500 18px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--PRGRM_color-ink); user-select: all; }

/* ---- dialogs ---- */
.z-dialog { margin: auto; padding: 0; border: 0; border-radius: 24px; overflow: hidden; width: min(1000px, calc(100% - 48px)); max-height: calc(100vh - 48px); box-shadow: 0 28px 72px rgba(16,29,27,.25); color: var(--PRGRM_color-ink); background: var(--PRGRM_color-white); }
.z-dialog[open] { display: flex; flex-direction: column; }
.z-dialog.z-dialog-wide { width: min(1400px, calc(100% - 48px)); }
.z-dialog.z-dialog-narrow { width: min(600px, calc(100% - 48px)); }
.z-dialog::backdrop { background: rgba(25,27,30,.55); }
.z-dialog-head { flex: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 28px 32px 12px; }
.PRGRM_root .z-dialog h2, .z-dialog h2 { margin: 0; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 30px; letter-spacing: -.03em; }
.PRGRM_root .z-dialog-sub, .z-dialog-sub { margin: 6px 0 0; font-size: 17px; color: var(--PRGRM_color-body); }
.z-dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 24px 16px 32px; margin-right: 8px; }
.z-dialog-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; padding: 16px 32px 24px; border-top: 1px solid var(--PRGRM_color-line); }
.PRGRM_root .z-dialog-foot .z-error { margin: 0 auto 0 0; flex: 1 1 320px; }
.z-dirty { margin-right: auto; font-size: 17px; color: var(--PRGRM_color-body); }
.z-x { flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #b9c0c9; border-radius: 50%; background: var(--PRGRM_color-white); color: var(--PRGRM_color-ink); font: 400 28px/1 var(--PRGRM_font-body); cursor: pointer; }
.z-x:hover { border-color: var(--PRGRM_color-ink); }
.z-x:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 3px; }

/* ---- claim form: topic, parties ---- */
.PRGRM_root .z-h3 { display: block; margin: 24px 0 12px; padding: 0; font-family: var(--PRGRM_font-heading); font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; color: var(--PRGRM_color-ink); }
.z-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.z-topics label { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px; border: 1px solid #b9c0c9; border-radius: 16px; font-size: 17px; line-height: 1.25; text-align: center; white-space: nowrap; cursor: pointer; }
.PRGRM_root .z-topic-hint { margin: 12px 0 28px; }
.z-topics label:hover { border-color: var(--PRGRM_color-ink); }
.z-seg { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 16px; border: 1px solid #b9c0c9; border-radius: 16px; }
.z-seg label { padding: 10px 18px; border-radius: 12px; font-size: 17px; color: var(--PRGRM_color-body); cursor: pointer; }
.z-seg input, .z-topics input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.z-seg input:checked + label, .z-topics input:checked + label { background: var(--PRGRM_color-ink); border-color: var(--PRGRM_color-ink); color: var(--PRGRM_color-white); }
.z-seg input:disabled + label { opacity: .35; cursor: not-allowed; }
.z-seg input:focus-visible + label, .z-topics input:focus-visible + label { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 2px; }
.z-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-bottom: 8px; }
.z-party { min-width: 0; margin: 0; padding: 0; border: 0; }
.z-days-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: center; margin: 0 0 16px; }
.z-days-row .z-field { margin: 0; }
.PRGRM_root .z-rule { margin: 0; color: var(--PRGRM_color-ink); font-weight: 600; }
/* The claim form uses the whole width of its window: no short text column with empty space beside it. */
.PRGRM_root #claim-form .z-text { max-width: none; }

/* ---- scrollbars: rounded green thumb, no arrows, no track ---- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--PRGRM_color-green); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--PRGRM_color-green-dark); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: var(--PRGRM_color-green) transparent; } }

/* A4 sheets: every tile has the proportions of the paper page. */
.z-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.z-sheet { margin: 0; }
.z-sheet a, .z-sheet .z-paper { display: block; aspect-ratio: 210 / 297; background: #fff; border: 1px solid #b9c0c9; padding: 6%; box-sizing: border-box; }
.z-sheet img { width: 100%; height: 100%; object-fit: contain; object-position: top center; display: block; }
.z-sheet figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 16px; color: var(--PRGRM_color-body); }

/* ---- verification page ---- */
.z-facts { margin: 0 0 24px; border-top: 1px solid var(--PRGRM_color-line); }
.z-facts div { display: grid; grid-template-columns: 300px 1fr; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--PRGRM_color-line); font-size: 18px; }
.z-facts dt { color: var(--PRGRM_color-body); }
.z-facts dd { margin: 0; }
.z-shots { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--PRGRM_color-line); }
.z-shots li { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--PRGRM_color-line); }
.z-shots .z-thumb { display: block; width: 112px; height: 148px; border: 1px solid #b9c0c9; background: #fff; overflow: hidden; }
.z-shots .z-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.z-shots .z-name { font-size: 18px; font-weight: 600; }
.z-shots p { margin: 0 0 6px; font-size: 17px; line-height: 1.45; }
.z-shots .z-label { color: var(--PRGRM_color-body); }
.z-result { margin: 16px 0 0; padding: 20px; border: 1px solid #b9c0c9; border-radius: 16px; max-width: 760px; }
.z-result strong { display: block; font-size: 22px; font-family: var(--PRGRM_font-heading); font-weight: 500; margin: 0 0 6px; }
.z-result span { display: block; font-size: 17px; color: var(--PRGRM_color-body); margin: 0 0 12px; }
.z-result code { display: block; }

/* ---- Owner's rules of 15.11.2026 -----------------------------------------------------------------------
   Buttons: an icon before the text, no lift on hover; empty buttons have a green outline and fill with green
   on hover. The footer stays at the bottom of the window and is divided off by a green line. */
.PRGRM_button { justify-content: center; gap: 10px; }
.PRGRM_button:hover, .PRGRM_button:active { transform: none; }
.PRGRM_button--outline { border: 2px solid var(--PRGRM_color-green); background: transparent; }
.PRGRM_button--outline:hover { border-color: var(--PRGRM_color-green); background: var(--PRGRM_color-green); }
.PRGRM_root .z-btn-new { border-color: var(--PRGRM_color-green); }
.PRGRM_root .z-btn-new:hover { background: var(--PRGRM_color-green); }
.z-x { border: 2px solid var(--PRGRM_color-green); }
.z-x:hover { border-color: var(--PRGRM_color-green); background: var(--PRGRM_color-green); }
.z-fit { border: 2px solid var(--PRGRM_color-green); }
.z-fit button { display: inline-flex; align-items: center; gap: 8px; }
.z-fit button:hover:not([aria-pressed="true"]) { background: var(--PRGRM_color-green); color: var(--PRGRM_color-ink); }
.z-ico { flex: none; width: 20px; height: 20px; }
.z-link-ico { display: inline-flex; align-items: center; gap: 6px; }
.z-link-ico .z-ico { width: 18px; height: 18px; }
.z-btn-small .z-ico, .z-fit .z-ico { width: 18px; height: 18px; }
/* "Новый протокол": a bigger plus that turns into a cross while the steps are open. */
.z-btn-new .z-plus { width: 28px; height: 28px; transition: transform .25s ease; }
.z-btn-new[aria-expanded="true"] .z-plus { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .z-btn-new .z-plus { transition: none; } }

/* Round icon buttons: sign in (top right of public pages) and back (protocol page). */
.z-round { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border: 2px solid var(--PRGRM_color-green); border-radius: 50%; color: var(--PRGRM_color-ink); background: transparent; cursor: pointer; }
.z-round:hover { background: var(--PRGRM_color-green); }
.z-round:focus-visible { outline: 3px solid var(--PRGRM_color-green-dark); outline-offset: 3px; }
.z-round .z-ico { width: 22px; height: 22px; }

/* "Как создать новый протокол" with a cross on the right that folds the steps. */
.z-steps-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 56px 0 16px; }
.PRGRM_root .z-steps-head .z-h2 { margin: 0; }

/* The cabinet table has long button labels: a wider column there. */
.z-wrap.z-wide { width: min(100% - 48px, 1280px); }

/* Footer: documents, protocol check, extension, Telegram, requisites; at the bottom of the window. */
.z-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 10px; }
.z-foot-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.z-foot .z-check-input { width: 186px; min-height: 44px; font-size: 16px; } /* «Номер протокола» fits whole */
.z-foot .z-foot-links { gap: 4px 20px; }
.z-foot .z-foot-links { margin: 0; }
body:has(> main.z-wrap > .z-foot) { min-height: 100dvh; display: flex; flex-direction: column; }
main.z-wrap:has(> .z-foot) { flex: 1 0 auto; display: flex; flex-direction: column; padding-bottom: 0; }
main.z-wrap > .z-foot { margin-top: auto; padding-top: 68px; border-top: 0; }
main.z-wrap > .z-foot::before { content: ""; position: absolute; top: 48px; left: 0; right: 0; height: 2px; background: var(--PRGRM_color-green); }

/* Footer as two columns. Left: the links and two lines of requisites. Right, pressed to the edge:
   the protocol check level with the links, the extension and Telegram level with the last line.
   The empty fourth row takes spare height when the buttons are taller than the text. */
.z-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; column-gap: 32px; align-items: start; }
.z-foot-row { display: contents; }
.z-foot .z-foot-links { grid-column: 1; grid-row: 1; margin: 0 0 4px; }
.z-foot .z-foot-acts { grid-column: 2; grid-row: 1 / span 4; align-self: stretch; display: grid; grid-template-columns: 1fr auto; align-content: space-between; gap: 8px; }
.z-foot .z-foot-acts .z-check { grid-column: 1 / -1; justify-self: end; }
.z-foot .z-foot-acts > a { justify-self: end; }
.z-foot > p { grid-column: 1; }
/* In a narrow window the buttons go under the links in one row. */
@media (max-width: 900px) {
  .z-foot { grid-template-columns: 1fr; grid-template-rows: none; }
  .z-foot .z-foot-acts { grid-column: 1; grid-row: auto; display: flex; flex-wrap: wrap; align-self: auto; margin: 12px 0 8px; }
}

@media (max-width: 760px) {
  .z-wrap { width: calc(100% - 32px); padding-bottom: 64px; }
  .z-top { flex-wrap: wrap; padding: 20px 0 0; }
  .z-logo img { height: 26px; } /* the logo and «Войти» stay on one line on a phone */
  .z-foot .z-check-input { width: 100%; }
  .z-check { flex: 1 0 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .z-check-input { width: 100%; min-width: 0; }
  .z-cta { width: 100%; padding: 0 16px; }
  .z-form { flex-direction: column; align-items: stretch; }
  .z-form .z-btn, .z-wide-mobile { width: 100%; }
  .z-facts div { grid-template-columns: 1fr; padding: 12px 0; }
  .z-facts dt { font-size: 16px; }
  .z-shots li { grid-template-columns: 88px 1fr; gap: 14px; }
  .z-shots .z-thumb { width: 88px; height: 116px; }
  .z-shots .z-name { font-size: 15px; }
  .z-shots p { font-size: 16px; }
  .z-mono { font-size: 14px; }
  .z-sheets { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .PRGRM_root .z-h2 { margin-top: 40px; font-size: 24px; }
  .z-cols { grid-template-columns: 1fr; }
  .PRGRM_root .z-legal .z-h2 { font-size: 22px; }
  .z-legal-table thead { display: none; }
  .z-legal-table, .z-legal-table tbody, .z-legal-table tr, .z-legal-table td { display: block; width: auto; }
  .z-legal-table tr { padding: 12px 0; border-bottom: 1px solid var(--PRGRM_color-line); }
  .z-legal-table td { padding: 0; border: 0; }
  .z-legal-table td:first-child { width: auto; margin-bottom: 4px; font-weight: 600; }
}
@media (max-width: 374px) {
  .z-top { gap: 10px; }
  .z-logo img { height: 20px; }
  .z-signin { padding: 0 12px; }
  .z-foot .z-check { grid-template-columns: 1fr; } /* the field gets the whole width, the button goes under it */
}
