/* zakonczenie (v9): the end of the page. A full-width dark section with the closing headline, the install line with Copy,
   the receptionOS signet cut by the edge, and the footer on the same dark ground.
   Colours and type come from the tokens of site.css (SHELL block: --shell, --cmd, --tx, --tx2, --dim, --line, --track).
   Every rule lives under .zk; the only values of its own are the --zk-* below. */
.zk{
  --zk-bg:var(--shell);          /* the ground of the section and the footer */
  --zk-grey:#7f7972;             /* second line of the headline                     4.9:1 on --shell */
  --zk-mark:#22201d;             /* the signet: one step above the ground, never a second voice */
  --zk-h:500 clamp(2.5rem,7.5vw,6.75rem)/.97 var(--sans);
  --zk-h-ls:-.042em;
  --zk-code:400 .8125rem/1.7 var(--mono); /* the install line: one size at every width, so the whole line fits beside the signet at 1440 */
  margin-top:var(--sec);background:var(--zk-bg);color:var(--tx2);font:var(--body)
}
.zk-top{position:relative;overflow:hidden;isolation:isolate}
.zk-in{position:relative;z-index:1;width:min(var(--wrap),100% - 2*var(--gut));margin-inline:auto;padding:clamp(84px,10.4vw,150px) 0 clamp(76px,8.4vw,120px)}

/* the signet: decoration, behind the text, cut by the right and bottom edge of .zk-top */
/* Wide windows: the flat side of the signet stands 230px inside the right edge of the column; the bow and the foot run off the section. */
.zk-mark{position:absolute;z-index:0;top:6%;left:calc(50% + min(var(--wrap),100% - 2*var(--gut))/2 - 230px);height:120%;width:auto;fill:var(--zk-mark);pointer-events:none}

/* headline: two lines, the second one grey */
.zk-h{margin:0;max-width:none;font:var(--zk-h);letter-spacing:var(--zk-h-ls);color:var(--tx);text-wrap:balance}
.zk-h span{display:block}
.zk-h .zk-l2{color:var(--zk-grey)}

/* install line. It never wraps: what does not fit scrolls inside the field. */
.zk-cmd{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 14px;width:fit-content;max-width:100%;margin-top:clamp(36px,4.4vw,64px);padding:10px 10px 10px 22px;border-radius:var(--r-field);background:var(--cmd);box-shadow:inset 0 0 0 1px var(--cmd-line)}
.zk-pre{min-width:0;margin:0;padding:8px 0;overflow-x:auto;overscroll-behavior-x:contain;white-space:pre;font:var(--zk-code);color:var(--tx);scrollbar-width:none;border-radius:4px}
.zk-pre::-webkit-scrollbar{display:none}
.zk-pre code{font:inherit;color:inherit}
.zk-pr{color:var(--dim);-webkit-user-select:none;user-select:none}
/* a soft edge on the side that still has text (set by zakonczenie.js; without script the line simply scrolls) */
.zk-pre[data-zk-more="right"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}
.zk-pre[data-zk-more="left"]{-webkit-mask-image:linear-gradient(270deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(270deg,#000 calc(100% - 40px),transparent)}
.zk-pre[data-zk-more="both"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent)}
.zk-copy{display:inline-flex;align-items:center;justify-content:center;min-width:96px;height:40px;padding:0 20px;border:0;border-radius:999px;background:var(--tx);color:var(--screen);font:500 .9375rem/1 var(--sans);white-space:nowrap;cursor:pointer;transition:background var(--t-ui) ease-out}
.zk-copy:hover{background:#fff}
.zk-copy[hidden]{display:none}   /* the button ships hidden and zakonczenie.js reveals it: no dead button without script */
.zk-pre ::selection,.zk-pre::selection{background:#f2ece5;color:#141312}   /* --tx and --screen as literals: a selection does not always see the tokens */

/* what happens next, and the two ways out */
.zk-after{margin:22px 0 0;font:var(--body);color:var(--tx2)}
.zk-links{display:flex;flex-wrap:wrap;gap:10px 28px;margin:18px 0 0;padding:0;list-style:none}
.zk-links a{position:relative;font:500 .9375rem/1.4 var(--sans);color:var(--tx);text-decoration:underline;text-decoration-color:var(--track);text-decoration-thickness:1px;text-underline-offset:.3em;transition:text-decoration-color var(--t-ui) ease-out}
.zk-links a:hover{text-decoration-color:currentColor}

/* footer of v8 on the dark ground */
.zk-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:14px 40px;width:min(var(--wrap),100% - 2*var(--gut));margin-inline:auto;padding:22px 0 34px;border-top:1px solid var(--line);font:var(--small);color:var(--dim)}
.zk-foot p{margin:0}
.zk-legal{display:flex;align-items:flex-start;gap:10px;max-width:520px}
.zk-legal svg{flex:none;width:8px;height:16px;margin-top:2px;fill:var(--tx2)}
.zk-nav{display:flex;flex-wrap:wrap;gap:8px 22px;margin:0;padding:0;list-style:none}
.zk-foot a{position:relative;color:var(--tx2);text-decoration:none;transition:color var(--t-ui) ease-out}
.zk-foot a:hover{color:var(--tx)}
.zk-credits{flex-basis:100%;font:400 .8125rem/1.5 var(--sans);color:var(--dim)}
.zk-foot .zk-credits a{color:var(--dim);text-decoration:underline;text-decoration-color:var(--track);text-underline-offset:.2em}
.zk-foot .zk-credits a:hover{color:var(--tx2)}

.zk :focus-visible{outline:2px solid var(--tx);outline-offset:3px;border-radius:4px}
.zk .zk-copy:focus-visible{border-radius:999px}
.zk-sr{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Narrower windows: the install line takes the whole column, so the signet moves under the text, bottom right, one step darker. */
@media (max-width:1359px){
  .zk{--zk-mark:#1c1b18}
  .zk-in{padding-bottom:clamp(120px,17vw,200px)}
  .zk-mark{top:auto;left:auto;right:clamp(-96px,-9vw,-36px);bottom:clamp(-150px,-12vw,-48px);height:clamp(440px,62vw,760px)}
}
@media (max-width:699px){
  .zk{--zk-h:500 clamp(2rem,10.4vw,3.5rem)/1 var(--sans);--zk-h-ls:-.038em}
  .zk-in{padding-bottom:196px}
  .zk-mark{right:-60px;bottom:-70px;height:430px}
  .zk-cmd{grid-template-columns:minmax(0,1fr);width:100%;padding:8px 12px 12px 16px}
  .zk-copy{width:100%}
}
/* touch targets: 44 x 44 on phones and touch screens, the look stays the same */
@media (max-width:699px),(hover:none){
  .zk-copy{height:44px}
  .zk-links a::after,.zk-foot a::after{content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:44px;translate:-50% -50%}
  .zk-nav{row-gap:14px}
  .zk-links{row-gap:16px}
}
@media (prefers-reduced-motion:reduce){
  .zk *{transition:none!important;animation:none!important}
  .zk-pre{scroll-behavior:auto}
}
