/* Application replicas always use the native light window, including on a dark site. */
.demo-frame { container: replica / inline-size; min-width: 0; width: 100%; max-width: 720px; margin-inline: auto; }
.demo-frame [hidden] { display: none !important; }
.demo-stage {
  position: relative; isolation: isolate; overflow: hidden; color-scheme: light;
  border: 1px solid rgb(148 163 184 / .72); border-radius: 1rem;
  background: linear-gradient(180deg, #f0f6ff, #f8fafc); color: #0f172a;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 18px 48px rgb(15 23 42 / .15), 0 2px 6px rgb(15 23 42 / .06);
}
.demo-stage strong { color: inherit; }
.demo-stage button { border: 0; padding: 0; background: transparent; }
.demo-stage :is(button, [role="option"]) { touch-action: manipulation; }
.demo-stage :focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.demo-stage .icon { display: block; }
/* Keep the window and the open dialog in the same grid cell. Either can set the
   intrinsic height, so a wrapped translation never pushes the footer out of view. */
.demo-stage[data-stage] { display: grid; grid-template-columns: minmax(0, 1fr); }
.demo-stage > :is([data-panel], [data-auth-shell], .demo-overlay) { grid-area: 1 / 1; min-width: 0; }
.share-copy > span, .demo-toast > span { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }

.hero-preview { user-select: none; }
.hero-preview > .demo-stage { pointer-events: none; }

/* One projected plane for drawing and hit testing. The idle drift keeps its
   phase; pointer motion adds small offsets to the same resting angles. */
@property --pointer-pitch { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --pointer-yaw { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.clipboard-window { width: var(--clipboard-window-width); --window-lens: perspective(1100px); }
.clipboard-window > .demo-stage {
  transform-origin: center;
  transform: var(--window-lens) rotateX(calc(3.5deg + var(--pointer-pitch, 0deg))) rotateY(calc(-7deg + var(--pointer-yaw, 0deg)));
  box-shadow: var(--shadow-window);
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-composition: add) {
    .clipboard-window > .demo-stage { animation: clipboard-window-float 7s ease-in-out infinite; animation-composition: add; }
  }
}
@keyframes clipboard-window-float {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  50% { transform: translateY(-4px) rotateX(.5deg) rotateY(1deg); }
}

/* Top bar and category strip use replica width, not landing-page breakpoints. */
.aw__topbar, .aw__brand, .aw__search, .aw__tools, .aw__rail, .aw__cat { display: flex; align-items: center; }
.aw__topbar { position: relative; justify-content: space-between; height: 3.75rem; gap: .75rem; padding: 0 1rem; border-bottom: 1px solid #e2e8f0; background: rgb(255 255 255 / .82); }
.aw__brand { flex: none; gap: .5rem; font-size: 1rem; font-weight: 750; }
.aw__search { position: absolute; left: 50%; transform: translateX(-50%); gap: .5rem; width: clamp(10.625rem, 20cqi, 14.875rem); height: 2.25rem; padding-inline: .6875rem; border: 1px solid #dbe3ee; border-radius: .625rem; background: #f8fafc; color: #64748b; }
.aw__tools { gap: .45rem; color: #475569; }
.aw__tools > * { padding: .42rem; box-sizing: content-box; }
.aw__tools > .is-active { border-radius: .5rem; background: #eff6ff; color: #2563eb; }
.aw__rail { gap: .375rem; padding: .375rem .75rem; border-bottom: 1px solid #e2e8f0; background: rgb(255 255 255 / .74); overflow: hidden; }
.aw__cat { flex: 0 1 auto; min-width: 0; gap: .375rem; white-space: nowrap; padding: .25rem .625rem; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #475569; font-size: .8125rem; }
.aw__cat > span, .aw__card header strong, .aw__card time, .aw__tag > span, .aw__filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aw__cat.is-active { border-color: #3b82f6; color: #2563eb; background: #ebf3ff; }
.aw__cat b { display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #2563eb; color: #fff; font-size: .5625rem; box-shadow: inset 0 0 0 1px #ffffff80; }
.aw__newcat { margin-left: auto; }
@container replica (width < 560px) {
  .aw__topbar { height: auto; flex-wrap: wrap; gap: .5rem; padding: .5rem .75rem .75rem; }
  .aw__search { position: static; order: 1; flex: 0 0 100%; transform: none; }
}

/* Desktop ClipCard: two columns of 8.75rem, or 7rem rows below 320 logical px. */
.aw__list { position: relative; min-height: 20.25rem; }
.aw__empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #64748b; }
.aw__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 8.75rem; gap: .75rem; padding: 1rem; }
.aw__card, .auth-account { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid #e2e8f0; border-radius: .75rem; background: rgb(255 255 255 / .92); transition: border-color 160ms, background-color 160ms, box-shadow 160ms; }
.aw__card { gap: .3rem; padding: .625rem .625rem 1.75rem; cursor: default; }
.aw__rename { position: absolute; z-index: 2; inset: 2.1rem .625rem auto; min-width: 0; border: 1px solid #bfdbfe; border-radius: .45rem; background: #fff; padding: .3rem .5rem; color: #0f172a; font-weight: 650; }
.aw__card[data-raised] { z-index: 2; }
:is(.aw__card, .auth-account)[aria-selected="true"], .aw__card.is-selected { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgb(37 99 235 / .2), 0 10px 24px rgb(37 99 235 / .12); }
.aw__card:is([aria-selected="true"], .is-selected)::before { content: ""; position: absolute; inset: -1px; border: 2px solid rgb(37 99 235 / .86); border-radius: inherit; pointer-events: none; }
.aw__card header, .aw__card footer { display: flex; align-items: center; min-width: 0; gap: .45rem; }
.aw__card header { font-size: .75rem; padding-right: 1rem; line-height: 1.15rem; color: #334155; }
.aw__card header strong { font-weight: 700; }
.aw__card header > i { flex: none; width: .25rem; height: .25rem; border-radius: 50%; background: #cbd5e1; }
.aw__card time { color: #64748b; }
.aw__type-icon { color: #64748b; }
[data-clip="image"] .aw__type-icon { color: #0891b2; }
[data-clip="link"] .aw__type-icon { color: #0284c7; }
.aw__pin { color: #0f766e; flex: none; }
.aw__pin .icon { width: .875rem; height: .875rem; }
.aw__thumb { flex: 1; min-height: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: .25rem; }
.aw__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 56%; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .aw__thumb img { transition: transform 160ms ease-out; }
  .aw__thumb:hover img { transform: scale(1.5); }
}
.aw__excerpt { min-height: 0; margin: 0; overflow: hidden; overflow-wrap: anywhere; color: #64748b; font-size: .875rem; line-height: 1.25rem; }
.aw__filename { margin-block: auto; padding-right: 16%; font-weight: 650; color: #334155; }
.aw__watermark { position: absolute; bottom: .25rem; right: .35rem; width: min(2.25rem, 20%); height: auto; opacity: .25; }
.aw__card footer { position: absolute; left: .625rem; right: .625rem; bottom: .625rem; justify-content: space-between; font-size: .71rem; line-height: 1; color: #64748b; }
.aw__tag { display: flex; align-items: center; min-width: 0; max-width: 55%; gap: .35rem; padding: .25rem .35rem; border-radius: .3125rem; background: #f1f5f9; font: 700 .67rem/1 var(--font-mono); color: #334155; }
.aw__tag i { flex: none; width: .5rem; height: .5rem; border-radius: 2px; background: #2563eb; }
.demo-stage .aw__more { display: grid; place-items: center; position: absolute; right: .32rem; top: .32rem; width: 1.45rem; height: 1.45rem; border: 1px solid #dbe3ee; border-radius: .4rem; background: #fff; color: #475569; cursor: pointer; opacity: 0; }
.aw__card:focus-within .aw__more, .aw__card[aria-expanded="true"] .aw__more { opacity: 1; }
@media (hover: hover) {
  .aw__card:hover .aw__more { opacity: 1; }
  :is(.aw__card, .auth-account):not([aria-selected="true"]):hover { background: #f8fafc; border-color: #cbd5e1; }
}
@media (hover: none) { .aw__more { opacity: 1; } }
@container replica (width < 320px) { .aw__grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 7rem; padding: .75rem; } .aw__list { min-height: 31.75rem; } }

/* Overlays are scoped to the app surface; no page-level dialog or simulated OS input. */
.demo-cursor { position: absolute; z-index: 12; top: 0; left: 0; width: 22px; height: 28px; pointer-events: none; offset-position: 0 0; offset-anchor: 0 0; offset-rotate: 0deg; }
.demo-cursor svg { position: absolute; top: -2px; left: -2px; transform-origin: 2px 2px; filter: drop-shadow(0 2px 2px #0f172a40); }
.demo-cursor i { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border: 2px solid #2563eb; background: #2563eb20; border-radius: 50%; opacity: 0; }
.demo-cursor[data-button="right"] i { border-color: #0d9488; background: #0d948822; }
.demo-menu { position: absolute; z-index: 5; width: max-content; min-width: min(10rem, 100% - 16px); max-width: calc(100% - 16px); padding: .375rem; border: 1px solid #94a3b8b8; border-radius: .75rem; background: rgb(255 255 255 / .97); box-shadow: 0 18px 48px #0f172a38, 0 2px 8px #0f172a14; }
.demo-menu button { display: flex; align-items: center; gap: .625rem; width: 100%; min-height: 2.125rem; padding: .375rem .625rem; border-radius: .5rem; color: #334155; font-size: .875rem; text-align: start; }
.demo-menu :is([data-action="paste"], [data-action="pasteFile"]) { font-weight: 650; }
.demo-menu :is(button:hover, button:focus-visible, [data-aim]) { color: #1d4ed8; background: #eff6ff; }
.demo-menu .menu-forward { margin-inline-start: auto; transform: rotate(180deg); color: #94a3b8; }
.demo-menu [data-action="delete"] { color: #dc2626; }
.demo-menu [data-action="delete"]:is(:hover, :focus-visible, [data-confirm]) { background: #fef2f2; color: #b91c1c; }
.demo-submenu { z-index: 6; }
.demo-submenu[data-inline] { position: static; width: 100%; max-width: 100%; box-shadow: none; border: 0; border-radius: .5rem; background: #f8fafc; }
.demo-submenu button i { width: .5rem; height: .5rem; border-radius: 50%; background: #2563eb; }
.demo-menu hr { margin: .375rem .25rem; border: 0; border-top: 1px solid #e2e8f0; }
.demo-overlay { position: relative; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: clamp(.75rem, 3cqi, 1.25rem); background: rgb(15 23 42 / .30); backdrop-filter: blur(6px); }
.share-sheet, .demo-receiver { width: min(100%, 24rem); min-width: 0; border: 1px solid #dbe1e9; border-radius: 14px; background: #fff; box-shadow: 0 18px 48px #0f172a2e; }
.share-sheet { display: flex; flex-direction: column; min-block-size: 25rem; }
.share-sheet footer:has(button[hidden]) { display: none; }
.share-sheet > .share-state { margin-block: auto; }
.share-sheet header, .demo-receiver header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem 0; font-size: .94rem; }
.demo-stage [data-dismiss], .auth-back { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: #64748b; }
.demo-stage [data-dismiss]:hover, .demo-stage .auth-back:hover { background: #f1f5f9; }
.share-body { display: grid; min-width: 0; gap: .5rem; margin-block: auto; padding: .5rem 1rem .75rem; text-align: center; }
.share-body img { justify-self: center; width: min(100%, clamp(7rem, 28cqi, 10.5rem)); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.share-body p, .share-state { margin: 0; font-size: .75rem; color: #64748b; }
.share-state { padding: 2rem 1rem; text-align: center; }
.share-time { font-variant-numeric: tabular-nums; }
.share-body input { min-width: 0; width: 100%; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; color: #475569; padding: .4rem .5rem; font-size: .75rem; }
.demo-stage .share-copy, .demo-stage .auth-primary { padding: .42rem .65rem; border-radius: 7px; background: #2563eb; color: white; font-size: .78rem; font-weight: 600; }
.share-sheet footer { display: flex; justify-content: flex-end; padding: .625rem 1rem; border-top: 1px solid #f1f5f9; }
.share-sheet [data-end-share] { padding: .4rem .6rem; border-radius: 7px; background: #f1f5f9; color: #475569; font-size: .75rem; }
.share-sheet [data-end-share]:hover { color: #b91c1c; background: #fef2f2; }
.demo-receiver { padding-bottom: 1rem; }
.demo-receiver output { display: block; margin: 1rem; overflow-wrap: anywhere; color: #334155; user-select: text; }
.demo-receiver output img { width: 100%; height: auto; max-height: 10rem; object-fit: contain; }
.demo-toast { position: absolute; z-index: 9; left: 50%; top: .9rem; transform: translateX(-50%); padding: .42rem .75rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; color: #166534; font-size: .78rem; }
@media (prefers-reduced-motion: no-preference) {
  .demo-menu:not([hidden]), .demo-overlay:not([hidden]) > div { animation: demo-pop .16s cubic-bezier(.22,1,.36,1); }
  .share-body:not([hidden]), [data-view]:not([hidden]) { animation: demo-enter .17s ease-out; }
  [data-stage] .aw__pin:not([hidden]) { animation: demo-pin-in .26s ease-out; }
  .aw__card time[data-fresh] { animation: demo-fresh 1.3s ease-out; }
  @keyframes demo-pin-in { from { opacity: 0; transform: translateY(-2px) scale(.76) rotate(-12deg); } }
  @keyframes demo-fresh { from { color: #0f766e; } }
  @keyframes demo-pop { from { opacity: 0; transform: scale(.97); } }
  @keyframes demo-enter { from { opacity: .25; transform: translateX(4px); } }
}

/* Authenticator: stable shell when switching between the app tile, list and editor. */
[data-auth-shell] { display: grid; grid-template-rows: auto 1fr; min-block-size: 31rem; background: linear-gradient(#fff, #f8fafc); }
.auth-home, [data-view="list"], [data-view="add"] { display: flex; flex-direction: column; min-width: 0; }
.auth-toolbar { display: flex; align-items: center; min-height: 3.75rem; gap: .75rem; border-bottom: 1px solid #e2e8f0; padding: .65rem 1rem; }
.auth-toolbar > strong { flex: 1; font-size: .94rem; }
.demo-stage .auth-back { border: 1px solid #dbe3ee; background: #fff; }
.demo-stage .auth-primary { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.demo-stage .auth-primary:disabled { opacity: .5; cursor: default; }
.demo-stage .auth-tile { display: flex; align-items: flex-start; flex-direction: column; gap: .75rem; width: calc(50% - 1.4rem); min-height: 10.75rem; margin: 1rem; padding: 1rem; border: 1px solid #dbe3ee; border-radius: .5rem; background: #fff; text-align: start; font-size: .81rem; color: #64748b; }
.auth-tile > strong { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .9rem; color: #0f172a; }
.auth-tile i { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border: 1px solid #99d8d2; border-radius: .625rem; background: #eaf8f6; color: #0f766e; }
.demo-stage .auth-tile:is(:hover, :focus-visible, [data-aim]) { border-color: #6eb9b2; background: #f7fcfb; }
.auth-capabilities { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: auto; }
.auth-capabilities span { padding: .12rem .35rem; border-radius: .3rem; color: #0f766e; background: #eff8f7; font-size: .67rem; }
.auth-accounts { flex: 1; align-content: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: 1rem; }
.auth-account { min-height: 8.75rem; padding: .625rem; gap: .2rem; cursor: default; }
.auth-account > strong, .auth-account > [data-name] { overflow-wrap: anywhere; }
.auth-account > [data-name] { color: #475569; font-size: .8125rem; }
.auth-code { container-type: inline-size; display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-top: auto; }
.auth-digits { padding: .375rem; border-radius: .375rem; background: #eff6ff; color: #1d4ed8; font: 800 clamp(1.15rem, 13cqi, 2rem)/1.1 Consolas, ui-monospace, monospace; letter-spacing: .035em; font-variant-numeric: tabular-nums slashed-zero; }
.auth-ring { display: grid; place-items: center; flex: none; position: relative; width: clamp(30px, 19cqi, 44px); aspect-ratio: 1; color: #15803d; --track: #dcfce7; font-size: clamp(.625rem, 5cqi, .8rem); font-weight: 650; font-variant-numeric: tabular-nums; }
.auth-ring[data-phase="warning"] { color: #a16207; --track: #fef9c3; }
.auth-ring[data-phase="danger"] { color: #dc2626; --track: #fee2e2; }
.auth-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--track); stroke-width: 2; transform: rotate(-90deg); }
.auth-ring [data-arc] { stroke: currentColor; stroke-linecap: round; }
.auth-hints { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .8rem; margin-top: auto; padding: .5rem 1rem; border-top: 1px solid #e2e8f0; color: #64748b; font-size: .7rem; }
.auth-hints kbd { font: inherit; font-weight: 650; color: #334155; }
.auth-hints [data-count] { margin-left: auto; font-variant-numeric: tabular-nums; }
.auth-fields { display: grid; gap: .75rem; padding: 1rem; }
.auth-fields label { display: grid; gap: .25rem; color: #475569; font-size: .82rem; }
.auth-fields input { border: 1px solid #cbd5e1; border-radius: .45rem; background: #fff; padding: .4rem .65rem; }
.auth-fields button { justify-self: end; }
.demo-receiver .demo-otp-input { display: flex; justify-content: center; gap: .28rem; }
.demo-otp-input > span { display: grid; place-items: center; min-width: 0; flex: 0 1 2.3rem; height: 3rem; border: 1px solid #b9d0f8; border-radius: .45rem; background: #f8fbff; color: #1d4ed8; font: 650 1.55rem/1 Consolas, monospace; }
@container replica (max-width: 480px) { .demo-stage .auth-tile { width: calc(100% - 2rem); } }
@container replica (width < 320px) { [data-auth-shell] { min-block-size: 34rem; } .auth-accounts { grid-template-columns: minmax(0, 1fr); padding: .75rem; } }
