/* Flip-book reader: the printed pages, turned like paper. Tokens: style.css; page-flip styles: vendor/page-flip.css. */
@import url(/vendor/page-flip.css);
.flippage .top, .flippage .foot { display: none; }
.flippage { background: radial-gradient(70% 60% at 50% 40%, #ffffff, #e6ecf8 70%, #d9e1f2); min-height: 100svh; }
.flippage main { min-height: 100svh; }
.fb-shell { display: grid; grid-template-rows: auto 1fr auto; min-height: 100svh; }
.fb-shell:fullscreen { background: radial-gradient(70% 60% at 50% 40%, #ffffff, #e6ecf8 70%, #d9e1f2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.fb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; padding: 8px 12px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.fb-back { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; padding: 0 .5rem; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; min-width: 0; }
.fb-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.fb-back:hover { background: #eef3ff; color: var(--blue2); }
.fb-toc { order: 3; flex: 1 0 100%; min-width: 0; display: flex; justify-content: center; }
.fb-back { flex: 1; }
.fb-toc select { width: 100%; max-width: 360px; min-height: 42px; padding: .4rem .8rem; border-radius: 12px; background: #fff; font-size: .9rem; font-weight: 600; color: var(--ink); }
.fb-tools { display: flex; gap: .4rem; }
.fb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: 0 .75rem; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 700 .88rem var(--sans); text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.fb-btn:hover { border-color: #c7d5ff; color: var(--blue2); }
.fb-btn span { display: none; }
.fb-pdf { background: var(--brand); border-color: var(--brand); color: #fff; }
.fb-pdf:hover { background: var(--brand-h); color: #fff; border-color: var(--brand-h); }

.fb-stage { position: relative; display: grid; place-items: center; padding: 14px 10px; overflow: hidden; min-height: 0; }
.fb-book { width: 100%; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(14, 26, 58, .28)); }
.fb-page { background: #fff; overflow: hidden; }
.fb-page img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; background: #fbfaf7; }
.fb-page img:not([src]) { background: linear-gradient(110deg, #f6f7fb 30%, #eceff6 50%, #f6f7fb 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
/* the centre fold of a two-page spread */
.fb-page:not(.--left):not(.--right) { box-shadow: none; }
.stf__item.--left .fb-page, .fb-page.--left { box-shadow: inset -18px 0 24px -18px rgba(0, 0, 0, .35); }
.stf__item.--right .fb-page, .fb-page.--right { box-shadow: inset 18px 0 24px -18px rgba(0, 0, 0, .35); }
.fb-offer { display: grid; place-items: center; background: linear-gradient(160deg, #fff, #eef3ff); }
.offer-in { display: grid; justify-items: center; gap: .7rem; padding: 8% 10%; text-align: center; }
.offer-in img { width: 36%; height: auto; border-radius: 3px 6px 6px 3px; box-shadow: var(--cover-shadow); }
.offer-in h2 { font-size: clamp(1.1rem, 2.2vw, 1.6rem); margin: .4rem 0 0; }
.offer-in p { color: var(--ink2); font-size: clamp(.8rem, 1.3vw, .95rem); margin: 0; }
.offer-in .btn { width: 100%; max-width: 280px; }
.fb-blank { background: #fbfaf7; }

.fb-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 4; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92);
  color: var(--ink); display: none; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -14px rgba(14, 26, 58, .6); transition: transform .2s, color .2s; }
.fb-nav:hover { color: var(--blue2); transform: scale(1.06); }
.fb-nav:disabled { opacity: .35; cursor: default; transform: none; }
.fb-nav .ic { width: 22px; height: 22px; }
.fb-prev { left: 12px; } .fb-next { right: 12px; }

.fb-foot { display: flex; align-items: center; gap: .6rem; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); max-width: 760px; width: 100%; margin: 0 auto; }
.fb-mid { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; }
.fb-step { flex: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 48px; padding: 0 .9rem; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font: 700 .92rem var(--sans); box-shadow: 0 10px 20px -12px rgba(47, 91, 255, .8); transition: transform .15s, opacity .2s; }
.fb-step:active { transform: scale(.96); }
.fb-step:disabled { opacity: .35; cursor: default; }
.fb-step .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.fb-step span { display: none; }

/* back turn on phones: the previous sheet swings over from the spine */
.fb-turn { position: fixed; z-index: 50; perspective: 1600px; pointer-events: none; }
.fb-sheet { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; animation: sheetBack .75s cubic-bezier(.3, .1, .2, 1) forwards; }
.fb-face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; background: #fbfaf7; }
.fb-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-front { box-shadow: -8px 0 22px -10px rgba(0, 0, 0, .35); }
.fb-front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 35%); animation: fade .75s ease-out forwards; }
.fb-rear { transform: rotateY(180deg); background: linear-gradient(90deg, #ece8df, #fbfaf7 60%); }
.fb-dim { position: absolute; inset: 0; background: rgba(14, 26, 58, .22); opacity: 0; animation: dim .75s ease-in forwards; }
@keyframes sheetBack { from { transform: rotateY(-178deg); } to { transform: rotateY(0deg); } }
@keyframes fade { to { opacity: 0; } }
@keyframes dim { 0% { opacity: 0; } 60% { opacity: 1; } 100% { opacity: 0; } }
.fb-seek { flex: 1; min-height: 32px; padding: 0; border: 0; background: transparent; accent-color: var(--blue); box-shadow: none; }
.fb-num { font-weight: 700; font-size: .9rem; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (min-width: 760px) {
  .fb-bar { flex-wrap: nowrap; padding: 10px 12px; }
  .fb-toc { order: 0; flex: 1 1 auto; }
  .fb-back { flex: none; }
  .fb-btn span { display: inline; }
  .fb-nav { display: grid; }
  .fb-step { display: none; }
  .fb-stage { padding: 18px 76px; }
  .fb-back span { max-width: 24vw; }
}
@media (prefers-reduced-motion: reduce) { .fb-page img:not([src]) { animation: none; } }
