/* Vilni Local — canon KIT, extras for the pages the canon itself never drew (С4, 05.11.2026): the page shell (one logo,
   nav, footer), the «state» card (not found / expired / failed / pending / done), form fields, the cabinet's bottom tabs,
   the small sticky ring, the report's two maps and layout helpers. Same language as canon-kit.css (tokens, radii, type),
   same weight rule (":root .cz X" = 0,2,0 + X). Loaded on the result page too (between canon-kit and the page additions)
   but inert there: new cz- classes it never emits, and the few shared-class rules are guarded by :where(:not(.rc)).
   Macros: core/admin/templates/saas/_cz.html.j2. */

/* ── page root + helpers ── */
:root .cz.cz-page{max-width:1200px;margin:0 auto;display:flex;flex-direction:column;gap:56px;padding:24px 0 48px}
:root .cz .cz-sec{display:flex;flex-direction:column;gap:24px;min-width:0}
:root .cz .cz-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
:root .cz .cz-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
:root .cz .cz-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
:root .cz .cz-h1{font:700 clamp(30px,4.4vw,48px)/1.05 var(--f-disp);letter-spacing:-.035em}
:root .cz .cz-h2{font-size:clamp(24px,3vw,30px);line-height:1.12;letter-spacing:-.03em}
:root .cz .cz-h3{font-size:18px;line-height:1.25;letter-spacing:-.015em}
:root .cz .cz-mt8{margin-top:8px}
:root .cz .cz-mt12{margin-top:12px}
:root .cz .cz-mt20{margin-top:20px}
:root .cz .cz-center{text-align:center}
:root .cz .cz-violet{color:var(--violet)}
:root .cz .cz-inline{display:inline;margin:0}
:root .cz .cz-ok{display:flex;gap:8px;align-items:center;font-weight:600;color:var(--good)}
:root .cz .cz-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* link buttons keep their colour on :visited (the result page pins the same in lc-result-canon.css) */
:root .cz:where(:not(.rc)) a.btn,:root .cz:where(:not(.rc)) a.btn:visited{text-decoration:none}
:root .cz:where(:not(.rc)) a.btn-pri,:root .cz:where(:not(.rc)) a.btn-pri:visited{color:var(--paper)}
:root .cz:where(:not(.rc)) a.btn-out,:root .cz:where(:not(.rc)) a.btn-out:visited,:root .cz:where(:not(.rc)) a.ghost{color:var(--violet)}
:root .cz:where(:not(.rc)) :is(.endcta,.mbar,.pmain) a.btn-pri:is(:link,:visited){color:var(--ink)}
:root .cz:where(:not(.rc)) :is(.endcta,.mbar) a.btn-out:is(:link,:visited){color:var(--paper)}
:root .cz:where(:not(.rc)) button.ghost{background:none;border:0;padding:0;font:inherit;cursor:pointer;color:var(--violet);font-weight:500}
:root .cz:where(:not(.rc)) .btn[disabled],:root .cz:where(:not(.rc)) .btn[aria-disabled="true"]{opacity:.5;cursor:not-allowed}
:root .cz .cz-ck{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
:root .cz ul.cz-ck li{display:grid;grid-template-columns:20px minmax(0,1fr);gap:10px;align-items:start;font-size:15px}
:root .cz ul.cz-ck li::before{content:"";width:16px;height:16px;margin-top:3px;border-radius:50%;background:var(--good-wash);
  box-shadow:inset 0 0 0 5px var(--good-wash),inset 0 0 0 16px var(--good)}

/* ── shell: one logo for the funnel, pay and the cabinet (cz.nav / cz.foot) ── */
:root .cz.cz-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-height:64px;
  padding:12px 0;font:400 15px/1.4 var(--f-body);color:var(--ink)}
:root .cz.cz-nav .logo{color:var(--ink);text-decoration:none;min-height:44px;align-items:center}
:root .cz.cz-nav .logo span{color:var(--ink2)}
:root .cz.cz-nav :is(nav,.cz-nav-side){display:flex;align-items:center;gap:10px;flex-wrap:wrap}
:root .cz.cz-nav nav .ghost{color:var(--ink2);font-weight:600;font-size:14px;min-height:44px;display:inline-flex;align-items:center}
:root .cz.cz-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;
  border-top:1px solid var(--peri);padding:20px 0 28px;font:400 13px/1.5 var(--f-body);color:var(--ink2)}
