/* Keycap — Button Factory effects family. Everything scoped under .bf.bf-keycap.
   Anatomy: plate (the black under the cap = full travel) · glow (LED underglow, lit on hover/press/live only)
   · skirt (moves) > top (dished face) > legend / sub-legend / corner LED.
   Only transform and opacity animate. Switch feel via data-switch="linear|tactile|clicky". */
/* v1.1 isolation: root specificity .bf.bf-keycap, border-box on root + descendants */
.bf.bf-keycap,.bf.bf-keycap::before,.bf.bf-keycap::after,.bf.bf-keycap *,.bf.bf-keycap *::before,.bf.bf-keycap *::after{box-sizing:border-box}
.bf.bf-keycap{
  /* per-preset colour tokens (no colour math in JS) */
  --kc-base:#1E2128;--kc-skirt-a:#1A1D23;--kc-skirt-b:#0E0F13;--kc-legend:#EDF0F4;--kc-subc:#8F96A3;
  --kc-hi:color-mix(in oklab,var(--kc-base),#fff 7%);--kc-lo:color-mix(in oklab,var(--kc-base),#000 14%);
  --kc-rim:rgba(255,255,255,.16);--kc-rim2:rgba(255,255,255,.05);--kc-dish-sh:rgba(0,0,0,.34);--kc-dish-hi:rgba(255,255,255,.07);
  --kc-wall-l:rgba(255,255,255,.07);--kc-wall-r:rgba(0,0,0,.42);--kc-lip:#2A2E37;--kc-edge:rgba(255,255,255,.09);--kc-plate:#05060A;--kc-contact:rgba(0,0,0,.55);
  --kc-glow:255,210,0;--kc-press-led:#FFD200;--kc-live:#FFD200;--kc-tog-led:#FFD200;
  --kc-dis-top:#1A1C22;--kc-dis-a:#131519;--kc-dis-b:#0E0F13;--kc-dis-ink:#8F96A3;
  --kc-ring:#FFD200;--kc-gap:#0B0C0F;--kc-grain-o:.05;
  /* geometry + travel */
  --kc-travel:.32em;--kc-dn:var(--kc-travel);--kc-half:calc(var(--kc-travel) / 2);--kc-tog:calc(var(--kc-travel) * .75);--kc-lift:-.04em;
  --kc-r:.5em;--kc-tr:.38em;--kc-front:.46em;
  --kc-grain:url("/tools/switchboard/vendor/assets/32e3446bc3.svg");
  position:relative;display:inline-grid;vertical-align:middle;margin:0;padding:0 0 var(--kc-travel);border:0;border-radius:var(--kc-r);
  min-width:0;width:auto;height:auto;background:none;box-shadow:none;color:var(--kc-legend);
  font:700 1rem/1 Archivo,"Archivo Variable",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-stretch:normal;
  letter-spacing:0;text-transform:none;text-align:center;text-decoration:none;text-shadow:none;white-space:nowrap;
  cursor:pointer;isolation:isolate;outline:none;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;
  touch-action:manipulation;-webkit-user-select:none;user-select:none;appearance:none}
.bf.bf-keycap .kc-plate{position:absolute;z-index:0;left:0;right:0;top:var(--kc-travel);bottom:0;border-radius:var(--kc-r);pointer-events:none;
  background:var(--kc-plate);box-shadow:0 .42em .7em -.18em var(--kc-contact)}
.bf.bf-keycap .kc-glow{position:absolute;z-index:1;left:-.6em;right:-.6em;top:.9em;bottom:-.85em;pointer-events:none;opacity:0;
  transition:opacity calc(120ms * var(--kc-slow,1)) linear}
.bf.bf-keycap .kc-glow i,.bf.bf-keycap .kc-glow::after{position:absolute;inset:0;border-radius:50%;
  background:radial-gradient(closest-side,rgba(var(--kc-glow),.5),rgba(var(--kc-glow),.16) 55%,rgba(var(--kc-glow),0))}
.bf.bf-keycap .kc-glow i+i{display:none}
.bf.bf-keycap .kc-glow::after{content:"";inset:40% 12% 6%;background:radial-gradient(closest-side,rgba(var(--kc-glow),.75),rgba(var(--kc-glow),0));opacity:0;
  transition:opacity calc(170ms * var(--kc-slow,1)) linear}
.bf.bf-keycap .kc-skirt{position:relative;z-index:2;display:flex;border-radius:var(--kc-r);padding:.11em .19em var(--kc-front);
  background:linear-gradient(90deg,var(--kc-wall-l) 0,rgba(255,255,255,0) .42em,rgba(0,0,0,0) calc(100% - .42em),var(--kc-wall-r) 100%),
    linear-gradient(180deg,var(--kc-skirt-a) 0,var(--kc-skirt-a) calc(100% - var(--kc-front) - .05em),var(--kc-lip) calc(100% - var(--kc-front) + .03em),var(--kc-skirt-b) 100%);
  box-shadow:inset 0 1px 0 var(--kc-edge),inset 0 -.06em .04em rgba(0,0,0,.4);
  transform:translateY(0);transition:transform calc(170ms * var(--kc-slow,1)) cubic-bezier(.2,.9,.3,1)}
.bf.bf-keycap .kc-top{position:relative;flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:.55em;
  min-height:2.3em;padding:1.04em 1.1em .46em;border-radius:var(--kc-tr);overflow:hidden;
  background:radial-gradient(130% 95% at 42% 22%,var(--kc-hi) 0,var(--kc-base) 52%,var(--kc-lo) 100%);
  box-shadow:inset 0 1px 0 var(--kc-rim),inset 1px 0 0 var(--kc-rim2),inset 0 .2em .24em -.1em var(--kc-dish-sh),inset 0 -.14em .16em -.08em var(--kc-dish-hi),0 .05em .05em rgba(0,0,0,.42),0 0 0 1px rgba(0,0,0,.12)}
.bf.bf-keycap .kc-top::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:var(--kc-grain) 0 0/120px 120px;opacity:var(--kc-grain-o)}
.bf.bf-keycap .kc-top::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:rgba(0,0,0,.13);opacity:0;
  transition:opacity calc(170ms * var(--kc-slow,1)) linear}
