/* Phone hand-off (handoff.js). Everything here styles elements that script creates on
   phones only, so desktop pages render exactly as without it. Loaded by home, modules,
   pricing and the guides; guide and pricing pages have no site.css, so every token has
   its value as a fallback. */

/* ---- The email form: hero, guide and dialog variants ---- */
.hof{--hof-r:14px;margin:0}
.hof-field{display:grid}
.hof-field>*{grid-area:1/1}
.hof-input{box-sizing:border-box;display:block;width:100%;height:54px;margin:0;padding:0 16px;border:2px solid var(--deep,#1f3480);border-radius:var(--hof-r);background:var(--night,#0d1534);color:var(--tx,#f4f5f6);font:inherit;font-size:17px;line-height:1.2;letter-spacing:-.01em;caret-color:var(--light,#7d9aff);-webkit-appearance:none;appearance:none}
.hof-input::placeholder{color:#9aa6cf;opacity:1}
.hof-input:focus,.hof-input:focus-visible{outline:2px solid var(--ice,#d6e0ff);outline-offset:2px;border-color:var(--light,#7d9aff);border-radius:var(--hof-r)}
.hof-input[aria-invalid=true]{border-color:#ef8a7e}
.hof-input[hidden],.hof-sent[hidden]{display:none}
.hof-sent{box-sizing:border-box;display:flex;align-items:center;gap:12px;min-width:0;height:54px;margin:0;padding:0 16px;border-radius:var(--hof-r);background:var(--deep,#1f3480);color:var(--tx,#f4f5f6);font-size:15px;font-weight:550;white-space:nowrap}
.hof-sent-t{min-width:0;overflow:hidden;text-overflow:ellipsis}
.hof-sent b{font-weight:650}
.hof-check{flex:none;width:18px;height:14px;color:var(--ice,#d6e0ff)}
/* The privacy line and any error share one line-high slot, so a message never moves the
   buttons below it. */
.hof-msg{display:grid;margin:8px 0 10px;font-size:13.5px;line-height:1.4;color:var(--tx2,#9aa0a8);text-wrap:pretty}
.hof-msg>*{grid-area:1/1}
.hof[data-err]:not([data-err=""]) .hof-note{visibility:hidden}
.hof-err{color:#ffb3a8}
.hof-msg a{color:var(--tx,#f4f5f6);text-decoration:underline;text-decoration-color:var(--blue,#345cd6);text-decoration-thickness:2px;text-underline-offset:3px}
.hof-send{border:0;font-family:inherit;cursor:pointer}
.hof[data-state=busy] .hof-send{cursor:progress}
/* One label per state. Every send button takes its width from the layout (it fills the
   hero row, the guide card or the dialog), so a label change never resizes it. */
.hof-l>span{display:none}
.hof[data-state=idle] [data-s=idle],.hof[data-state=busy] [data-s=busy],.hof[data-state=sent] [data-s=sent]{display:inline}
.hof-env{flex:none;width:20px;height:15px}
.hof-ts:empty{display:none}

/* Home hero: the send button takes the Download segment's place and fills the row, Buy
   stays its pale-blue segment. After a send it becomes a ghost "Send again". */
.hr-cta .hof-send{flex:1 1 auto;justify-content:center}
/* site.css lifts .btn-mac with an outline on :hover, which sticks after a tap on touch
   screens; the send button keeps it for a mouse only. */
@media (hover:none),(pointer:coarse){.hr-cta .hof-send:hover{outline:none}}
.hof[data-state=sent] .hr-cta .hof-send{background:transparent;color:var(--tx,#f4f5f6);box-shadow:inset 0 0 0 2px var(--blue,#345cd6)}
@media (hover:hover) and (pointer:fine){.hof[data-state=sent] .hr-cta .hof-send:hover{background:var(--night,#0d1534)}}
/* The field and its line make the call to action 90 px taller, so the hero's own fit rule
   (hero.css: headline, room and the whole call to action on one phone screen) counts them. */
@media (max-width:759px){
  @supports (width:round(nearest,1px,1px)){
    .hero.hof-on{--cell:clamp(1.5px,min(round(nearest,100vw / 195,.5px),round(down,(100svh - 308px) / 309,.5px)),4px)}
  }
}
@media (max-width:759px) and (min-resolution:2.5dppx){
  @supports (width:round(nearest,1px,1px)){
    .hero.hof-on{--cell:clamp(1.5px,min(round(nearest,100vw / 195,.5px),round(down,(100svh - 308px) / 309,calc(1px / 3))),4px)}
  }
}

/* Guide call to action: the form takes the trial button's row, under Buy. */
.kx-cta-actions>.hof{flex:1 1 100%;width:100%}
.hof-guide .hof-input{background:var(--s1,#0c0d0f);border-color:#2c3038}
.hof-guide .hof-input:focus{border-color:var(--light,#7d9aff)}
.hof-guide .hof-msg{color:var(--tx-dim,#9aa0a8)}
.hof-guide .hof-send{gap:0}

/* ---- Dialog for the other download buttons. v2 language: black panel, a thick deep-blue
   frame, square pixel corners, no gradients, no hairlines. ---- */
.ho{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,460px);max-width:100%;max-height:calc(100dvh - 24px);padding:0;border:0;background:transparent;color:var(--tx,#f4f5f6);overflow:visible}
.ho::backdrop{background:rgba(0,0,0,.72)}
.ho-panel{position:relative;margin:0 12px calc(12px + env(safe-area-inset-bottom));padding:28px 22px 22px;background:#000;border:3px solid var(--deep,#1f3480);box-shadow:6px 6px 0 var(--night,#0d1534);font-family:"Geist",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;font-size:16px;line-height:1.5;letter-spacing:-.011em;-webkit-font-smoothing:antialiased}
.ho-title{margin:0 44px 18px 0;font-size:24px;line-height:1.15;font-weight:700;letter-spacing:-.035em;text-wrap:balance}
.ho-x{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:44px;height:44px;border:0;background:transparent;color:var(--tx2,#9aa0a8);cursor:pointer;transition:color .15s steps(2),background-color .15s steps(2)}
.ho-x svg{width:14px;height:14px;shape-rendering:crispEdges}
.hof-dialog{--hof-r:0}
.hof-dialog .hof-input{background:var(--n1,#131417)}
.ho-send{display:flex;align-items:center;justify-content:center;width:100%;height:54px;border:0;border-radius:0;background:var(--blue,#345cd6);color:#fff;font:inherit;font-size:17px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;cursor:pointer;box-shadow:inset 0 -4px 0 var(--deep,#1f3480);transition:background-color .15s steps(2)}
.ho-send:active{transform:translateY(1px)}
.hof[data-state=sent] .ho-send{background:transparent;box-shadow:inset 0 0 0 2px var(--blue,#345cd6)}
@media (hover:hover){
  .ho-x:hover{color:#fff;background:var(--night,#0d1534)}
  .ho-send:hover{background:var(--sheen,#5476e8)}
}
.ho :focus-visible{outline:2px solid var(--light,#7d9aff);outline-offset:2px;border-radius:0}
@media (prefers-reduced-motion:reduce){.ho-x,.ho-send{transition:none}}