:root .cz.cz-foot a{color:var(--ink2)}

/* ── small kit pieces the macros use (legend swatches, TG tag, the lit stair, the closing band's text column) ── */
:root .cz .lg .cz-lg-t{background:var(--chartreuse)}
:root .cz .lg .cz-lg-m{background:var(--violet-mid)}
:root .cz .lg .cz-lg-l{background:var(--m-far)}
:root .cz .lg .cz-lg-n{border:1.5px dashed var(--m-mute)}
:root .cz .lg .cz-lg-s{background:var(--powder);opacity:.5}
:root .cz .hx.s{fill:var(--powder);opacity:.28;stroke-dasharray:none}
:root .cz .hx.w{fill:var(--m-cell)}
:root .cz [data-cz-map] .hx{cursor:default}
:root .cz [data-cz-map] .hx:hover{transform:none}
:root .cz .tg .cz-tg-tag{margin-left:auto}
:root .cz .stairs li.cz-now{outline:2px solid var(--chartreuse);outline-offset:2px}
:root .cz:where(:not(.rc)) .endcta > .stack{gap:10px}

/* ── state card: one icon, one heading, one meaning, one action (cz.state) ── */
:root .cz .cz-state{max-width:640px;margin:0 auto;align-items:flex-start;padding:32px;gap:16px}
:root .cz .cz-state-i{width:56px;height:56px;border-radius:50%;background:var(--lilac);color:var(--violet);display:grid;place-items:center;flex:none}
:root .cz .cz-state-i svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
:root .cz .cz-state.good .cz-state-i{background:var(--good-wash);color:var(--good)}
:root .cz .cz-state.bad .cz-state-i{background:var(--bad-wash);color:var(--bad)}
:root .cz .cz-state h1{font:700 clamp(26px,3.6vw,36px)/1.1 var(--f-disp);letter-spacing:-.03em}
:root .cz .cz-state .ctas{display:flex;gap:12px;flex-wrap:wrap}

/* ── form fields (check, pay, request, facts) ── */
:root .cz .cz-form{display:flex;flex-direction:column;gap:14px;min-width:0}
:root .cz .cz-field{display:flex;flex-direction:column;gap:6px;min-width:0}
:root .cz .cz-field > label,:root .cz .cz-field > .cz-l{font:600 14px/1.3 var(--f-body);color:var(--ink)}
:root .cz .cz-field .cz-hint{font-size:13px;color:var(--ink2)}
:root .cz :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea){width:100%;min-height:48px;
  border:1.5px solid var(--peri);border-radius:14px;background:var(--paper);color:var(--ink);font:400 16px/1.4 var(--f-body);padding:11px 14px}
:root .cz textarea{min-height:96px;resize:vertical}
:root .cz :is(input,select,textarea):focus-visible{outline:3px solid var(--violet-mid);outline-offset:1px;border-color:var(--violet)}
/* F1: the error rule repeats the field rule's :not chain, else the field rule wins on specificity and an invalid field shows no error */
:root .cz :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea)[aria-invalid="true"]{border-color:var(--bad);background:var(--bad-wash)}
:root .cz .cz-err{color:var(--bad);font:600 14px/1.4 var(--f-body)}
:root .cz .cz-check{display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;align-items:start;font-size:14px;color:var(--ink2);min-height:44px}
:root .cz .cz-check input{width:20px;height:20px;margin:2px 0 0;accent-color:var(--violet)}

/* ── the small ring (sticky progress on «Факти», tiles) — same drawing as .ring, scaled ── */
:root .cz .ring.ring-s{width:56px;height:56px;flex:none}
:root .cz .ring.ring-s .c b{font-size:17px;letter-spacing:-.02em}
:root .cz .ring.ring-s .c span{display:none}
:root .cz .cz-stick{position:sticky;top:8px;z-index:5;display:flex;align-items:center;gap:12px;background:color-mix(in srgb,var(--paper) 94%,transparent);
  border:1px solid var(--peri);border-radius:18px;padding:8px 14px 8px 8px;box-shadow:0 10px 24px -18px rgba(30,27,34,.5)}

