/* Hotkey's brand marks, shared by the console and the landing page (web/console/shared/marks.js loads
   this file next to itself). A mark's SVG fills its .mark; light and dark forms are both drawn and
   the theme shows one: data-theme when set, else the system's setting. */
.mark.mk { background: none !important; padding: 0; overflow: hidden; font-size: 0; }
.mk-svg { display: block; width: 100%; height: 100%; }
.mk-dark { display: none; }
:root[data-theme="dark"] .mk-dark { display: block; }
:root[data-theme="dark"] .mk-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mk-dark { display: block; } :root:not([data-theme="light"]) .mk-light { display: none; } }
/* The logo in the console's rail and the landing page's header: no tile behind it, the knot shows. */
.logo.hk { background: none; padding: 0; width: 32px; height: 32px; overflow: visible; }
.logo-link { display: grid; margin-bottom: 14px; text-decoration: none; }

/* Motion for the generated browser marks (web/landing/marks.js adds this file only when the marks are on).
   Only the eyes move: .mk-look (the eye row) is moved by marks.js toward the pointer and .mk-eyes
   blinks (its transform-origin, the eye row's middle, is set inline). The cells (.mk-c) ripple. */
.mk-look { transition: transform .35s cubic-bezier(.3, .8, .3, 1.25); }
.mk-eyes { transform-box: view-box; }
.mk-c { transform-box: fill-box; transform-origin: center; }

/* A blink: the eyes squeeze to a line and open again. */
.mk-eyes.mk-blink, .mk-poked .mk-eyes { animation: mk-blink .3s ease-in-out; }
@keyframes mk-blink { 0%, 100% { transform: scaleY(1); } 45% { transform: scaleY(.12); } }

/* Hover: a ripple from the middle cell outward. */
@media (hover: hover) { .rail-b:hover .mk-c, a:hover > .mark.mk .mk-c, button:hover > .mark.mk .mk-c, .mark.mk:hover .mk-c { animation: mk-pop .42s cubic-bezier(.2, .9, .3, 1.15) var(--d) both; } }
@keyframes mk-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(.55); } }

/* A browser at work: its cells breathe in a slow wave. */
.rail-b.look-work .mk-c { animation: mk-breathe 1.8s ease-in-out var(--d) infinite; }
@keyframes mk-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
  .mk-look { transition: none; transform: none !important; }
  .mk-eyes, .mk-c { animation: none !important; }
}
.mk-poked { display: contents; }

/* The one-eyed logo: in the header and on the demo's rail. */
.brand-logo { display: block; width: 30px; height: 30px; }
.brand-logo .mk-svg { width: 30px; height: 30px; }
.cx .logo.hk { background: none; width: 32px; height: 32px; }

/* Hotkey mascot motion, drop-in for web/landing/marks.css (experiments/mascot/). marks.js moves .mk-look and
   blinks .mk-eyes as it does today; these rules add the knot, the visor states and the footer typing. */

