/* Protected viewer (assets/academy/protected-viewer.js). Neutral tokens so it sits on the public site and in the platform. */
.pv-root { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: clamp(.5rem, 2vw, 1.5rem); }
.pv-shade { position: absolute; inset: 0; background: rgba(12, 16, 20, .78); backdrop-filter: blur(6px); }
.pv-panel { position: relative; display: flex; flex-direction: column; width: min(1080px, 100%); height: min(92vh, 1400px); background: #f4f1ea; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18), 0 30px 80px -20px rgba(0, 0, 0, .55); }
.pv-panel:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .9rem; background: #1e2329; color: #f4efe6; }
.pv-title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.pv-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pv-badge { flex: none; padding: .15rem .5rem; border: 1px solid rgba(233, 161, 125, .55); border-radius: 999px; color: #e9a17d; font-size: .72rem; letter-spacing: .04em; }
.pv-tools { display: flex; align-items: center; gap: .35rem; flex: none; }
.pv-count { margin-inline-end: .4rem; font-size: .82rem; color: #c9c3b8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; background: transparent; color: inherit; cursor: pointer; }
.pv-btn:hover { background: rgba(255, 255, 255, .08); }
.pv-btn:focus-visible { outline: 2px solid #e9a17d; outline-offset: 2px; }
.pv-btn:active { transform: scale(.96); }
.pv-close { margin-inline-start: .35rem; }
.pv-body { position: relative; flex: 1; min-height: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pv-body--video, .pv-body--embed { display: grid; place-items: center; background: #0d1014; }
.pv-body video, .pv-body iframe { width: 100%; height: 100%; max-height: 100%; border: 0; background: #000; }
/* A column of pages that never shrink: each page box keeps the document's aspect ratio before it is drawn. */
.pv-pages { --pv-zoom: 1; position: absolute; inset: 0; overflow: auto; padding: 1.25rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; overscroll-behavior: contain; }
.pv-page { position: relative; flex: none; width: calc(min(900px, 100%) * var(--pv-zoom)); max-width: none; background: #fff; border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(30, 35, 41, .08), 0 10px 30px -12px rgba(30, 35, 41, .25); }
.pv-page:not(.is-drawn)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #f4f1ea 30%, #fbfaf6 50%, #f4f1ea 70%); background-size: 200% 100%; animation: pv-shimmer 1.4s linear infinite; }
.pv-page canvas { display: block; width: 100%; height: auto; pointer-events: none; }
.pv-status { margin: 3rem auto; color: #5b6470; font-size: .95rem; text-align: center; }
.pv-watermark { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 4rem 5rem; padding: 2rem; transform: rotate(-24deg) scale(1.4); opacity: .07; }
.pv-watermark span { font: 600 1rem/1 system-ui, sans-serif; color: #1e2329; white-space: nowrap; letter-spacing: .06em; }
.pv-body--video .pv-watermark span { color: #fff; }
.pv-inline { position: relative; height: min(80vh, 1100px); margin-bottom: 1rem; border: 1px solid rgba(30, 35, 41, .12); border-radius: 12px; overflow: hidden; background: #f4f1ea;
  -webkit-user-select: none; user-select: none; }
.pv-open, .pv-open body { overflow: hidden; }
@keyframes pv-shimmer { to { background-position: -200% 0; } }
@media (max-width: 640px) {
  .pv-root { padding: 0; }
  .pv-panel { height: 100%; border-radius: 0; }
  .pv-pages { padding: .6rem; gap: .6rem; }
  .pv-count { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pv-page:not(.is-drawn)::after { animation: none; } }
@media print {
  .pv-root, .pv-inline, [data-pv-inline] { display: none !important; }
  .pv-printing body::before { content: var(--pv-noprint); display: block; padding: 2rem; font: 600 1.1rem system-ui, sans-serif; }
}

/* ---- Errors, retry and screen-reader text ---- */
.pv-status { display: grid; justify-items: center; gap: .9rem; }
.pv-status p { margin: 0; max-width: 34rem; line-height: 1.6; }
.pv-status.is-error p { color: #8a2c14; font-weight: 600; }
.pv-retry { padding: .6rem 1.2rem; border: 0; border-radius: 9px; background: #1e2329; color: #f4efe6; font: inherit; font-weight: 600; cursor: pointer; }
.pv-retry:hover { background: #2c333b; }
.pv-retry:focus-visible { outline: 2px solid #c45b2f; outline-offset: 3px; }
.pv-retry:active { transform: scale(.97); }
.pv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Book view: a lit desk, two sheets around a spine, a turning leaf ---- */
.pv-panel.is-book { background: #1b2025; }
.pv-panel:not(.is-book) .pv-foot { display: none; }
.pv-panel.is-book .pv-zoom { display: none; }
.pv-book { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #3a4148 0%, #23292f 55%, #171b1f 100%); }
.pv-book .pv-status { color: #d9d3c7; }
.pv-book .pv-status.is-error p { color: #f1b49a; }
.pv-book .pv-retry { background: #e9a17d; color: #1e2329; }
.pv-desk { position: relative; display: flex; perspective: 2600px; cursor: pointer; touch-action: pan-y;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .45)) drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.pv-book.is-rtl .pv-desk { flex-direction: row-reverse; }
.pv-sheet { position: relative; width: var(--pw); height: var(--ph); background: #fdfcf8; overflow: hidden; }
.pv-sheet.is-blank { background: transparent; }
.pv-sheet:not(.is-drawn):not(.is-blank)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #f1ede4 30%, #fbfaf6 50%, #f1ede4 70%); background-size: 200% 100%; animation: pv-shimmer 1.4s linear infinite; }
.pv-sheet canvas, .pv-face canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
/* Gutter shading on both pages, so the spread reads as one bound book. */
.pv-sheet--a::before, .pv-sheet--b::before { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; z-index: 1; pointer-events: none; }
.pv-sheet--a::before { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .16), transparent); }
.pv-sheet--b::before { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, .18), transparent); }
.pv-book.is-rtl .pv-sheet--a::before { right: auto; left: 0; background: linear-gradient(to right, rgba(0, 0, 0, .16), transparent); }
.pv-book.is-rtl .pv-sheet--b::before { left: auto; right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .18), transparent); }
.pv-sheet.is-blank::before { display: none; }
.pv-sheet--a { border-radius: 6px 0 0 6px; }
.pv-sheet--b { border-radius: 0 6px 6px 0; }
.pv-book.is-rtl .pv-sheet--a { border-radius: 0 6px 6px 0; }
.pv-book.is-rtl .pv-sheet--b { border-radius: 6px 0 0 6px; }
.pv-spine { width: 2px; background: linear-gradient(#0000, rgba(0, 0, 0, .35) 12%, rgba(0, 0, 0, .35) 88%, #0000); }
.pv-book.is-single .pv-sheet--a, .pv-book.is-single .pv-spine { display: none; }
.pv-book.is-single .pv-sheet--b { border-radius: 6px; }
.pv-book.is-single .pv-sheet--b::before { display: none; }
.pv-leaf { position: absolute; z-index: 3; width: var(--pw); height: var(--ph); transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.pv-face { position: absolute; inset: 0; overflow: hidden; background: #fdfcf8; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.pv-face--back { transform: rotateY(180deg); }
.pv-face.is-blank { background: #f4f0e6; }
.pv-shade-face { position: absolute; inset: 0; z-index: 1; opacity: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08) 60%, rgba(255, 255, 255, .12)); }
.pv-face--back .pv-shade-face { background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08) 60%, rgba(255, 255, 255, .12)); }
.pv-turn { position: absolute; top: 50%; z-index: 4; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; color: #f4efe6;
  background: rgba(20, 24, 28, .55); border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(4px); transition: opacity .2s, transform .2s; }
.pv-turn--prev { left: 14px; }
.pv-turn--next { right: 14px; }
.pv-book.is-rtl .pv-turn--prev { left: auto; right: 14px; }
.pv-book.is-rtl .pv-turn--next { right: auto; left: 14px; }
.pv-turn:hover:not(:disabled) { background: rgba(196, 91, 47, .85); transform: scale(1.06); }
.pv-turn:disabled { opacity: .25; cursor: default; }
.pv-foot { display: flex; align-items: center; padding: .7rem 1.2rem .9rem; background: #1e2329; }
.pv-range { --pv-fill: 0%; width: 100%; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.pv-range::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, #e9a17d var(--pv-fill), rgba(255, 255, 255, .18) var(--pv-fill)); }
.pv-range::-moz-range-track { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.pv-range::-moz-range-progress { height: 4px; border-radius: 99px; background: #e9a17d; }
.pv-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #f4efe6; box-shadow: 0 0 0 4px rgba(233, 161, 125, .35); }
.pv-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #f4efe6; }
.pv-range:focus-visible { outline: 2px solid #e9a17d; outline-offset: 4px; }
[dir=rtl] .pv-range { direction: rtl; }
[dir=rtl] .pv-range::-webkit-slider-runnable-track { background: linear-gradient(270deg, #e9a17d var(--pv-fill), rgba(255, 255, 255, .18) var(--pv-fill)); }

/* "Read as book" on inline documents */
.pv-inline-book { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem;
  border: 0; border-radius: 999px; background: #1e2329; color: #f4efe6; font: 600 .85rem/1 system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(20, 24, 28, .55); transition: transform .2s; }
.pv-inline-book:hover { background: #c45b2f; transform: translateY(-1px); }
.pv-inline-book:focus-visible { outline: 2px solid #c45b2f; outline-offset: 3px; }
.pv-inline-book:active { transform: scale(.97); }
@media (max-width: 640px) {
  .pv-turn { width: 40px; height: 40px; margin-top: -20px; }
  .pv-turn--prev { left: 6px; } .pv-turn--next { right: 6px; }
  .pv-book.is-rtl .pv-turn--prev { right: 6px; } .pv-book.is-rtl .pv-turn--next { left: 6px; }
}
@media (prefers-reduced-motion: reduce) { .pv-sheet:not(.is-drawn):not(.is-blank)::after { animation: none; } .pv-turn, .pv-inline-book { transition: none; } }.pv-panel.is-book { width: min(1480px, 100%); }
