/* Interactive keypad simulator: stacked video layers inside the existing .kpo-media frame.
   Nothing here draws a key, a ring, text or a character: the layers are videos and posters, and
   the hit targets are transparent buttons over the key squares. */
.kpsim{position:absolute;inset:0;overflow:hidden;background:#0d0c0b;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* Until the clips load: the renderer's own first frame of the Frosted pad (the frame hides the matte). */
.kpsim .kpsim-still{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;margin:0;object-fit:cover;border-radius:0}
.kpsim-layer,.kpsim-slot{position:absolute;overflow:hidden;pointer-events:none}
.kpsim-grid,.kpsim-focus{inset:0}
.kpsim-layer[hidden],.kpsim-slot[hidden]{display:none}
.kpsim-video{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:cover;border-radius:0;background:transparent}
.kpsim-video[hidden]{display:none}
.kpsim-hits{position:absolute;inset:0}
.kpsim-hit{position:absolute;margin:0;padding:0;border:0;background:transparent;appearance:none;border-radius:0;cursor:pointer}
.kpsim-hit:disabled{cursor:default;pointer-events:none}
.kpsim-hit:focus-visible{outline:2px solid var(--ot-gold-text);outline-offset:-4px}
.kpsim-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:14px}
.kpsim-caption{margin:0;min-height:2.9em;flex:1 1 220px;font-size:14px;line-height:1.45;color:var(--ot-text-dim)}
.kpsim-reset{min-height:40px}
@media (max-width:759px){
  .kpsim-controls{gap:8px 12px}
  .kpsim-caption{flex-basis:100%;min-height:0}
}
.kpsim-reset[hidden]{display:none}
.kpsim-caption-quiet{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Breathing outlines and arrows: a page layer over the keypad drawing, never over a key's screen. An outline rings
   a live key's cap (in the gap around it); the arrows and labels follow the /download callouts (download.css).
   Palette tokens only: --kpsim-ring sits on the dark pad in both themes, --kpsim-mark on the page. */
:root{--kpsim-ring:var(--ot-gold-hi);--kpsim-mark:var(--ot-terra-text);--kpsim-mark-dim:var(--ot-text-dim)}
.kpsim-marks{position:absolute;inset:0;z-index:2;pointer-events:none}
.kpsim-glow{position:absolute;width:22.9%;height:19.4894%;border-radius:11.79%;box-shadow:0 0 0 2px var(--kpsim-ring),0 0 14px 3px color-mix(in srgb,var(--kpsim-ring) 55%,transparent);opacity:.25;animation:kpsim-breathe 2.4s ease-in-out infinite}
.kpsim-glow[hidden]{display:none}
.kpsim-glow[data-kpsim-down]{animation:none;opacity:1;box-shadow:0 0 0 2px color-mix(in srgb,var(--kpsim-ring) 30%,transparent)}
/* A held grid key draws the app's own hold look (ApprovalKeyState.holdProgress): the ring fills as the
   key is held, starting on the first frame of the press, so the key answers a press the instant it lands.
   The sweep runs for the graph's holdMs (--kpsim-hold-ms, written by keypad-sim.js). */
.kpsim-glow[data-kpsim-down]::after{content:"";position:absolute;inset:0;padding:3px;border-radius:inherit;pointer-events:none;
  background:conic-gradient(var(--kpsim-ring) var(--kpsim-hold),transparent 0);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  animation:kpsim-hold var(--kpsim-hold-ms,600ms) linear forwards}
@property --kpsim-hold{syntax:'<angle>';inherits:false;initial-value:0turn}
@keyframes kpsim-hold{from{--kpsim-hold:0turn}to{--kpsim-hold:1turn}}
/* A paused page and Reduce Motion hold the ring still: no sweep, the full ring is up at once. */
.is-paused .kpsim-glow[data-kpsim-down]::after{animation:none;--kpsim-hold:1turn}
@keyframes kpsim-breathe{0%,100%{opacity:.2}50%{opacity:1}}
.kpsim-arrows{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.kpsim-arrow{fill:none;stroke:var(--kpsim-mark);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.kpsim-arrow[data-kpsim-tone="dim"]{stroke:var(--kpsim-mark-dim)}
.kpsim-label{position:absolute;transform:translate(-100%,-50%);width:max-content;max-width:160px;text-align:right;font:600 14px/1.25 var(--ot-font-sans);letter-spacing:-0.005em;color:var(--kpsim-mark)}
.kpsim-label[data-kpsim-tone="dim"]{color:var(--kpsim-mark-dim)}
/* In the pad, under its key: centred, on the dark pad. */
.kpsim-label[data-kpsim-place="below"]{transform:translate(-50%,-50%);text-align:center;text-wrap:balance;font-size:13px;color:var(--kpsim-ring)}
.kpsim-label[hidden]{display:none}
.kpsim-marks[data-kpsim-arrows="off"] .kpsim-arrows,.kpsim-marks[data-kpsim-arrows="off"] .kpsim-label:not([data-kpsim-place="below"]){display:none}
.is-paused .kpsim-glow{animation:none;opacity:.85}
@media (prefers-reduced-motion:reduce){.kpsim-glow{animation:none;opacity:.85}.kpsim-glow[data-kpsim-down]::after{animation:none;--kpsim-hold:1turn}}
/* Room for the arrow labels left of each keypad: only as much margin as the page lacks (none on wide screens).
   Key styles: its keypad sits at max(0, (100vw - 1256px) / 2) + 40px; the labels want about 230px. */
@media (min-width:900px){[data-key-styles] .ks-sim{margin-left:clamp(0px,calc(190px - max(0px,(100vw - 1256px) / 2)),190px)}}
/* Hero: the clients row is about 850px wide and centred; padding shifts the keypad right by half of it. */
@media (min-width:1100px){.nh-clients{padding-left:clamp(0px,calc(1330px - 100vw),230px)}}
/* The hero keypad: controls centred under its label. */
.nh-dev.kp .kpsim-controls{justify-content:center;margin-top:10px}
.nh-dev.kp .kpsim-caption{flex:0 1 auto;min-height:0;font-size:13px;text-align:center}
/* Hero Key style picker: one compact pill bar under the device row, in a reserved strip, so it never covers a key
   of the keypad or a phone screen. It drives the keypad simulator and both phone loops. Palette tokens only. */
.nh-clients{position:relative;padding-bottom:56px}
.kpsim-hero-styles{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);z-index:3;display:flex;align-items:center;gap:6px;max-width:calc(100% - 24px);padding:5px;border:1px solid var(--ot-hair-strong);border-radius:999px;background:color-mix(in srgb,var(--ot-surface) 90%,transparent);box-shadow:0 8px 24px color-mix(in srgb,var(--ot-well) 55%,transparent);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;--kpsim-fade-start:0px;--kpsim-fade-end:0px;-webkit-mask-image:linear-gradient(to right,transparent 0,var(--ot-text) var(--kpsim-fade-start),var(--ot-text) calc(100% - var(--kpsim-fade-end)),transparent 100%);mask-image:linear-gradient(to right,transparent 0,var(--ot-text) var(--kpsim-fade-start),var(--ot-text) calc(100% - var(--kpsim-fade-end)),transparent 100%)}
.kpsim-hero-styles::-webkit-scrollbar{display:none}
/* Under 420 px the pills tighten so all six fit a 390 px phone. Under about 360 px the bar still scrolls sideways,
   so Neko and Puff could sit off-screen with no hint. The mask fades the edge that hides more styles: scroll-driven
   where the browser has it, so the fade follows the bar; under 360 px an end fade is always on as the fallback. Only the mask's alpha matters, so var(--ot-text) is a keep-alpha, not a
   paint colour, and the bar adds no colour of its own. */
@property --kpsim-fade-start{syntax:'<length>';inherits:false;initial-value:0px}
@property --kpsim-fade-end{syntax:'<length>';inherits:false;initial-value:0px}
@media (max-width:359px){.kpsim-hero-styles{--kpsim-fade-end:22px}}
@supports (animation-timeline: scroll()){
@keyframes kpsim-bar-hint{0%{--kpsim-fade-start:0px;--kpsim-fade-end:22px}8%{--kpsim-fade-start:22px;--kpsim-fade-end:22px}92%{--kpsim-fade-start:22px;--kpsim-fade-end:22px}100%{--kpsim-fade-start:22px;--kpsim-fade-end:0px}}
.kpsim-hero-styles{animation:kpsim-bar-hint linear both;animation-timeline:scroll(self inline)}
}
.kpsim-hero-style{appearance:none;display:inline-flex;align-items:center;gap:.3em;flex:0 0 auto;min-height:32px;padding:5px 12px;border:1px solid transparent;border-radius:999px;background:transparent;color:var(--ot-text);font:inherit;font-size:13px;font-weight:600;line-height:1.2;white-space:nowrap;cursor:pointer}
.kpsim-style-glyph{height:1.15em;width:auto;flex:none;color:var(--ot-text-dim)}
.kpsim-hero-style[aria-checked="true"] .kpsim-style-glyph{color:var(--ot-on-accent)}
.kpsim-hero-style:hover{background:var(--ot-surface-2)}
.kpsim-hero-style:focus-visible{outline:2px solid var(--ot-gold-text);outline-offset:-2px}
.kpsim-hero-style[aria-checked="true"]{background:var(--ot-gold);border-color:var(--ot-gold);color:var(--ot-on-accent)}
@media (max-width:419px){.kpsim-hero-styles{gap:1px;padding:3px}.kpsim-hero-style{padding:5px 7px;font-size:12px}}
/* The silhouettes add about 1.5 em to each pill; a tighter pad and gap keep all six on one line from 375 px up to
   the width where the full pad fits. 375, 390 and every other phone width stay clear of the scroll fallback. */
@media (max-width:639px){.kpsim-hero-style{padding:5px 3px;gap:.18em}.kpsim-style-glyph{height:1.1em}}
/* Under 420 px the bar takes its row's width instead of shrink-to-fitting to a 261 px minimum: at a 375 px
   viewport the row is 343 px, so the bar is 343 px (341 px client). The silhouettes drop to 1 em and the glyph
   gap to .12 em, which makes the six pills about 314 px, 320 px with the bar's 6 px padding: inside the 341 px
   home row and the 325 px prototype row. The group gap goes to 0, as the pills' own padding separates them, and
   the pills centre in the wider bar (safe, so a phone narrow enough to scroll still starts at the first pill). */
@media (max-width:419px){.kpsim-hero-styles{gap:0;width:100%;max-width:100%;justify-content:safe center}.kpsim-hero-style{gap:.12em}.kpsim-style-glyph{height:1em}}
/* The bar sits on the device row's centre, not the padding box's: the row shifts right by its left padding. */
@media (min-width:1100px){.kpsim-hero-styles{left:calc(50% + clamp(0px,calc(665px - 50vw),115px))}}
/* The second instance, directly under the ten state tiles: the same pills and look as the hero's, but
   in flow (the shared .kpsim-hero-styles rule above is the hero's absolute strip). It takes the
   section's second column under the tiles on wide screens and the single column on narrow ones, and
   both pickers drive the one page style. */
.page-home #states .states-styles{position:static;left:auto;right:auto;bottom:auto;transform:none;z-index:auto;justify-content:center;justify-self:center;width:max-content;max-width:100%;margin-top:28px}
@media (min-width:960px){.page-home #states .states-styles{grid-column:2;grid-row:3}}
@media (max-width:959px){.page-home #states .states-styles{grid-column:1;grid-row:auto}}
@media (max-width:419px){.page-home #states .states-styles{width:100%;max-width:100%;justify-content:safe center}}