/* The logo. The knot and tails are overflow: the SVG and anything that clips it must let them show. */
.hk-logo, .brand-logo, .cx .logo.hk { overflow: visible; }
.hk-logo .mk-eyes, .hk-lid { transform-box: view-box; }
.hk-lid { transform: scaleY(0); }
.hk-tB { opacity: 0; }
/* The tails flick now and then, and flap while the pointer is on the brand. */
.hk-tA { animation: hk-flick 6s steps(1, end) infinite; }
.hk-tB { animation: hk-flickb 6s steps(1, end) infinite; }
@keyframes hk-flick { 0%, 90% { opacity: 1; } 91%, 94% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes hk-flickb { 0%, 90% { opacity: 0; } 91%, 94% { opacity: 1; } 95%, 100% { opacity: 0; } }
.hk-flap .hk-tA { animation: hk-flap .32s steps(1, end) infinite; }
@media (hover: hover) { a:hover .hk-tA { animation: hk-flap .32s steps(1, end) infinite; } }
.hk-flap .hk-tB { animation: hk-flapb .32s steps(1, end) infinite; }
@media (hover: hover) { a:hover .hk-tB { animation: hk-flapb .32s steps(1, end) infinite; } }
@keyframes hk-flap { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes hk-flapb { 0% { opacity: 1; } 50% { opacity: 0; } }
/* Optional: a .hk-busy ancestor (some browser is working) half shuts the lid. */
.hk-busy .hk-lid { transform: scaleY(.4); }

/* Browser marks (visor). The eye slides with the pointer (.mk-look). While working it sweeps the visor
   one cell at a time and stops following the pointer; when it needs you it turns amber; asleep it
   narrows to a line. look-work, look-wait and look-sleep are the classes the console already sets. */
.hk-scan, .hk-visor .mk-eyes { transform-box: view-box; }
.look-work .hk-visor .mk-look { transform: none !important; }
.look-work .hk-scan { animation: hk-sweep 1.6s steps(9, jump-none) infinite alternate; }
@keyframes hk-sweep { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
.look-wait .hk-eye { fill: var(--color-wait-fill); }
/* Asleep, a mascot loses most of its colour (Imad, 2026-11-24: chroma about 0.05 against the Neon tile's 0.2 to 0.3). */
.look-sleep svg { filter: saturate(.2); }
@media (prefers-reduced-motion: no-preference) { .mk-svg { transition: filter .6s ease; } }

/* The footer's key at its laptop: the front tooth types. Fill the pupil, outline the rest. */
.bigmark .bm-icon.hk-bigkey { width: 20.25cqw; height: 18cqw; }
.bigmark .hk-bigkey .hk-pupil { fill: currentColor; }
.hk-bigkey .mk-eyes { transform-box: view-box; }
.hk-bigkey .hk-tA { animation: hk-type .5s steps(1, end) infinite; }
.hk-bigkey .hk-tB { animation: hk-type .5s steps(1, end) -.25s infinite; }
@keyframes hk-type { 0% { opacity: 1; } 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hk-tA, .hk-tB, .hk-scan, .hk-bigkey .hk-tA, .hk-bigkey .hk-tB { animation: none !important; }
  .hk-tB, .hk-bigkey .hk-tB { opacity: 0; }
  .look-work .hk-visor .mk-look { transform: none; }
}

/* The visor mascot's speech bubble when its browser needs you (marks.js bubble()): it pops out once as
   the state starts (an animation runs when the element starts to show) and then holds still, so a long
   list costs nothing. Where it lies on the tile the tile is cut away (the mask's .hk-bub-cut), so it
   needs no colour of the surface behind it; a part may still paint a ring round it outside the tile
   (--mk-halo, the landing page's panels). .mk-quiet keeps it down on a row that is amber already
   (Needs you, the ask's head: 2026-11-25). */
.mark.mk-visor { overflow: visible; }
.hk-bub, .hk-bub-cut, .hk-z, .hk-z-cut { display: none; }
.hk-bub { transform-box: view-box; transform-origin: 18px 7.5px; }
.look-wait :is(.hk-bub, .hk-bub-cut) { display: inline; }
.look-wait .hk-bub { animation: hk-pop .42s cubic-bezier(.2, .9, .3, 1.15) both; }
.hk-bub-fill { fill: var(--color-wait-fill); }
/* The back bubble of a stack (marks.js, count 'stack'): the same amber, fainter. */
.hk-bub-back { opacity: .55; }
.hk-bub-halo { fill: var(--mk-halo, transparent); }
.mark.mk-quiet :is(.hk-bub, .hk-bub-cut) { display: none; }
@keyframes hk-pop { 0% { opacity: 0; transform: translateY(2px) scale(.4); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .look-wait .hk-bub { animation: none; } }

/* States, read the way a person would. Asleep: the eye is shut to a line, it doesn't blink or follow
   (marks.js), and a pixel z comes and goes in the bubble's corner, never higher than the bubble
   (2026-11-25: on every surface, not only the landing page's demo). Needs you: the eye looks straight
   out, amber, and the speech bubble is up. Working: the eye sweeps its page. Ready: it follows the
   pointer and blinks. */
.look-sleep .hk-visor .mk-eyes { transform: scaleY(.15); }
.look-sleep .hk-visor .mk-look { transform: none !important; }
.look-sleep :is(.hk-z, .hk-z-cut) { display: inline; }
.hk-z { transform-box: view-box; }
.hk-z-fill { fill: var(--color-text-3); }
.look-sleep .hk-z { animation: hk-z 3.2s ease-out infinite; }
@keyframes hk-z { 0% { opacity: 0; transform: translate(-1.5px, 3px); } 30%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
.look-wait .hk-visor .mk-look { transform: none !important; }
@media (prefers-reduced-motion: reduce) { .look-sleep .hk-z { animation: none; } }
