/* Panels: the home page, /pair/ and /how-it-works/ shown one screen at a time (js/deck.js, docs/SITE.md "Panels").
   Everything here applies only while html.deck is set; without it (no JavaScript, a screen too small to fit the panels,
   print) the sections stack as ordinary page content. No keyframes here: motion is in deck-motion.css. */
@media screen {
  html.deck-pre #main, html.deck-pre .site-footer { visibility: hidden; }
  .deck-ui, .deck-rail, .deck-steps, .deck-menu-btn { display: none; }

  html.deck, html.deck body { height: 100%; overflow: hidden; }
  html.deck body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overscroll-behavior: none; }
  html.deck .site-header { flex: none; position: relative; z-index: 30; }
  html.deck .site-header .wrap { padding-top: .5rem; padding-bottom: .5rem; max-width: 90rem; }
  html.deck .deck-stage { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; overflow: clip; touch-action: pinch-zoom; background: var(--ground); --deck-ui: 3.5rem; }
  html.deck main#main { display: contents; }
  html.deck [data-off] { display: none !important; }

  /* header: a Menu button when the links would wrap */
  html.deck-menu .site-header .wrap { flex-wrap: nowrap; justify-content: space-between; gap: .5rem; }
  html.deck-menu .deck-menu-btn { display: inline-flex; align-items: center; margin-left: auto; }
  html.deck-menu .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; width: auto; margin: 0; padding: .5rem 1.25rem 1rem; flex-direction: column; align-items: stretch; gap: 0; background: var(--panel); border-bottom: 3px double var(--border-strong); max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem); overflow: auto; }
  html.deck-menu-open .site-nav { display: flex; }
  html.deck-menu .site-nav .theme-toggle { margin-top: .5rem; align-self: flex-start; }

  /* a panel */
  html.deck .deck-panel { position: absolute; inset: 0; margin: 0; box-sizing: border-box; display: flex; padding: .75rem 0 calc(var(--deck-ui) + .25rem); overflow: hidden; visibility: hidden; transform: translate3d(0, 100%, 0); border: 0; }
  html.deck .deck-panel.is-prev { transform: translate3d(0, -100%, 0); }
  html.deck .deck-panel.is-active { visibility: visible; transform: none; }
  html.deck .deck-panel:focus, html.deck .deck-panel h1:focus, html.deck .deck-panel h2:focus { outline: none; }
  html.deck .site-footer.deck-panel { margin: 0; font-size: .9375rem; }
  html.deck .band.alt.deck-panel { border-top: 0; border-bottom: 0; }
  html.deck .deck-panel > .wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
  html.deck .deck-panel > .wrap.split { display: grid; align-content: center; align-items: center; gap: clamp(1.25rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  html.deck .deck-panel > .wrap.narrow { max-width: 48rem; }
  html.deck .deck-panel .split > * { min-width: 0; min-height: 0; }

  /* type, scaled to the screen but never below a readable size */
  html.deck .dz h1 { font-size: clamp(1.875rem, min(4.6vw, 7.4vh), 4.5rem); }
  html.deck .dz h2 { font-size: clamp(1.625rem, min(4.6vw, 6.4vh), 3.5rem); }
  html.deck .dz .step-h2 { font-size: clamp(1.5rem, min(4.2vw, 5.6vh), 2.75rem); }
  html.deck .dz h3 { font-size: clamp(1.0625rem, min(2.6vw, 2.8vh), 1.3125rem); }
  html.deck .dz .eyebrow { margin-bottom: clamp(.4rem, 1.6vh, 1rem); font-size: clamp(.75rem, 1.7vh, .8125rem); }
  html.deck .dz .lead { font-size: clamp(1rem, min(2.3vw, 2.9vh), 1.5rem); line-height: 1.4; }
  html.deck .dz h1 + .lead, html.deck .dz h2 + .lead { margin-top: clamp(.5rem, 1.6vh, 1rem); }
  html.deck .dz .lead + .lead { margin-top: clamp(.5rem, 1.6vh, 1rem); }
  html.deck .dz .mut, html.deck .dz .sheet p { font-size: clamp(.9375rem, 2.1vh, 1rem); line-height: 1.45; }
  html.deck .dz .stack { margin-top: clamp(.75rem, 3vh, 2.25rem); }
  html.deck .dz .cap { margin-top: clamp(.5rem, 1.6vh, 1rem); }
  html.deck .dz .cta-row { margin-top: clamp(1rem, 3.4vh, 2.25rem); }
  html.deck .dz .dhero .lead { margin-top: clamp(.75rem, 2.6vh, 1.75rem); }
  html.deck .dz .sheet { padding: clamp(.75rem, 2.2vh, 1.5rem) clamp(.9rem, 2vw, 1.25rem); }
  html.deck .dz .sheet h3 { margin-bottom: .35rem; }
  html.deck .dz .bignum { font-size: clamp(2.75rem, min(12vw, 16vh), 9rem); }
  html.deck .dz .numlabel { margin-bottom: .35rem; }
  html.deck .dz .asks-strip { margin-top: clamp(.75rem, 3vh, 3.5rem); padding: clamp(.5rem, 2vh, 1.5rem) 0; font-size: clamp(.9375rem, min(2vw, 2.6vh), 1.25rem); gap: .5rem 1.75rem; }
  html.deck .dz .asks-strip li { gap: 1.75rem; }
  html.deck .dz .q { font-size: clamp(.9375rem, 2.2vh, 1.0625rem); }
  html.deck .dz .btn:not(.secondary):not([disabled]):not([aria-disabled="true"]), html.deck .dz .btn.secondary, html.deck .dz .btn[disabled] { min-height: 2.75rem; }
  html.deck .dz .closing h2 { font-size: clamp(2rem, min(8vw, 10vh), 6rem); }
  html.deck .dz .closing .lead { margin-top: clamp(.75rem, 2vh, 1.5rem); }
  html.deck .dz .kv { margin-top: clamp(.75rem, 3vh, 2rem); }
  html.deck .dz .kv dd { margin-bottom: .75rem; }

  /* sequences (steps) and their step buttons */
  html.deck .deck-seq { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  html.deck .deck-seq > .step-d { flex: 1 1 auto; min-height: 0; margin: 0; }
  html.deck .step-d + .step-d { margin-top: 0; }
  html.deck .deck-steps { display: flex; flex-wrap: wrap; gap: .25rem .5rem; justify-content: flex-start; margin: clamp(.5rem, 1.6vh, 1rem) 0 clamp(.25rem, 1.2vh, .75rem); }
  html.deck .deck-step { font: inherit; font-size: .875rem; font-weight: 600; color: var(--ink2); background: transparent; border: 1px solid var(--border-strong); border-radius: 3px; min-height: 44px; min-width: 44px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; }
  html.deck .deck-step:hover { background: var(--raised); color: var(--ink); }
  html.deck .deck-step[aria-current="step"] { background: var(--sf); border-color: var(--sf); color: var(--on-sf); }
  html.deck .deck-step-n { font-family: var(--mono); }
  html.deck .deck-step-t { display: none; }
  html.deck .deck-step[aria-current="step"] .deck-step-t { display: inline; }
  @media (min-width: 40rem) { html.deck .deck-step-t { display: inline; } }
  html.deck .deck-panel > .deck-steps { position: absolute; left: 1.25rem; bottom: calc(var(--deck-ui) + .25rem); margin: 0; }

  /* two columns on a wide screen, one on a narrow one */
  @media (max-width: 55.99rem) {
    html.deck .deck-panel > .wrap.split, html.deck .deck-panel .split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: clamp(.5rem, 2vh, 1.25rem); }
    html.deck .deck-panel .split:has(> .deck-vis:last-child) { grid-template-rows: auto minmax(0, 1fr); }
    html.deck .deck-panel .split:has(> .deck-vis:first-child) { grid-template-rows: minmax(0, 1fr) auto; }
    html.deck .deck-panel .split.flip > :first-child { order: 0; }
    html.deck .dz .split.top { align-items: start; }
  }

  /* pictures give way before words do */
  html.deck .deck-vis { display: flex; align-items: center; justify-content: center; align-self: stretch; min-height: min(7rem, 22vh); }
  html.deck .deck-vis > * { max-width: 100%; max-height: 100%; }
  html.deck .shot { border: 0; background: none; border-radius: 0; display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; max-width: none; }
  html.deck .shot img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--card); }
  html.deck .shot.narrow-shot, html.deck .shot.mid-shot { max-width: none; }
  html.deck .for-dark { display: none; }
  @media (prefers-color-scheme: dark) { html.deck:not([data-theme="light"]) .for-light { display: none; } html.deck:not([data-theme="light"]) .for-dark { display: block; } }
  html.deck[data-theme="dark"] .for-light { display: none; } html.deck[data-theme="dark"] .for-dark { display: block; }
  html.deck[data-theme="light"] .for-dark { display: none; } html.deck[data-theme="light"] .for-light { display: block; }
  html.deck .deck-vis .stage { flex: 0 1 auto; align-self: stretch; width: auto; height: auto; aspect-ratio: 620 / 420; max-width: 100%; margin: 0; }
  html.deck .stage .pico { width: 9%; height: auto; aspect-ratio: 30 / 48; min-width: 0; }
  html.deck .stage .tile i { margin: 4% 6%; height: 4%; }
  html.deck .stage .tile i:first-child { height: 6%; }
  html.deck .deck-vis .panel { max-height: 100%; }
  html.deck .phones { height: 100%; width: 100%; justify-content: center; flex-wrap: nowrap; gap: clamp(.75rem, 3vw, 1.75rem); align-items: center; }
  html.deck .phones .ph { height: 100%; width: auto; aspect-ratio: 13 / 25; max-height: 30rem; flex: 0 1 auto; display: flex; container-type: size; }
  html.deck .phones .ph .ps { min-height: 0; flex: 1 1 auto; font-size: clamp(.5rem, 3.3cqh, .8125rem); padding: 4cqh 5cqw; gap: 2.2cqh; overflow: hidden; border-radius: 6cqw; }
  html.deck .phones .ph .sw { padding: 1.8cqh 4cqw; border-radius: 4cqw; gap: 2cqw; }
  html.deck .phones .ph .sw .small { font-size: clamp(.4375rem, 2.6cqh, .6875rem); }
  html.deck .phones .ph .pill { min-height: 0; padding: .8cqh 4cqw; font-size: clamp(.5rem, 3cqh, .8125rem); }
  html.deck .phones .ph .tg { width: 8cqw; height: 4.6cqh; min-width: 22px; min-height: 13px; }
  html.deck .phones .ph .tg::after { top: 12%; left: 8%; width: 40%; height: 76%; }
  html.deck .phones .ph .tg.on::after { left: 52%; }
  html.deck .phones .ph .ps .ttl { font-size: clamp(.6875rem, 4.4cqh, 1.25rem); }
  html.deck .deck-vis .illus { aspect-ratio: auto; height: 100%; width: 100%; padding: .75rem; }
  html.deck .deck-vis .illus svg { max-height: 100%; width: auto; max-width: 100%; }
  html.deck .mark-still { align-items: center; }
  html.deck .bigmark { width: auto; height: min(11rem, 100%); max-width: 50vw; margin: 0 auto; }
  html.deck .closing .mark-still .britos-mark { width: auto; height: clamp(3rem, 12vh, 6rem); margin: 0 0 clamp(.5rem, 2vh, 1.5rem); }
  html.deck .states { gap: .75rem; margin-top: clamp(.5rem, 2vh, 1.25rem); }
  html.deck .states > div { padding: .6rem .9rem; }
  html.deck .states dd, html.deck .states dt { font-size: .9375rem; }
  html.deck .place svg { width: clamp(2.5rem, 7vh, 4.5rem); margin-bottom: .5rem; }

  /* the hero: laptop with its ask bar, mark, approval card */
  html.deck .device { height: 100%; padding: 0; display: flex; align-items: center; justify-content: center; position: relative; }
  html.deck .device .lap { max-height: 100%; width: min(100%, calc((100vh - 15rem) * 1.5)); margin: 0; }
  html.deck .device .lapbase { display: none; }
  html.deck .device .hero-demo { top: 0; left: 0; }
  html.deck .device .approve { width: 44%; right: 0; bottom: 0; height: auto; display: block; }
  html.deck .device .approve img { width: 100%; height: auto; max-height: none; }
  @media (max-width: 55.99rem), (max-height: 44rem) { html.deck .device .approve { display: none; } }

  html.deck .grid { --gap: clamp(.6rem, 2vh, 1.25rem); }

  /* controls: back, progress, next */
  html.deck .deck-ui { display: flex; align-items: center; gap: .75rem; position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: var(--deck-ui); padding: 0 1.25rem; box-sizing: border-box; background: transparent; pointer-events: none; max-width: 68rem; margin: 0 auto; }
  html.deck .deck-ui > * { pointer-events: auto; }
  html.deck .deck-btn { font: inherit; font-weight: 600; font-size: .9375rem; color: var(--ink); background: var(--card); border: 1px solid var(--border-strong); border-radius: 3px; min-height: 44px; min-width: 5.25rem; padding: 0 .9rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
  html.deck .deck-btn:hover:not([disabled]) { background: var(--raised); }
  html.deck .deck-btn[disabled] { opacity: .4; cursor: default; }
  html.deck .deck-next:not([disabled]) { background: var(--sf); border-color: var(--sf); color: var(--on-sf); }
  html.deck .deck-prog { flex: 1 1 auto; display: flex; align-items: center; gap: .6rem; min-width: 0; }
  html.deck .deck-track { flex: 1 1 auto; height: 4px; border-radius: 2px; background: var(--border-strong); position: relative; overflow: hidden; }
  html.deck .deck-track i { position: absolute; inset: 0; background: var(--sf); transform-origin: left center; transform: scaleX(calc(.04 + .96 * var(--deck-pos, 0))); }
  html.deck .deck-count { font-family: var(--mono); font-size: .8125rem; color: var(--ink2); white-space: nowrap; }
  html.deck .deck-btn:focus-visible, html.deck .deck-step:focus-visible, html.deck .deck-dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  html.deck .deck-night .deck-count { color: #C8B9AF; }
  html.deck .deck-night .deck-dot i { border-color: #C8B9AF; }
  html.deck .deck-night .deck-dot[aria-current="true"] i { border-color: var(--sf); }
  @media (max-width: 22rem) { html.deck .deck-count { display: none; } html.deck .deck-btn { min-width: 4.25rem; padding: 0 .6rem; } }

  /* section dots on a big screen */
  html.deck.deck-rail-on .deck-rail { display: flex; flex-direction: column; position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); z-index: 5; }
  html.deck .deck-dot { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; cursor: pointer; }
  html.deck .deck-dot i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink2); box-sizing: border-box; display: block; }
  html.deck .deck-dot[aria-current="true"] i { background: var(--sf); border-color: var(--sf); }
  html.deck.deck-rail-on .deck-ui { padding-right: 3.25rem; }
  html.deck.deck-rail-on .deck-panel > .wrap { padding-right: 1.5rem; }

  /* scroll reveals are for the stacked page */
  html.deck .rv { animation: none !important; opacity: 1 !important; transform: none !important; }
}
@media print {
  .deck-ui, .deck-rail, .deck-steps, .deck-menu-btn, .deck-live { display: none !important; }
  html.deck-pre #main, html.deck-pre .site-footer { visibility: visible; }
}
