/* =====================================================================
 *  Deck chrome — controls that live outside the 16:9 stage
 * ===================================================================== */

/* visually-hidden live region for screen-reader slide announcements */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* progress bar (top of viewport) */
.progress-wrap {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  background: rgba(24,72,120,.10); z-index: 60;
}
#progress {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--color-orange), var(--color-blue));
  transition: width .6s var(--nav-ease);
  box-shadow: 0 0 12px rgba(47,111,214,.5);
}

/* bottom control cluster */
.controls {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; z-index: 55;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  border: 1px solid var(--color-line);
  box-shadow: 0 14px 40px -18px rgba(16,45,79,.55);
}
#dots { display: flex; align-items: center; gap: 8px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; cursor: pointer;
  background: #c6d3e4; border: 0; padding: 0;
  transition: all .3s var(--nav-ease);
}
.dot:hover { background: var(--color-blue); }
.dot.on { width: 26px; border-radius: 6px; background: linear-gradient(90deg, var(--color-orange), var(--color-blue)); }

.counter {
  font-family: var(--font-cairo); font-weight: 700; font-size: 13px;
  color: var(--color-navy); letter-spacing: 1px; direction: ltr;
  padding-inline-end: 4px; border-inline-end: 1px solid var(--color-line);
}
.counter .cur { color: var(--color-blue); }
.counter .tot { color: #9fb0c6; }

.tool { display: flex; gap: 8px; padding-inline-start: 4px; border-inline-start: 1px solid var(--color-line); }
.iconbtn {
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center; border: 0;
  background: transparent; color: var(--color-navy);
  transition: background .2s, color .2s;
}
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:hover { background: var(--color-blue-050); color: var(--color-blue); }

/* hint pill (auto-hides) */
.hint {
  position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%);
  z-index: 54; font-family: var(--font-cairo); font-size: 13px; font-weight: 600;
  color: var(--color-navy);
  background: rgba(255,255,255,.9); border: 1px solid var(--color-line);
  padding: 8px 16px; border-radius: 999px; box-shadow: 0 10px 30px -14px rgba(16,45,79,.5);
  display: flex; align-items: center; gap: 8px;
  animation: hintIn .6s .8s both, hintOut .6s 5s both;
}
.hint kbd {
  font-family: var(--font-cairo); background: var(--color-navy); color: #fff;
  border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 700;
}
@keyframes hintIn  { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hintOut { to { opacity: 0; transform: translate(-50%, 12px); visibility: hidden; } }

/* ---- overview (grid of all slides) ------------------------------- */
.overview {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(13,29,49,.62); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; padding: 30px clamp(20px,5vw,70px);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s .35s;
}
.overview.open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.ov-head { display: flex; align-items: center; justify-content: space-between; color: #fff; margin-bottom: 22px; }
.ov-head h3 { font-family: var(--font-cairo); font-weight: 800; font-size: 22px; }
.ov-head p { color: #b9cbe4; font-size: 14px; font-weight: 500; }
#ov-close {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: grid; place-items: center;
}
#ov-close:hover { background: rgba(255,255,255,.18); }
.ov-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px; overflow: auto; padding: 4px 4px 30px; align-content: start;
}
.ov-cell {
  position: relative; aspect-ratio: 16/9; border-radius: 14px; cursor: pointer;
  background: linear-gradient(155deg, #ffffff, #eef4fd);
  border: 2px solid transparent; overflow: hidden; text-align: right;
  padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .25s var(--nav-ease), border-color .25s, box-shadow .25s;
  font-family: var(--font-cairo);
}
.ov-cell::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-blue));
}
.ov-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.ov-cell.on { border-color: var(--color-blue); box-shadow: 0 0 0 3px rgba(47,111,214,.25); }
.ov-n { font-weight: 800; font-size: 26px; color: #b9c8dc; line-height: 1; }
.ov-cell.on .ov-n { color: var(--color-blue); }
.ov-t { font-weight: 700; font-size: 14.5px; color: var(--color-navy); line-height: 1.45; }

@media (max-width: 640px) {
  .hint { display: none; }
}
