/* maki (v12, v14): "Gain full control of other machines." One drawing in two layouts (projekt-v14 B):
   wide (a column from 560 px): your Mac on the left, Glauka in the middle (the messenger, with the network as a small pill under
   her name), the Mac Studio, Mac mini and MacBook Air on the right, all on one axis;
   narrow (under 560 px): a tree on the page's left edge, your Mac on top, Glauka, the three computers in a row.
   The computers are our own vector drawings (maki.html, drawn by ../rysuj-maki.mjs from real front dimensions in mm).
   No logo, no borrowed artwork. Glauka is the carved figure of the package (owl-copper.webp).
   Tokens of site.css with a fallback each (--ink --muted --tx --dim --sans --mono --cu --amber --green); prefix mk-.
   Light (paper) is the default; .mk-dark on the figure, or any ancestor with .mk-dark, is the black band.
   Motion (maki.js: one run every 6.8 s, a prompt out in copper and its answer back in blue) never under prefers-reduced-motion.
   No accent bar, no frame in a frame, nothing styled outside .mk. */

.mk{
  --mk-wire:#5882de;            /* the team blue of v11 (widget-zywy.js, Nora)   3.4:1 on paper, 5.7:1 on black */
  --mk-pulse:#2450c8;           /* the travelling pulse                           6.4:1 on paper */
  --mk-a0:#ffffff; --mk-a1:#f0efec; --mk-a2:#dfddd8; --mk-a3:#c5c2bb;   /* aluminium, top to bottom */
  --mk-edge:rgba(37,36,31,.17); /* the rounding of the sides */
  --mk-rim:#8a867d;             /* hairline around a body                         3.3:1 on paper */
  --mk-hi:rgba(255,255,255,.9); /* light on the top edge */
  --mk-port:#33312d; --mk-foot:#6d6961; --mk-led:#fcfcfb; --mk-led-rim:rgba(37,36,31,.35); --mk-scoop:#aaa69e;
  --mk-bezel:#0a0a0a; --mk-w0:#e9e5dc; --mk-w1:#bbb5a8; --mk-bar:rgba(255,255,255,.46);
  --mk-win:rgba(255,255,255,.74); --mk-win-l:#a39d92;
  --mk-tile:var(--shell,#000); --mk-tile-rim:transparent; --mk-glyph:var(--tx,#f2ece5);
  --mk-sh:37,36,31; --mk-sh-o:1;
  --mk-name:var(--ink,#25241f); --mk-sub:var(--muted,#66625a);
  --mk-chip:var(--shell,#000); --mk-chip-tx:var(--tx2,#b9b1a8);
  --mk-cycle:10.5s;             /* three pulses in one cycle: one every 3.5 s */
  position:relative;margin:0;padding:0;container:mk/inline-size}
.mk-dark .mk,.mk.mk-dark{
  --mk-pulse:#c2d3ff;           /* 14.1:1 on black */
  --mk-a0:#fbfaf9; --mk-a1:#dcdad6; --mk-a2:#b4b1aa; --mk-a3:#827f78;
  --mk-edge:rgba(0,0,0,.34);
  --mk-rim:rgba(255,255,255,.16); --mk-lid-o:.62;
  --mk-hi:rgba(255,255,255,.95);
  --mk-port:#1f1e1b; --mk-foot:#3b3935; --mk-led-rim:rgba(0,0,0,.4); --mk-scoop:#6f6c66;
  --mk-bezel:#050505; --mk-w0:#d9d5cb; --mk-w1:#a39d90; --mk-bar:rgba(255,255,255,.4);
  --mk-tile:var(--stage,#1b1a18); --mk-tile-rim:rgba(255,255,255,.16);
  --mk-sh-o:0;
  --mk-name:var(--tx,#f2ece5); --mk-sub:var(--dim,#948e86);
  --mk-chip:var(--stage,#1b1a18);
}

/* ── the drawing ── */
.mk-art{position:relative;max-width:var(--mk-max,960px)}
.mk-art>svg{position:absolute;inset:0;display:block;width:100%;height:100%;overflow:visible}
.mk-art>.mk-defs{width:0;height:0;overflow:hidden}
.mk-art>.mk-n{display:none}
.mk-owl{position:absolute;display:block;width:auto;max-width:none;-webkit-user-select:none;user-select:none;pointer-events:none}


.mk-sh{opacity:var(--mk-sh-o)}
.mk-s0{stop-color:rgb(var(--mk-sh));stop-opacity:.16}
.mk-s1{stop-color:rgb(var(--mk-sh));stop-opacity:.06}
.mk-s2{stop-color:rgb(var(--mk-sh));stop-opacity:0}
.mk-t0{stop-color:rgb(var(--mk-sh));stop-opacity:.3}

/* aluminium */
.mk-a0{stop-color:var(--mk-a0)}.mk-a1{stop-color:var(--mk-a1)}.mk-a2{stop-color:var(--mk-a2)}.mk-a3{stop-color:var(--mk-a3)}
.mk-e0{stop-color:var(--mk-edge);stop-opacity:0}.mk-em{stop-color:var(--mk-edge);stop-opacity:.42}.mk-e1{stop-color:var(--mk-edge)}
.mk-w0{stop-color:var(--mk-w0)}.mk-w1{stop-color:var(--mk-w1)}
.mk-body{stroke:var(--mk-rim);stroke-width:.75;vector-effect:non-scaling-stroke}
.mk-lid{opacity:var(--mk-lid-o,1)}
.mk-hi{fill:none;stroke:var(--mk-hi);stroke-width:1;stroke-linecap:round;vector-effect:non-scaling-stroke}
.mk-port{fill:var(--mk-port)}
.mk-foot{fill:var(--mk-foot)}
.mk-led{fill:var(--mk-led);stroke:var(--mk-led-rim);stroke-width:.5;vector-effect:non-scaling-stroke}
.mk-scoop{fill:var(--mk-scoop)}
/* the screen of the laptop: a desktop, the menu bar you can see through, the notch with the widget's wings and three agents */
.mk-bezel{fill:var(--mk-bezel)}
.mk-bar{fill:var(--mk-bar)}
.mk-isl{fill:#000}
.mk-win{fill:var(--mk-win)}
.mk-win-l{fill:none;stroke:var(--mk-win-l);stroke-width:2.6;stroke-linecap:round}
.mk-dw{fill:var(--cu,#eb670f)}.mk-da{fill:var(--amber,#f3bb52)}.mk-dg{fill:var(--green,#78c985)}

/* ── v14: lines without heads in a neutral hairline (the motion goes both ways, so no arrow); colour only in the pulses ── */
.mk-l{fill:none;stroke:var(--mk-rim);stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
/* a pulse: one short dash that travels its whole path (--mk-len, written by the generator); copper out, blue back */
.mk-p{--mk-dash:26;fill:none;stroke-width:3.4;stroke-linecap:round;vector-effect:non-scaling-stroke;
  stroke-dasharray:calc(var(--mk-dash)*1px) calc(var(--mk-len)*1px + 40px);stroke-dashoffset:calc(var(--mk-dash)*1px + 3px);opacity:0}
.mk-po{stroke:var(--cu,#eb670f)}
.mk-pk{stroke:var(--mk-pulse)}
/* the three dots in the notch of your Mac, one per machine: still, Studio working, mini done, Air needs you */
.mk-m{fill:var(--mk-dm,var(--cu,#eb670f));transform-box:fill-box;transform-origin:50% 50%;transition:fill .22s ease-out}
.mk-m2{--mk-dm:var(--green,#78c985)}.mk-m3{--mk-dm:var(--amber,#f3bb52)}
.mk[data-mk-d1="working"] .mk-m1,.mk[data-mk-d2="working"] .mk-m2,.mk[data-mk-d3="working"] .mk-m3{--mk-dm:var(--cu,#eb670f)}
.mk[data-mk-d1="done"] .mk-m1,.mk[data-mk-d2="done"] .mk-m2,.mk[data-mk-d3="done"] .mk-m3{--mk-dm:var(--green,#78c985)}
.mk[data-mk-d1="ask"] .mk-m1,.mk[data-mk-d2="ask"] .mk-m2,.mk[data-mk-d3="ask"] .mk-m3{--mk-dm:var(--amber,#f3bb52)}

/* ── captions: HTML over the drawing, placed in % so the type keeps its size while the drawing scales ── */
.mk-caps{position:absolute;inset:0;pointer-events:none}
.mk-c{position:absolute;display:flex;flex-direction:column;align-items:center;margin:0;transform:translateX(-50%);white-space:nowrap;text-align:center}
.mk-c b{font:500 .875rem/1.25rem var(--sans,system-ui,sans-serif);letter-spacing:-.005em;color:var(--mk-name)}
.mk-c>span{font:400 .75rem/1.125rem var(--mono,ui-monospace,Menlo,monospace);color:var(--mk-sub)}
.mk-c-d{flex-direction:row;gap:8px}
/* the network: a small pill under Glauka's caption (Glauka is the messenger, the network is the road): a lock and one line */
.mk-c>.mk-net{display:inline-flex;align-items:center;gap:6px;height:20px;padding:0 9px;border-radius:999px;box-shadow:inset 0 0 0 1px var(--mk-edge);
  font:400 11px/1 var(--mono,ui-monospace,Menlo,monospace);color:var(--mk-sub)}
.mk-lock{flex:none;display:block;width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.1;stroke-linejoin:round}
.mk .mk-net-b,.mk[data-mk-net="tailscale"] .mk-net-a{display:none}
.mk[data-mk-net="tailscale"] .mk-net-b{display:inline}
/* the state of the agent on that computer: the widget's dot on the widget's black. The words of one machine lie on one another,
   one shows; the pill is as wide as the machine's widest word, so nothing jumps */
.mk-c>.mk-st{position:relative;display:inline-flex;align-items:center;gap:6px;height:1.25rem;padding:0 9px 0 8px;border-radius:999px;background:var(--mk-chip);
  font:500 .75rem/1 var(--sans,system-ui,sans-serif);letter-spacing:0;color:var(--mk-chip-tx)}
.mk-st i{position:relative;flex:none;width:7px;height:7px;border-radius:50%;background:var(--mk-dot);transition:background-color .2s ease-out}
.mk-st i::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--mk-dot);opacity:0}
.mk-st[data-st="working"]{--mk-dot:var(--cu,#eb670f)}
.mk-st[data-st="ask"]{--mk-dot:var(--amber,#f3bb52)}
.mk-st[data-st="done"]{--mk-dot:var(--green,#78c985)}
.mk-sw{display:grid}
.mk-sw em{grid-area:1/1;font-style:normal;visibility:hidden;opacity:0;transition:opacity .2s ease-out,visibility 0s linear .2s}
.mk-st[data-st="working"] em[data-w="working"],.mk-st[data-st="done"] em[data-w="done"],.mk-st[data-st="ask"] em[data-w="ask"]{visibility:visible;opacity:1;transition-delay:0s}
/* the prompt over your Mac and the answer that comes back: HTML over the drawing, aria-hidden, one line */
.mk-say{position:absolute;margin:0;transform:translateX(max(-50%,-14.7cqw));pointer-events:none}
.mk-say>span{display:none;box-sizing:border-box;max-width:200px;padding:5px 10px;font:400 12px/16px var(--mono,ui-monospace,Menlo,monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mk-say-p>span{border-radius:12px 12px 12px 4px;background:var(--shell,#000);color:var(--tx,#f2ece5)}
.mk-say-a>span{align-items:center;gap:7px;border-radius:12px 12px 4px 12px;box-shadow:inset 0 0 0 1px var(--mk-wire);color:var(--mk-name)}
.mk-say-a i{flex:none;display:block;width:6px;height:6px;border-radius:50%;background:var(--green,#78c985)}
.mk-say-a i[data-r="ask"]{background:var(--amber,#f3bb52)}
.mk-say{opacity:0;translate:0 4px;transition:opacity .2s ease-out,translate .2s ease-out}
.mk[data-mk-to="1"] .mk-say-p>[data-k="1"],.mk[data-mk-to="2"] .mk-say-p>[data-k="2"],.mk[data-mk-to="3"] .mk-say-p>[data-k="3"]{display:block}
.mk[data-mk-to="1"] .mk-say-a>[data-k="1"],.mk[data-mk-to="2"] .mk-say-a>[data-k="2"],.mk[data-mk-to="3"] .mk-say-a>[data-k="3"]{display:flex}
.mk[data-mk-ph="say"] .mk-say-p,.mk[data-mk-ph="out1"] .mk-say-p,.mk[data-mk-ph="home"] .mk-say-a{opacity:1;translate:none;transition-duration:.22s}

/* ── positions. Written by ../rysuj-maki.mjs; edit the numbers there. ── */
/* GEN:start */
.mk-art{aspect-ratio:720/440}
.mk-owl{left:43.819%;top:32.955%;height:30%}
.mk-c-main{left:14.722%;top:67.273%}
.mk-c-owl{left:50%;top:65%}
.mk-c-net{left:50%;top:76.818%}
.mk-c-1{left:87.778%;top:26.818%}
.mk-c-2{left:87.778%;top:54.091%}
.mk-c-3{left:87.778%;top:93.182%}
.mk-say{left:14.722%;bottom:71.136%;top:auto}
.mk-pa{--mk-len:90}
.mk-pb1{--mk-len:277}
.mk-pb2{--mk-len:174}
.mk-pb3{--mk-len:253}
@container mk (max-width:559px){
.mk-art{aspect-ratio:350/470}
.mk-owl{left:12.182%;top:39.149%;height:20.426%}
.mk-c-main{left:0%;top:25.106%}
.mk-c-owl{left:35.429%;top:45.532%}
.mk-c-net{left:35.429%;top:53.617%}
.mk-c-1{left:12.857%;top:84.468%}
.mk-c-2{left:42.857%;top:84.468%}
.mk-c-3{left:80%;top:84.468%}
.mk-say{left:46.286%;top:12.766%;bottom:auto}
.mk-pa{--mk-len:22}
.mk-pb1{--mk-len:74}
.mk-pb2{--mk-len:138}
.mk-pb3{--mk-len:166}
}
/* GEN:end */

/* ── wide: the words of the machines never leave the drawing on its right (a 610 px column at 1280) ── */
.mk-c-d{transform:translateX(min(-50%,calc(12.2cqw - 100%)))}
/* a drawing narrower than 720 px (the 610 px column at 1280): the network's pill says "VPN · private network", so it keeps clear
   of the line that goes up to the Mac Studio */
@container mk (max-width:719px){.mk-net-y{display:none}}
/* ── narrow: a column under 560 px. Drawn for 350 px, never wider than 440 px, on the common left edge ── */
@container mk (max-width:559px){
  .mk-art{max-width:440px}
  .mk-art>.mk-w{display:none}
  .mk-art>.mk-n{display:block}
  .mk-c-main,.mk-c-owl,.mk-c-net{align-items:flex-start;text-align:left;transform:none}
  .mk-c-owl{transform:translateY(-50%)}
  .mk-c-d{flex-direction:column;gap:5px;transform:translateX(-50%)}
  .mk-c b{font-size:.8125rem;line-height:1.125rem}
  .mk-say{transform:translateY(-50%)}
  .mk-say>span{max-width:180px;white-space:normal;overflow:visible}
  .mk-p{--mk-dash:18;stroke-width:3}
}

/* ── motion: only with maki.js (data-mk-ph on the figure, one phase of a run at a time), never under prefers-reduced-motion.
   A run (6.8 s): say, out1 (copper: your Mac → Glauka), owl (Glauka nods), out2 (copper: Glauka → machine k), work, res,
   back2 (blue: machine k → Glauka), owl2, back1 (blue: Glauka → your Mac), home (the answer), rest. ── */
@media (prefers-reduced-motion:no-preference){
  .mk[data-mk-ph="out1"] .mk-po.mk-pa{animation:mk-go .45s cubic-bezier(.45,0,.3,1) both}
  .mk[data-mk-to="1"][data-mk-ph="out2"] .mk-po.mk-pb1,.mk[data-mk-to="2"][data-mk-ph="out2"] .mk-po.mk-pb2,.mk[data-mk-to="3"][data-mk-ph="out2"] .mk-po.mk-pb3{animation:mk-go .8s cubic-bezier(.45,0,.3,1) both}
  .mk[data-mk-to="1"][data-mk-ph="back2"] .mk-pk.mk-pb1,.mk[data-mk-to="2"][data-mk-ph="back2"] .mk-pk.mk-pb2,.mk[data-mk-to="3"][data-mk-ph="back2"] .mk-pk.mk-pb3{animation:mk-go .8s cubic-bezier(.45,0,.3,1) both}
  .mk[data-mk-ph="back1"] .mk-pk.mk-pa{animation:mk-go .45s cubic-bezier(.45,0,.3,1) both}
  .mk[data-mk-ph="owl"] .mk-owl,.mk[data-mk-ph="owl2"] .mk-owl{animation:mk-nod .3s ease-in-out both}
  .mk-st.mk-ring i::after,.mk-m.mk-ring{animation:mk-ping .9s ease-out both}
  .mk-m.mk-ring{animation-name:mk-mping}
}
@keyframes mk-go{
  0%{stroke-dashoffset:calc(var(--mk-dash)*1px + 3px);opacity:1}
  94%{opacity:1}
  100%{stroke-dashoffset:calc(var(--mk-len)*-1px);opacity:0}
}
@keyframes mk-nod{50%{transform:translateY(-3px)}}
@keyframes mk-ping{0%{transform:scale(1);opacity:.6}100%{transform:scale(3.4);opacity:0}}
@keyframes mk-mping{0%{transform:scale(1)}35%{transform:scale(1.7)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.mk-say{display:none}}
