/* Extra styles for the Slides section (works with ../style.css) */
[hidden] { display: none !important; }
.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
}
.back-link:hover, .back-link:focus-visible { color: var(--text); }

/* slide list */
.thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #111317;
  border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.count { color: color-mix(in srgb, var(--accent) 80%, var(--text)); font-size: .8rem; font-weight: 600; }
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

/* viewer */
.viewer-page { overflow-x: hidden; }
.viewer {
  min-height: 100vh;
  max-width: 76rem;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.v-top { display: flex; align-items: center; gap: 1rem; margin-bottom: .9rem; }
.v-top .back-link { margin: 0; white-space: nowrap; }
.v-top h1 { flex: 1; margin: 0; font-size: clamp(1.05rem, 3vw, 1.4rem); text-align: center; }
.v-btn {
  width: 2.5rem; height: 2.5rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--tile); color: var(--muted);
  font-size: 1.15rem; cursor: pointer;
}
.v-btn:hover, .v-btn:focus-visible { color: var(--text); border-color: var(--muted); outline: none; }

.stage {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}
.stage img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(32,35,42,.85); color: var(--text);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding-bottom: .2rem;
}
.nav.prev { left: .5rem; }
.nav.next { right: .5rem; }
.nav:disabled { opacity: .25; cursor: default; }
.nav:not(:disabled):hover { background: var(--tile-hover); }

.v-bottom { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: .9rem; color: var(--muted); font-size: .9rem; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; max-width: 100%; }
.dots button {
  width: .6rem; height: .6rem; padding: 0; border-radius: 50%;
  border: 0; background: var(--line); cursor: pointer;
}
.dots button.on { background: var(--teal); transform: scale(1.3); }

.doc { display: grid; gap: 1rem; justify-items: center; }
.doc img { width: min(100%, 52rem); border-radius: 10px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.35); }

/* full screen */
.viewer:fullscreen { max-width: none; padding: 1rem; }
.viewer:fullscreen .stage img { max-height: calc(100vh - 7rem); }

@media (max-width: 700px) {
  .stage { align-content: center; padding-bottom: 4.25rem; }
  .stage img { border-radius: 8px; }
  .nav { top: auto; bottom: 0; transform: none; }
  .nav.prev { left: calc(50% - 4rem); }
  .nav.next { right: calc(50% - 4rem); }
}

/* topic sets on the Slides page */
.set-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.5rem 0 2rem; }
.set-chip {

  padding: .45rem .9rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600; text-decoration: none;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.set-chip:hover, .set-chip:focus-visible { background: color-mix(in srgb, var(--accent) 24%, transparent); outline: none; }
.set { margin-bottom: 2.5rem; scroll-margin-top: 1rem; }
.set .tile { --accent: inherit; border-top: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); }
.set-head {
  display: flex; align-items: center; gap: .6rem;
  margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700;
}
.set-head small {
  font-size: .75rem; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  padding: .1rem .55rem; border-radius: 999px;
}
.set-bar { width: .35rem; height: 1.3rem; border-radius: 4px; background: var(--accent); }