.bf.bf-keycap .kc-legend{position:relative;z-index:1;display:block;font:inherit;color:var(--kc-legend);letter-spacing:-.005em;line-height:1}
.bf.bf-keycap .kc-sub{position:absolute;z-index:1;left:.8em;top:.62em;font:500 .6em/1 "Martian Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing:.02em;color:var(--kc-subc);white-space:nowrap}
.bf.bf-keycap .kc-led{position:absolute;z-index:1;right:.46em;top:.42em;width:.3em;height:.3em;border-radius:50%;
  background:rgba(0,0,0,.45);box-shadow:inset 0 .04em .05em rgba(0,0,0,.65),0 .03em 0 rgba(255,255,255,.1)}
.bf.bf-keycap .kc-led::after{content:"";position:absolute;inset:-.01em;border-radius:50%;--kc-ledc:var(--kc-press-led);
  background:radial-gradient(circle at 40% 35%,#fff 0 14%,var(--kc-ledc) 48%);box-shadow:0 0 .28em .06em var(--kc-ledc);opacity:0;
  transition:opacity calc(170ms * var(--kc-slow,1)) linear}
.bf.bf-keycap .kc-ico{width:1em;height:1em;flex:none;color:var(--kc-subc)}

/* ---------- hover tell (lift + underglow), not when disabled / busy / latched ---------- */
.bf.bf-keycap:hover:not(:disabled,[data-state="loading"],[aria-pressed="true"]) .kc-skirt{transform:translateY(var(--kc-lift))}
.bf.bf-keycap:hover:not(:disabled) .kc-glow{opacity:1}

/* ---------- loading: latched half-down, corner LED breathes ---------- */
.bf.bf-keycap[data-state="loading"]{cursor:progress}
.bf.bf-keycap[data-state="loading"] .kc-skirt{transform:translateY(var(--kc-half));transition:transform calc(60ms * var(--kc-slow,1)) cubic-bezier(.5,0,1,1)}
.bf.bf-keycap[data-state="loading"] .kc-glow{opacity:.55}
.bf.bf-keycap[data-state="loading"] .kc-led::after{--kc-ledc:var(--kc-live);opacity:1;animation:kc-breathe calc(1.2s * var(--kc-slow,1)) ease-in-out infinite}
@keyframes kc-breathe{0%,100%{opacity:.22}50%{opacity:1}}
/* ---------- success: latch releases (170 ms), green LED for 1.3 s ---------- */
.bf.bf-keycap[data-state="success"] .kc-led::after{--kc-ledc:#39E07A;opacity:1;animation:kc-latch calc(1.3s * var(--kc-slow,1)) linear forwards}
@keyframes kc-latch{0%,88%{opacity:1}100%{opacity:0}}
/* ---------- error: red LED, cap judders 2x on its stem (translate composes with the travel transform) ---------- */
.bf.bf-keycap[data-state="error"] .kc-led::after{--kc-ledc:#FF4B2B;opacity:1}
.bf.bf-keycap[data-state="error"] .kc-skirt{animation:kc-judder calc(40ms * var(--kc-slow,1)) linear 2}
@keyframes kc-judder{0%,100%{translate:0 0}25%{translate:.04em 0}75%{translate:-.04em 0}}
/* ---------- toggled (aria-pressed): Caps-Lock latch .24em + LED ---------- */
.bf.bf-keycap[aria-pressed="true"] .kc-skirt{transform:translateY(var(--kc-tog));transition:transform calc(60ms * var(--kc-slow,1)) cubic-bezier(.5,0,1,1)}
.bf.bf-keycap[aria-pressed="true"] .kc-led::after{--kc-ledc:var(--kc-tog-led);opacity:1}
.bf.bf-keycap[aria-pressed="true"] .kc-glow{opacity:.7}

/* ---------- press: pointer (:active), keyboard / shortcut (.is-down). Down 60 ms, up 170 ms ---------- */
.bf.bf-keycap:not(:disabled):active .kc-skirt,.bf.bf-keycap:not(:disabled).is-down .kc-skirt{transform:translateY(var(--kc-dn));
  transition:transform calc(60ms * var(--kc-slow,1)) cubic-bezier(.5,0,1,1)}
/* tactile: 0 → 35 % travel in 25 ms, 18 ms bump hold, → 100 % at 70 ms */
.bf.bf-keycap[data-switch="tactile"]:not(:disabled):active .kc-skirt,.bf.bf-keycap[data-switch="tactile"]:not(:disabled).is-down .kc-skirt{
  transition-duration:calc(70ms * var(--kc-slow,1));transition-timing-function:cubic-bezier(.6,0,.8,1);transition-timing-function:linear(0,.35 35.7%,.35 61.4%,1)}
/* clicky: tactile + .04em snap past the bump at 45 % */
.bf.bf-keycap[data-switch="clicky"]:not(:disabled):active .kc-skirt,.bf.bf-keycap[data-switch="clicky"]:not(:disabled).is-down .kc-skirt{
  transition-duration:calc(70ms * var(--kc-slow,1));transition-timing-function:cubic-bezier(.6,0,.8,1);transition-timing-function:linear(0,.35 35.7%,.35 45%,.475 47%,1)}
.bf.bf-keycap:not(:disabled):active .kc-top::after,.bf.bf-keycap:not(:disabled).is-down .kc-top::after{opacity:1;transition-duration:calc(60ms * var(--kc-slow,1))}
.bf.bf-keycap:not(:disabled):active .kc-glow,.bf.bf-keycap:not(:disabled).is-down .kc-glow,
.bf.bf-keycap:not(:disabled):active .kc-glow::after,.bf.bf-keycap:not(:disabled).is-down .kc-glow::after{opacity:1;transition-duration:calc(60ms * var(--kc-slow,1))}
.bf.bf-keycap:not(:disabled):active .kc-led::after,.bf.bf-keycap:not(:disabled).is-down .kc-led::after{opacity:1;transition-duration:calc(30ms * var(--kc-slow,1))}

/* ---------- focus: hi-vis ring outside the plate, 2px carbon gap ---------- */
.bf.bf-keycap:focus-visible{outline:2px solid var(--kc-ring);outline-offset:2px;box-shadow:0 0 0 2px var(--kc-gap)}

/* ---------- disabled: blank unlit cap at rest height, flat, no glow, no shortcut ---------- */
.bf.bf-keycap:disabled{cursor:not-allowed}
.bf.bf-keycap:disabled .kc-skirt{transform:none;animation:none;translate:none;background:linear-gradient(180deg,var(--kc-dis-a),var(--kc-dis-b));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),inset 0 -.05em .03em rgba(0,0,0,.3)}
.bf.bf-keycap:disabled .kc-top{background:var(--kc-dis-top);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 .04em .05em rgba(0,0,0,.3)}
.bf.bf-keycap:disabled .kc-top::before,.bf.bf-keycap:disabled .kc-top::after,.bf.bf-keycap:disabled .kc-glow{opacity:0}
.bf.bf-keycap:disabled .kc-legend,.bf.bf-keycap:disabled .kc-sub,.bf.bf-keycap:disabled .kc-ico{color:var(--kc-dis-ink)}
.bf.bf-keycap:disabled .kc-led::after{opacity:0;animation:none}
.bf.bf-keycap:disabled .kc-led{opacity:.5}

/* ================= presets ================= */
/* Hi-Vis doubleshot: the brand mark as a button */
.bf.bf-keycap[data-preset="hi-vis"]{--kc-base:#FFD200;--kc-skirt-a:#B38F00;--kc-skirt-b:#8A6E00;--kc-legend:#0B0C0F;--kc-subc:#4A3C00;
  --kc-hi:#FFE14F;--kc-lo:#EDC200;--kc-rim:rgba(255,250,215,.75);--kc-rim2:rgba(255,250,215,.3);--kc-dish-sh:rgba(120,85,0,.32);--kc-dish-hi:rgba(255,248,200,.4);
  --kc-wall-l:rgba(255,236,140,.22);--kc-wall-r:rgba(60,40,0,.35);--kc-lip:#D1A800;--kc-edge:rgba(255,236,150,.3);--kc-grain-o:.045;--kc-press-led:#FF4B2B;--kc-live:#FF4B2B;--kc-tog-led:#FF4B2B}
.bf.bf-keycap[data-preset="hi-vis"] .kc-led{background:rgba(60,45,0,.5)}
.bf.bf-keycap[data-preset="hi-vis"] .kc-top{padding-left:1.25em;padding-right:1.25em}
/* Carbon: matte bead-blast dark cap */
.bf.bf-keycap[data-preset="carbon"] .kc-top{min-width:3.6em}
/* ⌘K launcher: a wide cap that reads as a search field, sub-legend as mini caps on the right */
.bf.bf-keycap[data-preset="launcher"]{--kc-base:#181B21;--kc-skirt-a:#121419;--kc-skirt-b:#0A0B0E;--kc-legend:#C9CED6;--kc-subc:#8F96A3;--kc-lip:#22252C}
.bf.bf-keycap[data-preset="launcher"] .kc-top{justify-content:flex-start;gap:.6em;min-width:17em;padding:.62em .95em .5em .9em;
  background:radial-gradient(160% 120% at 30% 10%,var(--kc-hi) 0,var(--kc-base) 50%,var(--kc-lo) 100%)}
.bf.bf-keycap[data-preset="launcher"] .kc-legend{font-weight:500;font-size:.9375em}
.bf.bf-keycap[data-preset="launcher"] .kc-sub{position:relative;left:auto;top:auto;margin-left:auto;display:inline-flex;gap:.24em;font:inherit;letter-spacing:0}
.bf.bf-keycap[data-preset="launcher"] .kc-led{top:.3em;right:.46em;width:.26em;height:.26em}
/* mini keycap chip (shared look, duplicated per family for isolation) */
.bf.bf-keycap .kc-sub b{display:inline-flex;align-items:center;justify-content:center;height:1.3em;min-width:1.3em;padding:0 .34em .06em;border-radius:.26em;
  background:linear-gradient(180deg,#262A33,#1C1F26);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 .12em 0 #0B0C0F,0 .16em .14em rgba(0,0,0,.4);
  font:500 .62em/1 "Martian Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;color:#A3AAB6;font-size:.7em;height:1.86em;min-width:1.86em;border-radius:.37em}
/* Spacebar send: wide cap with a convex (inverted-dish) top */
.bf.bf-keycap[data-preset="spacebar"]{--kc-base:#2A2E37;--kc-skirt-a:#1E2128;--kc-skirt-b:#13151A;--kc-legend:#EDF0F4;--kc-subc:#A6ADB9;--kc-rim:rgba(255,255,255,.12);--kc-lip:#3A3F4A}
.bf.bf-keycap[data-preset="spacebar"] .kc-top{min-width:15em;
  background:linear-gradient(180deg,var(--kc-lo) 0,var(--kc-hi) 30%,var(--kc-base) 62%,var(--kc-lo) 100%);
  box-shadow:inset 0 1px 0 var(--kc-rim),inset 0 -.1em .14em -.04em rgba(0,0,0,.32),0 .06em .07em rgba(0,0,0,.38)}
/* Key hint: small inline cap for "Press E to edit" */
.bf.bf-keycap[data-preset="kbd-hint"]{font-size:.8125em;--kc-r:.36em;--kc-tr:.28em;--kc-travel:.26em;--kc-front:.28em;--kc-lip:#3A3F4A;margin:0 .1em;vertical-align:-.5em;
  --kc-base:#2A2E37;--kc-skirt-a:#1E2128;--kc-skirt-b:#13151A;--kc-rim:rgba(255,255,255,.14)}
.bf.bf-keycap[data-preset="kbd-hint"] .kc-skirt{padding:.07em .12em var(--kc-front)}
.bf.bf-keycap[data-preset="kbd-hint"] .kc-top{min-height:1.4em;min-width:1.7em;padding:.24em .45em .2em}
.bf.bf-keycap[data-preset="kbd-hint"] .kc-led{display:none}
.bf.bf-keycap[data-preset="kbd-hint"] .kc-glow{left:-.4em;right:-.4em;top:.6em;bottom:-.6em}
/* Shine-through: smoked cap, legend lit by the LED; hover cycles the hue once on the glow layer only */
.bf.bf-keycap[data-preset="shine"]{--kc-base:#16181D;--kc-skirt-a:#111317;--kc-skirt-b:#0A0B0E;--kc-legend:#A3AAB6;--kc-subc:#7F8694;--kc-tog-led:#FF4B2B;--kc-live:#FFD200;--kc-rim:rgba(255,255,255,.12);--kc-lip:#20232A;
  --kc-hi:#1E2127;--kc-lo:#101115}
.bf.bf-keycap[data-preset="shine"] .kc-legend::after{content:attr(data-l);position:absolute;inset:0;color:#FFF4CC;
  text-shadow:0 0 .1em rgba(var(--kc-glow),.9),0 0 .4em rgba(var(--kc-glow),.6);opacity:0;transition:opacity calc(120ms * var(--kc-slow,1)) linear}
.bf.bf-keycap[data-preset="shine"]:hover:not(:disabled) .kc-legend::after,.bf.bf-keycap[data-preset="shine"].is-down:not(:disabled) .kc-legend::after,
.bf.bf-keycap[data-preset="shine"][aria-pressed="true"]:not(:disabled) .kc-legend::after,.bf.bf-keycap[data-preset="shine"][data-state="loading"] .kc-legend::after{opacity:1}
.bf.bf-keycap[data-preset="shine"] .kc-glow i+i{display:block;opacity:0}
.bf.bf-keycap[data-preset="shine"] .kc-glow i:nth-child(2){background:radial-gradient(closest-side,rgba(255,75,43,.55),rgba(255,75,43,.16) 55%,rgba(255,75,43,0))}
.bf.bf-keycap[data-preset="shine"] .kc-glow i:nth-child(3){background:radial-gradient(closest-side,rgba(70,190,255,.5),rgba(70,190,255,.15) 55%,rgba(70,190,255,0))}
.bf.bf-keycap[data-preset="shine"]:hover:not(:disabled) .kc-glow i:nth-child(1){animation:kc-hue1 calc(900ms * var(--kc-slow,1)) linear both}
.bf.bf-keycap[data-preset="shine"]:hover:not(:disabled) .kc-glow i:nth-child(2){animation:kc-hue2 calc(900ms * var(--kc-slow,1)) linear both}
.bf.bf-keycap[data-preset="shine"]:hover:not(:disabled) .kc-glow i:nth-child(3){animation:kc-hue3 calc(900ms * var(--kc-slow,1)) linear both}
@keyframes kc-hue1{0%,55%{opacity:0}85%,100%{opacity:1}}
@keyframes kc-hue2{0%{opacity:0}14%{opacity:1}38%,100%{opacity:0}}
@keyframes kc-hue3{0%,22%{opacity:0}46%{opacity:1}78%,100%{opacity:0}}
/* Paper: light-host cap */
.bf.bf-keycap[data-preset="paper"]{--kc-base:#E6E9EE;--kc-skirt-a:#C9CED6;--kc-skirt-b:#AEB4BE;--kc-legend:#14161B;--kc-subc:#474C59;
  --kc-hi:#F4F6F9;--kc-lo:#D3D8DF;--kc-rim:rgba(255,255,255,.95);--kc-rim2:rgba(255,255,255,.5);--kc-dish-sh:rgba(20,22,27,.14);--kc-dish-hi:rgba(255,255,255,.6);
  --kc-wall-l:rgba(255,255,255,.3);--kc-wall-r:rgba(20,22,27,.18);--kc-lip:#DCE0E6;--kc-edge:rgba(255,255,255,.6);--kc-plate:#8A909B;--kc-contact:rgba(20,22,27,.28);--kc-grain-o:.05;
  --kc-press-led:#B08A00;--kc-live:#B08A00;--kc-tog-led:#D23A1E;--kc-ring:#14161B;--kc-gap:#E6E9EE;
  --kc-dis-top:#D9DDE3;--kc-dis-a:#C8CDD4;--kc-dis-b:#B9BFC8;--kc-dis-ink:#474C59}
.bf.bf-keycap[data-preset="paper"] .kc-top::after{background:rgba(20,22,27,.07)}
.bf.bf-keycap[data-preset="paper"] .kc-led{background:rgba(20,22,27,.22);box-shadow:inset 0 .04em .05em rgba(20,22,27,.35),0 .03em 0 rgba(255,255,255,.6)}
.bf.bf-keycap[data-preset="paper"] .kc-glow i,.bf.bf-keycap[data-preset="paper"] .kc-glow::after{background:radial-gradient(closest-side,rgba(255,200,0,.42),rgba(255,200,0,.12) 55%,rgba(255,200,0,0))}
/* ISO Enter: L-shaped showpiece drawn in SVG (plate + ring static, skirt + dished top move) */
.bf.bf-keycap[data-preset="iso-enter"]{--kc-base:#A3A9B3;--kc-skirt-a:#6E747E;--kc-skirt-b:#454A53;--kc-legend:#0B0C0F;--kc-subc:#1C1F25;
  --kc-hi:#BCC1C9;--kc-lo:#8C929C;--kc-grain-o:.09;
  display:inline-block;width:4.4em;height:calc(4.7em + var(--kc-travel));padding:0;pointer-events:none;border-radius:.5em}
.bf.bf-keycap[data-preset="iso-enter"] .kc-plate{inset:0;background:none;box-shadow:none;border-radius:0}
.bf.bf-keycap[data-preset="iso-enter"] .kc-plate svg{position:absolute;left:-.3em;top:-.3em;width:5em;height:5.62em;overflow:visible}
.bf.bf-keycap[data-preset="iso-enter"] .kc-plate .kc-p{fill:var(--kc-plate);pointer-events:visiblePainted}
.bf.bf-keycap[data-preset="iso-enter"] .kc-plate .kc-c{fill:#000}
.bf.bf-keycap[data-preset="iso-enter"] .kc-ring path{fill:none;opacity:0;vector-effect:non-scaling-stroke}
.bf.bf-keycap[data-preset="iso-enter"] .kc-ring .r1{stroke:var(--kc-gap);stroke-width:6}
.bf.bf-keycap[data-preset="iso-enter"] .kc-ring .r2{stroke:var(--kc-ring);stroke-width:2}
.bf.bf-keycap[data-preset="iso-enter"]:focus-visible{outline:none;box-shadow:none}
.bf.bf-keycap[data-preset="iso-enter"]:focus-visible .kc-ring path{opacity:1}
.bf.bf-keycap[data-preset="iso-enter"] .kc-glow{left:-.5em;right:-.6em;top:1.2em;bottom:-.9em}
.bf.bf-keycap[data-preset="iso-enter"] .kc-skirt{position:absolute;left:0;top:0;width:4.4em;height:4.7em;padding:0;background:none;box-shadow:none;border-radius:0;display:block}
.bf.bf-keycap[data-preset="iso-enter"] .kc-skirt>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.bf.bf-keycap[data-preset="iso-enter"] .kc-skirt>svg path{pointer-events:visiblePainted}
.bf.bf-keycap[data-preset="iso-enter"] .kc-skirt .kc-shade{fill:#000;opacity:0;transition:opacity calc(170ms * var(--kc-slow,1)) linear}
.bf.bf-keycap[data-preset="iso-enter"]:not(:disabled):active .kc-shade,.bf.bf-keycap[data-preset="iso-enter"]:not(:disabled).is-down .kc-shade{opacity:.13;transition-duration:calc(60ms * var(--kc-slow,1))}
.bf.bf-keycap[data-preset="iso-enter"] .kc-grain{position:absolute;inset:0;pointer-events:none;background:var(--kc-grain) 0 0/8.75em 8.75em;opacity:var(--kc-grain-o);
  -webkit-mask:var(--kc-iso-mask) 0 0/100% 100% no-repeat;mask:var(--kc-iso-mask) 0 0/100% 100% no-repeat}
.bf.bf-keycap[data-preset="iso-enter"] .kc-top{position:absolute;left:.16em;top:.1em;width:4.08em;height:1.82em;min-height:0;padding:.6em .5em .3em .5em;
  background:none;box-shadow:none;border-radius:0;overflow:visible;pointer-events:none}
.bf.bf-keycap[data-preset="iso-enter"] .kc-top::before,.bf.bf-keycap[data-preset="iso-enter"] .kc-top::after{display:none}
.bf.bf-keycap[data-preset="iso-enter"] .kc-glyph{position:absolute;z-index:1;left:.96em;right:.16em;top:1.92em;bottom:.38em;display:flex;align-items:center;justify-content:center;
  font:500 1.25em/1 "Martian Mono",ui-monospace,Menlo,Consolas,monospace;color:var(--kc-subc);pointer-events:none}
.bf.bf-keycap[data-preset="iso-enter"]:disabled{--kc-skirt-a:var(--kc-dis-a);--kc-skirt-b:var(--kc-dis-b);--kc-hi:var(--kc-dis-top);--kc-base:var(--kc-dis-top);--kc-lo:var(--kc-dis-top)}
.bf.bf-keycap[data-preset="iso-enter"]:disabled .kc-skirt{background:none;box-shadow:none}
.bf.bf-keycap[data-preset="iso-enter"]:disabled .kc-rimp{opacity:.25}
.bf.bf-keycap[data-preset="iso-enter"]:disabled .kc-grain{opacity:0}
.bf.bf-keycap[data-preset="iso-enter"]:disabled .kc-glyph{color:var(--kc-dis-ink)}

/* ---------- off-screen / hidden tab: pause the few CSS loops ---------- */
.bf.bf-keycap.kc-off *,.bf.bf-keycap.kc-off *::before,.bf.bf-keycap.kc-off *::after{animation-play-state:paused!important}

/* ---------- reduced motion: no travel above 2px; press = top darkens + LED; static LED while loading ---------- */
@media (prefers-reduced-motion:reduce){
  .bf.bf-keycap{--kc-dn:2px;--kc-half:2px;--kc-tog:2px;--kc-lift:0px}
  .bf.bf-keycap .kc-skirt{transition-duration:.01ms!important}
  .bf.bf-keycap *,.bf.bf-keycap *::before,.bf.bf-keycap *::after{animation:none!important}
  .bf.bf-keycap[data-preset="shine"]:hover:not(:disabled) .kc-glow i:nth-child(1){opacity:1}
}
.bf.bf-keycap.bf-rm{--kc-dn:2px;--kc-half:2px;--kc-tog:2px;--kc-lift:0px}
.bf.bf-keycap.bf-rm .kc-skirt{transition-duration:.01ms!important}
.bf.bf-keycap.bf-rm *,.bf.bf-keycap.bf-rm *::before,.bf.bf-keycap.bf-rm *::after{animation:none!important}
.bf.bf-keycap.bf-rm[data-preset="shine"]:hover:not(:disabled) .kc-glow i:nth-child(1){opacity:1}

/* ---------- forced colors: system colours, no gradients ---------- */
@media (forced-colors:active){
  .bf.bf-keycap{forced-color-adjust:none;color:ButtonText!important}
  .bf.bf-keycap *{forced-color-adjust:none}
  .bf.bf-keycap .kc-sub b{forced-color-adjust:none}
  .bf.bf-keycap .kc-plate,.bf.bf-keycap .kc-glow,.bf.bf-keycap .kc-top::before,.bf.bf-keycap .kc-top::after,.bf.bf-keycap .kc-grain{display:none}
  .bf.bf-keycap .kc-skirt{background:ButtonFace!important;border:1px solid ButtonText;box-shadow:none}
  .bf.bf-keycap .kc-top{background:ButtonFace!important;box-shadow:none}
  .bf.bf-keycap .kc-legend,.bf.bf-keycap .kc-sub,.bf.bf-keycap .kc-ico,.bf.bf-keycap .kc-glyph{color:ButtonText!important}
  .bf.bf-keycap .kc-sub b{background:ButtonFace!important;border:1px solid ButtonText;box-shadow:none;color:ButtonText!important}
  .bf.bf-keycap .kc-led{background:Canvas!important;border:1px solid ButtonText;box-shadow:none}
  .bf.bf-keycap .kc-led::after{background:Highlight!important;box-shadow:none}
  .bf.bf-keycap.is-down .kc-skirt,.bf.bf-keycap[aria-pressed="true"] .kc-skirt,.bf.bf-keycap.is-down .kc-top,.bf.bf-keycap[aria-pressed="true"] .kc-top{background:Highlight!important}
  .bf.bf-keycap.is-down .kc-legend,.bf.bf-keycap[aria-pressed="true"] .kc-legend,.bf.bf-keycap.is-down .kc-sub,.bf.bf-keycap[aria-pressed="true"] .kc-sub,.bf.bf-keycap.is-down .kc-ico{color:HighlightText!important}
  .bf.bf-keycap:disabled .kc-skirt{border-color:GrayText!important}
  .bf.bf-keycap .kc-skirt,.bf.bf-keycap .kc-top{box-shadow:none!important}
  .bf.bf-keycap[data-preset="shine"] .kc-legend::after{display:none!important}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-skirt{border:0!important}
  .bf.bf-keycap:focus-visible{outline:2px solid Highlight;box-shadow:none}
  .bf.bf-keycap[data-preset="shine"] .kc-legend::after{display:none}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-skirt{border:0;background:none!important}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-skirt>svg path{fill:ButtonFace;stroke:ButtonText;stroke-width:1px;vector-effect:non-scaling-stroke}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-skirt .kc-shade,.bf.bf-keycap[data-preset="iso-enter"] .kc-skirt .kc-rimp{display:none}
  .bf.bf-keycap[data-preset="iso-enter"].is-down .kc-skirt>svg path{fill:Highlight}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-plate .kc-p,.bf.bf-keycap[data-preset="iso-enter"] .kc-plate .kc-c{display:none}
  .bf.bf-keycap[data-preset="iso-enter"]:focus-visible{outline:2px solid Highlight}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-plate{display:block}
  .bf.bf-keycap[data-preset="iso-enter"] .kc-ring path{display:none}
  .bf.bf-keycap:disabled .kc-legend,.bf.bf-keycap:disabled .kc-sub,.bf.bf-keycap:disabled .kc-glyph{color:GrayText!important}
}
