/* ------------------------------------------------------------------
   "Original / Compare" switch (js/original-view.js, js/original-map.js): a small round tab in the TOP RIGHT corner. On hover (keyboard focus, tap) it opens a segmented control
   New | Original | Compare. "Original" lays the slide of the ORIGINAL PowerPoint over the current one (the assets/original folder (one WebP per slide), fitted whole, any window shape),
   "Compare" is a before / after wipe: the original on the left of a draggable divider, the live slide on the right.
   Dark glass like the dock (css/controls.css). Nothing here uses filters or blend modes (the 3D slides run underneath), no animation runs while it is closed.
------------------------------------------------------------------- */
.orig-dock { position: fixed; top: 0; right: 0; width: 0; height: 0; z-index: 61; font-family: "Neue Haas Unica Pro", Arial, Helvetica, sans-serif; color: #fff; }
.orig-dock[hidden] { display: none; }

/* the tab: small and quiet, in the very corner (clear of the Overview button of slide 4, the insets and the logos of the stage slides) */
.orig-tab { appearance: none; -webkit-appearance: none; position: fixed; top: 12px; right: 12px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; outline: none;
  background: linear-gradient(rgba(var(--shade-deep, 4, 16, 52), .72), rgba(var(--shade-deep, 4, 16, 52), .72)) padding-box, linear-gradient(140deg, rgba(124, 200, 255, .7), rgba(124, 200, 255, .12) 45%, rgba(236, 194, 21, .5)) border-box; border: 1px solid transparent;
  box-shadow: 0 8px 20px -8px rgba(3, 12, 40, .7); opacity: .55; transition: opacity .2s ease, transform .2s ease; pointer-events: auto; }
.orig-tab .orig-x { display: none; }
.orig-dock.open .orig-tab .orig-gl, .orig-dock:not([data-mode="current"]) .orig-tab .orig-gl { display: none; }
.orig-dock.open .orig-tab .orig-x, .orig-dock:not([data-mode="current"]) .orig-tab .orig-x { display: block; }
.orig-tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.orig-dock:hover .orig-tab, .orig-dock.open .orig-tab, .orig-tab:focus-visible, .orig-dock:not([data-mode="current"]) .orig-tab { opacity: 1; }
.orig-tab:focus-visible { box-shadow: 0 0 0 3px #ECC215, 0 8px 20px -8px rgba(3, 12, 40, .7); }
.orig-dot { position: absolute; right: 3px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: #ECC215; box-shadow: 0 0 0 2px rgba(4, 16, 52, .9); display: none; }
.orig-dock:not([data-mode="current"]) .orig-dot { display: none; }                                  /* the panel stays open outside "New" and the tab is an X then: no extra dot */

/* the segmented control: opens to the left of the tab */
.orig-pill { position: fixed; top: 10px; right: 62px; height: 44px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; box-sizing: content-box;
  background: linear-gradient(rgba(var(--shade-deep, 4, 16, 52), .92), rgba(var(--shade-deep, 4, 16, 52), .92)) padding-box, linear-gradient(140deg, rgba(124, 200, 255, .85), rgba(124, 200, 255, .12) 42%, rgba(236, 194, 21, .6)) border-box; border: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 18px 40px -12px rgba(3, 12, 40, .7);
  opacity: 0; transform: translateX(12px) scale(.98); transform-origin: right center; pointer-events: none; visibility: hidden; transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; }
.orig-dock.open .orig-pill, .orig-dock:focus-within .orig-pill, .orig-dock:not([data-mode="current"]) .orig-pill { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.orig-seg { appearance: none; -webkit-appearance: none; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: #DCE8FF; font-family: inherit; font-size: 24px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; outline: none; transition: background .15s ease, color .15s ease; }
.orig-seg:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.orig-seg[aria-checked="true"] { background: linear-gradient(180deg, #2F68DD, #1B4FC0); color: #fff; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.orig-seg:focus-visible { box-shadow: 0 0 0 3px #ECC215; }
.orig-pager { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid rgba(143, 208, 255, .3); font-size: 24px; font-variant-numeric: tabular-nums; }
.orig-pager[hidden] { display: none; }
.orig-pg { appearance: none; -webkit-appearance: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; outline: none; }
.orig-pg:hover { background: rgba(255, 255, 255, .16); }
.orig-pg:focus-visible { box-shadow: 0 0 0 3px #ECC215; }
.orig-pg:disabled { opacity: .35; cursor: default; background: transparent; }
.orig-pg svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.orig-pgn { min-width: 3.2ch; text-align: center; padding: 0 2px; }

/* the layer over the slide */
.orig-layer { position: fixed; inset: 0; z-index: 50; color: #fff; font-family: "Neue Haas Unica Pro", Arial, Helvetica, sans-serif; background: #050d26; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility 0s linear .25s; }
.orig-layer.on { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.orig-layer.cmp { background: transparent; cursor: ew-resize; touch-action: none; }
.orig-pane { position: absolute; inset: 0; background: #050d26; }
.orig-layer.cmp .orig-pane { clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
.orig-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .2s ease; -webkit-user-drag: none; user-select: none; }
.orig-img.ready { opacity: 1; }
.orig-layer.none .orig-img { display: none; }

.orig-cap { position: absolute; z-index: 2; top: 14px; max-width: 46vw; padding: 7px 18px; border-radius: 999px; font-size: 24px; line-height: 1.2; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(4, 16, 52, .86); box-shadow: 0 10px 24px -10px rgba(0, 4, 28, .8), inset 0 0 0 1px rgba(143, 208, 255, .35); pointer-events: none; }
.orig-cap-a { left: 50%; transform: translateX(-50%); }
.orig-cap small { font-size: inherit; font-weight: 500; color: #C9D8F4; }
.orig-cap em { font-style: normal; color: #F2C300; }
.orig-layer.cmp .orig-cap-a { left: auto; right: calc(100% - var(--x, 50%) + 56px); transform: none; max-width: 40vw; }
.orig-cap-b { display: none; }
.orig-layer.cmp .orig-cap-b { display: block; left: calc(var(--x, 50%) + 56px); max-width: 30vw; }
.orig-layer.cmp.late .orig-cap-b { top: 76px; }
.orig-layer.cmp.edge-l .orig-cap-a, .orig-layer.cmp.edge-r .orig-cap-b { display: none; }                      /* the divider is at an end: only the visible side is named */

.orig-note { position: absolute; z-index: 2; left: 50%; bottom: 74px; transform: translateX(-50%); max-width: min(1100px, 80vw); padding: 8px 20px; border-radius: 22px; font-size: 24px; line-height: 1.3; text-align: center;
  background: rgba(4, 16, 52, .86); color: #E6EEFF; box-shadow: 0 10px 24px -10px rgba(0, 4, 28, .8), inset 0 0 0 1px rgba(143, 208, 255, .3); pointer-events: none; }
.orig-note:empty, .orig-layer.cmp .orig-note { display: none; }                                  /* in Compare the note would cover the live slide */

.orig-msg { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 10px; text-align: center; pointer-events: none; }
.orig-layer.none .orig-msg { display: grid; }
.orig-layer.none.cmp .orig-msg { left: 0; right: calc(100% - var(--x, 50%)); }
.orig-msg b { font-size: 56px; line-height: 1.1; font-weight: 700; }
.orig-msg span { font-size: 28px; line-height: 1.3; color: #B9CBEE; max-width: 760px; }

/* the divider of the wipe */
.orig-div { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 56px; margin-left: -28px; cursor: ew-resize; touch-action: none; outline: none; display: none; }
.orig-layer.cmp .orig-div { display: block; }
.orig-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 0 1px rgba(4, 16, 52, .5), 0 0 22px rgba(120, 180, 255, .75); }
.orig-handle { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #2F68DD, #1B4FC0); box-shadow: 0 12px 28px -8px rgba(0, 8, 40, .85), inset 0 0 0 2px rgba(255, 255, 255, .85); }
.orig-handle svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.orig-div:focus-visible .orig-handle { box-shadow: 0 0 0 4px #ECC215, 0 12px 28px -8px rgba(0, 8, 40, .85), inset 0 0 0 2px rgba(255, 255, 255, .85); }

@media (prefers-reduced-motion: reduce) { .orig-tab, .orig-pill, .orig-layer, .orig-img, .orig-seg { transition: none; } }
@media print { .orig-dock, .orig-layer { display: none !important; } }