/* ── two maps side by side: before / now (report, cabinet) — the same honeycombs as the check (cz.hexmap) ── */
:root .cz .cz-maps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
:root .cz .cz-maps.cz-maps-1{grid-template-columns:minmax(0,1fr)}  /* one map (start only): centred, full width */
:root .cz .cz-maps > figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0}
:root .cz .cz-maps figcaption{display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--m-text);font-size:14px;text-align:center}
:root .cz .cz-maps figcaption b{font:800 30px/1 var(--f-disp);letter-spacing:-.03em;color:var(--paper)}
:root .cz .cz-maps .now figcaption b{color:var(--chartreuse)}
:root .cz .cz-maps .mapsvg{max-width:340px}
:root .cz .dark.cz-dark1{grid-template-columns:minmax(0,1fr)}

/* ── cabinet tabs: chips under the header on a desktop, a bottom tab bar on a phone (owner В5 04.11) ── */
:root .cz .cz-tabs{display:flex;gap:6px;flex-wrap:wrap;list-style:none;margin:0;padding:4px;background:var(--lilac);border-radius:999px;width:max-content;max-width:100%}
:root .cz .cz-tabs a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 16px;border-radius:999px;
  font:600 14px/1.2 var(--f-body);color:var(--ink2);text-decoration:none}
:root .cz .cz-tabs a:hover{color:var(--violet)}
:root .cz .cz-tabs a[aria-current="page"]{background:var(--paper);color:var(--violet);box-shadow:0 1px 3px rgba(24,22,26,.12)}
:root .cz .cz-tabs svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
:root .cz .cz-tabs .cz-badge{min-width:18px;height:18px;border-radius:99px;background:var(--violet);color:var(--paper);font:700 11px/18px var(--f-body);text-align:center;padding:0 5px}
:root .cz .cz-tabs a:focus-visible{outline:3px solid var(--violet-mid);outline-offset:2px}

@media (max-width:860px){
  :root .cz .cz-grid2,:root .cz .cz-grid3{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
  :root .cz.cz-page{gap:40px;padding:12px 0 32px}
  :root .cz .cz-state{padding:22px 18px}
  :root .cz .cz-maps{gap:10px}
  :root .cz .cz-maps figcaption{font-size:13px}
  :root .cz .cz-maps figcaption b{font-size:24px}
  :root .cz.cz-nav{min-height:56px;padding:8px 0}
  :root .cz.cz-nav nav .cz-nav-wide{display:none}
  /* bottom tab bar: four equal cells, ≥ 56 px tall, above the safe area */
  :root .cz .cz-tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;width:auto;max-width:none;border-radius:0;gap:0;
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    padding:6px max(6px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));
    background:color-mix(in srgb,var(--paper) 97%,transparent);border-top:1px solid var(--peri);box-shadow:0 -10px 30px -16px rgba(30,27,34,.35)}
  :root .cz .cz-tabs a{flex-direction:column;justify-content:center;gap:3px;min-height:52px;padding:4px 2px;border-radius:14px;font-size:12px;text-align:center}
  :root .cz .cz-tabs a[aria-current="page"]{background:var(--lilac);box-shadow:none}
  :root .cz .cz-tabs svg{width:22px;height:22px}
  :root .cz .cz-tabs .cz-badge{position:absolute;margin:-24px 0 0 22px}
  :root .cz .cz-tabs li{position:relative;display:flex;flex-direction:column}
  :root .cz .cz-tabs.cz-tabs-1{grid-template-columns:minmax(0,1fr)}
  :root .cz .cz-tabs.cz-tabs-2{grid-template-columns:repeat(2,minmax(0,1fr))}
  :root .cz .cz-tabs.cz-tabs-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  :root .cz .cz-tabs.cz-tabs-5{grid-template-columns:repeat(5,minmax(0,1fr))}
  body:has(.cz-tabs){padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
  html:has(.cz-tabs){scroll-padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
}
@media print{
  :root .cz .cz-tabs,:root .cz .mbar,:root .cz .cz-stick{display:none!important}
  body:has(.cz-tabs){padding-bottom:0}
}
