.session [hidden] { display: none !important; }
.session-poster { width: 100%; height: auto; display: block; }
.duo {
  position: relative;
  width: 100%;
  aspect-ratio: 924 / 660;
  container-type: inline-size;
  background: url("./demo/duo-frame.png") center / 100% 100% no-repeat;
  isolation: isolate;
  font-family: -apple-system, BlinkMacSystemFont, "DM Sans", sans-serif;
  color: #fff;
  color-scheme: dark;
}
.duo::before { content: ""; position: absolute; inset: 1%; border-radius: 5.5% / 7.7%; background: #0a1013; z-index: -1; }
.duo-screen { container-type: inline-size; position: absolute; inset: 2.58% 1.84%; overflow: hidden; border-radius: 4.8% / 6.8%; background: black; }
/* Insets follow the display opening in each piece of hardware artwork. */
.session[data-platform="ipad"] .duo {
  aspect-ratio: 3000 / 2300; background-image: url("./demo/ipad-landscape.webp");
}
.session[data-platform="ipad"] .duo-screen { inset: 5.13% 4.13%; border-radius: 1.7% / 2.3%; }
.session[data-platform="mac"] .duo {
  aspect-ratio: 1376 / 1027; background-image: url("./demo/macbook-proled.webp");
}
.session[data-platform="mac"] .duo-screen {
  inset: 1.947% 1.453% 15.287% 1.453%; border-radius: 1.8% / 2.7%;
}
.session[data-platform="mac"] .duo-screen::after {
  content: ""; position: absolute; top: 0.824%; left: 48.054%;
  width: 3.892%; height: 3.176%; border-radius: 999px;
  background: #090a0a; pointer-events: none;
}
.session[data-platform="tv"] .duo {
  aspect-ratio: 1400 / 880; background-image: url("./demo/television.webp");
}
.session[data-platform="tv"] .duo-screen { inset: 2.16% 1.5% 11.7%; border-radius: 2px; }
.session[data-platform="vision"] .duo {
  aspect-ratio: 862 / 598; background-image: url("./demo/spatial-window.webp");
  border-radius: 2%; overflow: hidden;
}
.session[data-platform="vision"] .duo-screen {
  inset: 16.39% 14.27% 11.54%; border-radius: 2.2% / 3.2%;
  box-shadow: 0 0 0 1px #ffffff48, 0 3px 16px #18191040;
}
.session:not([data-platform="iphone"]) .duo::before { display: none; }
.session button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.duo button { background: transparent; border: 0; padding: 0; }
.duo button:focus-visible, .duo textarea:focus-visible { outline: 2px solid #ddff55; outline-offset: -2px; }
.duo button:disabled { opacity: .5; cursor: default; }
.mac-desktop { position: absolute; inset: 0; overflow: hidden; background: #18343b; }
.mac-surface { width: 100%; height: 100%; position: relative; overflow: hidden; background: url("./demo/golden-gate-sunset.webp") center / cover; transform-origin: var(--pointer-x, 50%) var(--pointer-y, 50%); }
.mac-surface.zoomed { transform: scale(1.4); }
.mac-bar, .window-header, .lights, .mac-dock, .remote-hud, .demo-keys .key-row { display: flex; align-items: center; }
.mac-bar { height: 6%; min-height: 15px; padding-inline: 4.5%; gap: 1.25cqw; background: #15343fce; font-size: clamp(8px, 1.6cqw, 14px); }
.mac-bar button { height: 100%; padding-inline: .4cqw; }
.mac-bar button:hover, .mac-bar button[aria-expanded="true"] { background: #ffffff24; }
.mac-bar button:first-child { font: bold 1.27em -apple-system, sans-serif; }
.mac-bar .app-name { font-weight: 650; }
.mac-time { margin-left: auto; white-space: nowrap; font-size: .92em; }
.mac-window { position: absolute; left: 23%; top: 29%; width: 54%; height: 42%; overflow: hidden; border-radius: 2cqw; background: #292824; box-shadow: 0 2cqw 5cqw #041a2470, inset 0 0 0 1px #ffffff19; display: flex; flex-direction: column; }
.mac-window.maximized { left: 2% !important; top: 8.5% !important; width: 96%; height: 76%; }
.window-header { padding: .65cqw 1.4cqw; min-height: 4.3cqw; gap: 1.45cqw; cursor: grab; touch-action: none; user-select: none; }
.window-header:active { cursor: grabbing; }
.lights { gap: .6cqw; }
.lights button { width: 2cqw; height: 2.8cqw; padding: 0; position: relative; }
.lights button::after { content: ""; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: 1.2cqw; height: 1.2cqw; border-radius: 100%; background: #ff6058; }
.lights button:nth-child(2)::after { background: #ffbf3b; }
.lights button:nth-child(3)::after { background: #28c847; }
.window-title { font-size: clamp(8px,1.58cqw,15px); line-height: 1.1; color: #f0f0ed; }
.window-header .finder-back { font-size: 1.3rem; line-height: .9; }
.window-body { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.finder-grid { display: flex; gap: 1.2cqw; padding: 1.6cqw 1.2cqw .8cqw; }
.finder-grid button { display: flex; flex-direction: column; align-items: center; gap: 1.1cqw; padding: .5cqw; width: 12.6cqw; border-radius: 1cqw; font-size: clamp(7px,1.5cqw,13px); }
.finder-grid button:hover, .finder-grid button:focus-visible { background: #ffffff1a; }
.folder-icon { position: relative; width: 7.1cqw; height: 4.6cqw; margin-top: .8cqw; border-radius: .5cqw; background: linear-gradient(#6fd9fc,#36aee0); box-shadow: inset 0 1px 0 #a9e8ff; }
.folder-icon::before { content: ""; position: absolute; left: 0; top: -.65cqw; width: 44%; height: 1.1cqw; background: #5fc8ef; border-radius: .55cqw .9cqw 0 0; }
.finder-grid svg { width: 7cqw; height: 7cqw; color: #e7ede8; }
.finder-grid.as-list { flex-direction: column; padding: .5cqw 1.4cqw; gap: 0; }
.finder-grid.as-list button { flex-direction: row; padding: .9cqw; width: 100%; }
.as-list .folder-icon { width: 3.4cqw; height: 2.4cqw; margin: .5cqw; }
.as-list svg { width: 3.3cqw; height: 3.3cqw; }
.demo-note { width: 100%; height: 100%; resize: none; border: 0; outline: 0; background: #302f29; color: #fbfaf4; font: 450 clamp(12px,2.2cqw,19px)/1.5 -apple-system,sans-serif; padding: 1.5cqw 2cqw; }
.demo-photo { width: 100%; height: 100%; display: block; object-fit: contain; }
.mac-dock { position: absolute; bottom: 2%; left: 50%; transform: translateX(-50%); padding: .55cqw .8cqw; gap: .6cqw; border-radius: 1.9cqw; }
.mac-dock, .remote-hud, .demo-popover, .demo-keys { background: #193a43eb; border: 1px solid #ffffff40; box-shadow: 0 .5cqw 1.8cqw #00151c38; }
@supports (backdrop-filter: blur(12px)) {
  .mac-dock, .remote-hud, .demo-popover, .demo-keys { background: #14343ad9; backdrop-filter: blur(16px); }
}
.mac-dock button { display: grid; place-items: center; border-radius: 18%; }
.mac-dock button:hover { background: #ffffff22; }
.mac-dock img { display: block; width: 4.1cqw; height: 4.1cqw; min-width: 16px; min-height: 16px; }
.demo-pointer { position: absolute; width: clamp(10px,2.1cqw,20px); height: auto; top: var(--pointer-y,56%); left: var(--pointer-x,50%); pointer-events: none; }
@media (pointer: fine) {
  .mac-desktop.draw-pointer:hover, .mac-desktop.draw-pointer:hover * { cursor: none; }
}
.demo-credential { padding: 2cqw 3cqw; display: grid; gap: .4em; color: #f3f3ee; font-size: clamp(10px,2cqw,18px); }
.demo-credential output { padding: .4em .65em; background: #44443e; border: 1px solid #787971; border-radius: .4em; letter-spacing: .15em; }
.typing .remote-hud { top: auto !important; bottom: calc(var(--key-height) + 21px) !important; }
/* The Duo capture is 951 points across: three 46-point cells, each with a 24-point glyph. */
.remote-hud {
  --cell: clamp(32px, 4.66cqw, 54px);
  z-index: 3; position: absolute; bottom: 6.88%; right: 1.26%;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) var(--cell);
  width: calc(3 * var(--cell)); height: var(--cell); padding: 0; border: 0; border-radius: 999px;
  background: #254d59cb; box-shadow: inset 0 0 0 1px #ffffff26, 0 2px 9px #00131b33;
  user-select: none; touch-action: none;
}
.remote-hud.is-collapsed { width: var(--cell); }
.remote-hud button {
  display: grid; place-items: center; position: relative; min-width: 0;
  height: var(--cell); border-radius: 999px;
}
.remote-hud svg { width: calc(var(--cell) * 24 / 46); height: calc(var(--cell) * 24 / 46); }
.remote-hud .collapse-icon { transform: rotate(0deg); }
.remote-hud.is-collapsed .collapse-icon { transform: rotate(180deg); }
.remote-hud.is-collapsed button[inert] { visibility: hidden; opacity: 0; }
.remote-hud button:hover, .remote-hud button[aria-pressed="true"] { color: #ddff55; background: #ffffff15; }
.remote-hud button:active svg { scale: .9; }
.remote-hud span {
  position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  margin-left: var(--label-shift,0px);
  pointer-events: none; opacity: 0; white-space: nowrap; color: #fff; background: #09242bf2;
  border-radius: 4px; padding: 2px 3px; font: 550 clamp(9px,1.08cqw,12px)/1.15 -apple-system,sans-serif;
}
.remote-hud button:first-child span { left: calc(50% - clamp(0px,47px - var(--cell),15px)); }
.remote-hud:not(.is-collapsed) button:last-child span { left: calc(50% + clamp(0px,37px - var(--cell),5px)); }
.remote-hud:hover span, .remote-hud:focus-within span { opacity: 1; }
.duo-screen.controls-open .remote-hud { opacity: 0; pointer-events: none; }
.demo-popover {
  --row: clamp(25px, 4.26cqw, 52px);
  --section-space: clamp(2px, 1.01cqw, 12px);
  z-index: 5; position: absolute; width: clamp(155px,25.3cqw,310px); max-height: calc(100% - 8px);
  overflow: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin;
  padding: clamp(4px,.92cqw,11px) clamp(6px,1.25cqw,15px);
  border: 1px solid #ffffff16; border-radius: clamp(16px,3.05cqw,37px);
  background: #253e46f5; box-shadow: 0 4px 20px #00151d44;
  transform-origin: var(--origin-x, 80%) var(--origin-y, 90%);
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .demo-popover {
    background: linear-gradient(130deg,#323231a8,#163a41bb);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
    backdrop-filter: blur(22px) saturate(1.25);
  }
}
.demo-popover[inert] { pointer-events: none; }
.demo-popover button {
  display: flex; align-items: center; gap: clamp(8px,1.25cqw,15px);
  width: 100%; min-height: var(--row); border-radius: clamp(7px,1.2cqw,14px);
  padding: 2px clamp(8px,1.55cqw,18px); text-align: left;
  font: 400 clamp(12px,1.73cqw,21px)/1.16 -apple-system,BlinkMacSystemFont,sans-serif;
}
.menu-divider {
  height: 1px; background: #ffffff22; margin: var(--section-space) clamp(6px,1.1cqw,13px);
}
.demo-popover button:hover, .demo-popover button:focus-visible { background: #ffffff17; }
.demo-popover button:active { background: #ffffff2a; }
.demo-popover svg { width: clamp(15px,2.12cqw,26px); height: clamp(15px,2.12cqw,26px); color: #ddff55; flex: none; }
.demo-popover .trail { margin-left: auto; width: .95em; height: .95em; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .remote-hud { transition: width 230ms cubic-bezier(.22,.82,.22,1), opacity 125ms ease-out; }
  .remote-hud button { transition: opacity 120ms ease-out, background-color 120ms; }
  .remote-hud svg { transition: transform 230ms cubic-bezier(.22,.82,.22,1), scale 120ms; }
  .remote-hud span { transition: opacity 120ms ease-out, translate 160ms ease-out; }
  .remote-hud:not(:hover):not(:focus-within) span { translate: 0 -2px; }
}
@media (hover: none) {
  .remote-hud { --cell: max(44px,4.66cqw); }
  .remote-hud span { opacity: 1; }
}
@container (max-width: 460px) {
  .remote-hud { bottom: max(21px,6.88%); }
  .demo-popover { --section-space: 2px; }
}
.demo-keys { position: absolute; z-index: 4; inset: auto 1% 1%; padding: 1cqw; border-radius: 12px; }
.key-row { justify-content: center; gap: .45cqw; margin: .5cqw 0; }
.key-row button { padding: .5cqw; flex: 1; max-width: 12%; border-radius: 4px; background: #ffffff25; min-height: 21px; font-size: clamp(10px,2cqw,16px); }
.key-row button:hover, .key-row button:active { background: #60816b; }
.key-row button[data-key="Space"] { max-width: 43%; }
.key-row button[data-key="Done"] { background: #ddff55; color: #002233; }
.demo-offline { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .65rem; background: #102e38; font-size: clamp(14px,3cqw,24px); }
.demo-offline img { border-radius: 11px; }
.demo-offline button { background: #ddff55; color: #002233; border-radius: .5rem; padding: .45rem .9rem; font-size: .85em; }
.session figcaption { text-align: center; margin: .55rem 0 0; }
.session figcaption button { display: inline-flex; align-items: center; gap: .4rem; border: 0; padding: .4rem .65rem; background: transparent; color: var(--muted); font: 500 .82rem var(--sans); }
.session figcaption button:hover { color: var(--ink); text-decoration: underline; }
.session figcaption svg { width: 14px; height: 14px; }
.demo-dialog { border: 0; border-radius: 16px; padding: 1rem; color: var(--ink); background: var(--paper); max-width: 98vw; max-height: 98dvh; }
.demo-dialog::backdrop { background: #00151de0; }
.demo-dialog .session { width: min(85rem, 91vw, calc((96dvh - 5rem) * 1.4)); max-width: none; }
@container (max-width: 360px) {
  .remote-hud { bottom: auto; top: 11%; }

}
