:root { --blue: #0756ad; --cyan: #29d4ef; --ink: #f8fbff; font-family: "Manrope", sans-serif; color: var(--ink); }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #090a0b; }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }

.viewer-background { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: linear-gradient(rgba(7,8,9,.68), rgba(7,8,9,.68)), url("assets/uva-mountains-background.png") center / cover no-repeat, radial-gradient(ellipse at 52% 42%, #343638 0%, #242628 34%, #151718 69%, #080909 100%); }
.viewer-background::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 40%, transparent 14%, rgba(0,0,0,.25) 68%, rgba(0,0,0,.7) 100%); pointer-events: none; }
.viewer-background::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(115deg, transparent 25%, rgba(220,225,228,.025) 48%, transparent 67%); mix-blend-mode: screen; pointer-events: none; }
.storm-weather { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rain-layer, .wind-layer, .lightning-layer { position: absolute; inset: 0; overflow: hidden; }
.rain-layer { z-index: 2; }
.rain-layer-1 { opacity: .48; }
.rain-layer-2 { opacity: .68; }
.rain-layer-3 { opacity: .9; }
.raindrop { position: absolute; top: -12vh; left: var(--x); width: 1px; height: var(--length); border-radius: 50%; background: linear-gradient(to bottom, transparent, rgba(218,222,224,var(--drop-opacity))); box-shadow: 0 0 3px rgba(205,211,214,.12); transform: rotate(12deg); animation: rainFall var(--duration) linear var(--delay) infinite; }
.wind-layer { z-index: 1; filter: blur(.5px); }
.wind-layer-1 { opacity: .32; }
.wind-layer-2 { opacity: .48; }
.wind-layer-3 { opacity: .65; filter: blur(1.5px); }
.wind-stream { position: absolute; top: var(--top); left: -80vw; width: var(--width); height: 1px; background: linear-gradient(90deg, transparent, rgba(205,210,212,var(--wind-opacity)) 45%, transparent); animation: windSweep var(--duration) ease-in-out var(--delay) infinite; }
.lightning-layer { z-index: 3; }
.lightning-bolt { position: absolute; top: var(--top); left: var(--left); width: clamp(24px, 5vw, 78px); height: var(--height); overflow: visible; opacity: 0; filter: drop-shadow(0 0 8px rgba(227,232,235,.9)); transform: skewX(-5deg); }
.lightning-bolt path { fill: rgba(235,239,241,.12); stroke: rgba(240,244,246,.9); stroke-width: 2; vector-effect: non-scaling-stroke; }
.lightning-bolt.active { animation: lightningFlash .38s steps(1, end) var(--bolt-delay) both; }
.storm-weather.flashing::before { content: ""; position: absolute; z-index: 4; inset: 0; background: rgba(220,225,229,.13); animation: flashGlow .38s steps(1, end) both; }
.particle-whirlpool {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle-whirlpool .particle {
  position: absolute;
  left: 50%;
  top: 50%;
}
.particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(222, 226, 228, .7);
  box-shadow: 0 0 8px 1px rgba(195, 202, 206, .38);
  transform: rotate(var(--angle)) translateX(var(--radius));
  transform-origin: 0 0;
  animation: whirlpoolParticle var(--duration) linear var(--delay) infinite;
}
.particle::after {
  position: absolute;
  top: 50%;
  right: 100%;
  width: var(--trail-length);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(211, 216, 219, .52));
  content: "";
  filter: blur(.35px);
  opacity: .8;
  transform: translateY(-50%);
}
@keyframes whirlpoolParticle {
  0% {
    transform: rotate(var(--angle)) translateX(var(--radius)) scale(.45);
    opacity: .5;
  }
  12% {
    opacity: 1;
  }
  55% {
    opacity: .85;
  }
  100% {
    transform: rotate(calc(var(--angle) - 720deg)) translateX(18px) scale(.15);
    opacity: 0;
  }
}
.particle:nth-child(5n) {
  width: 2px;
  height: 8px;
  border-radius: 50%;
}
.particle-layer-1 { background: rgba(180, 185, 188, .48); box-shadow: 0 0 6px 1px rgba(174, 181, 184, .24); }
.particle-layer-2 { background: rgba(205, 210, 213, .6); box-shadow: 0 0 8px 1px rgba(184, 190, 193, .3); }
.particle-layer-3 { background: rgba(225, 228, 230, .7); box-shadow: 0 0 10px 2px rgba(200, 205, 208, .38); }

.flipbook-viewer { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100vw; height: 100vh; min-height: 0; padding: 15px 22px 14px; }
.viewer-topbar { position: relative; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; min-height: 41px; }
.viewer-branding { display: flex; align-items: center; gap: 10px; min-width: 0; color: white; text-shadow: 0 1px 4px rgba(0,20,65,.55); }
.viewer-logos { display: flex; align-items: center; gap: 5px; flex: none; }
.viewer-logos img { display: block; width: 28px; height: 34px; padding: 2px; border-radius: 4px; background: rgba(255,255,255,.95); object-fit: contain; }
.viewer-logos img + img { width: 56px; height: 29px; }
.brand-copy { min-width: 0; }
.brand-copy h1, .brand-copy p { margin: 0; }
.brand-copy h1 { font-size: 15px; line-height: 1.15; letter-spacing: -.025em; }
.brand-title { font-size: 10px; font-weight: 700; line-height: 1.35; }
.brand-slogan { margin-top: 2px !important; color: rgba(232,246,255,.85); font-size: 9px; line-height: 1.25; }
.toolbar { display: flex; align-items: center; gap: 2px; padding: 5px 13px; border: 1px solid rgba(146, 218, 255, .22); border-radius: 22px; background: linear-gradient(180deg, rgba(41, 122, 215, .73), rgba(22, 91, 179, .65)); box-shadow: 0 5px 18px rgba(0, 25, 90, .22), inset 0 1px rgba(255,255,255,.14); backdrop-filter: blur(10px); }
.toolbar-button { position: relative; display: grid; place-items: center; width: 27px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.91); font-size: 16px; line-height: 1; transition: .2s ease; }.toolbar-button:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }.toolbar-button small { position: absolute; right: 3px; bottom: 1px; font-size: 8px; }.toolbar-divider { width: 1px; height: 17px; margin: 0 5px; background: rgba(255,255,255,.2); }
.page-jump { justify-self: end; display: flex; align-items: center; height: 29px; overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.18); box-shadow: inset 0 1px rgba(255,255,255,.12); color: white; font: 11px "DM Mono", monospace; }.page-jump > span:first-child { min-width: 42px; padding-left: 16px; text-align: center; }.page-total { padding-right: 11px; color: rgba(255,255,255,.85); }.page-jump button { height: 100%; border: 0; padding: 0 11px; background: rgba(12,68,150,.38); color: white; font: 10px "DM Mono", monospace; }.page-jump button:hover { background: rgba(12,68,150,.68); }

.page-stage { position: relative; z-index: 1; display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; }.book-glow { position: absolute; width: min(48vw, 620px); height: min(66vh, 670px); border-radius: 50%; background: rgba(0, 15, 70, .4); filter: blur(42px); transform: translateY(28px) rotate(-2deg); }.page { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fbfbf8; color: #172554; box-shadow: inset 0 0 0 1px rgba(8, 37, 95, .18); }.page canvas { display: block; width: 100%; height: 100%; object-fit: contain; background: white; }.page-content { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; padding: 34px 31px 26px; background: white; }.page-content p { max-width: 85%; color: #65718e; font-size: 11px; line-height: 1.6; }.page-number { color: #8290ad; font: 10px "DM Mono", monospace; }.cover-page .page-content { overflow: hidden; padding: 0; color: #24315f; background: #fdfdfc; }.cover-page .page-content::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 57%; background: linear-gradient(140deg, #e3f2f3 0%, #8db4b7 26%, #526c70 45%, #e5d7bb 46%, #b08d68 75%, #334b4e 100%); }.cover-page .page-content::after { content: ""; position: absolute; left: -14%; top: 40%; width: 132%; height: 27%; background: linear-gradient(25deg, rgba(4, 53, 77, .78) 0 18%, rgba(255,255,255,.3) 18% 23%, rgba(7, 126, 160, .65) 23% 51%, rgba(255,255,255,.08) 51% 100%); transform: rotate(26deg); }.cover-page .demo-kicker { position: absolute; z-index: 2; top: 36px; left: 37px; color: #19a9c6; font: 800 12px Manrope, sans-serif; letter-spacing: .01em; }.cover-page h3 { position: absolute; z-index: 3; left: 36px; bottom: 101px; margin: 0; max-width: 310px; color: #24315e; font-size: clamp(30px, 3.1vw, 42px); line-height: .99; letter-spacing: -.075em; text-transform: uppercase; }.cover-page h3 span { display: block; font-size: .63em; letter-spacing: -.04em; }.cover-page p { position: absolute; z-index: 3; left: 37px; bottom: 66px; max-width: 205px; margin: 0; padding: 3px 7px; color: white; background: linear-gradient(90deg, #536a96, #54dce1); text-align: center; font-size: 9px; font-weight: 700; line-height: 1.1; }.cover-page .page-number { position: absolute; z-index: 4; right: 17px; bottom: 16px; color: rgba(255,255,255,.75); }.cover-page .demo-mark { position: absolute; z-index: 3; right: 25px; bottom: 12px; width: 80px; height: 65px; background: linear-gradient(140deg, transparent 0 48%, #21c7d0 49% 100%); }
.side-nav { position: absolute; z-index: 3; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(18, 92, 173, .76); color: rgba(255,255,255,.85); box-shadow: 0 4px 12px rgba(0,24,81,.23), inset 0 1px rgba(255,255,255,.12); font-size: 40px; font-weight: 200; line-height: .65; backdrop-filter: blur(4px); transition: .2s ease; }.side-nav:hover { background: rgba(51, 137, 222, .92); transform: scale(1.05); }.side-nav-next { right: 1.2%; top: 50%; }.side-nav-previous { left: 1.2%; top: 50%; opacity: 0; pointer-events: none; }
.viewer-bottom-bar { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center; gap: 8px; min-height: 41px; }.page-dots { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 120px; height: 28px; padding: 0 15px; border-radius: 17px; background: rgba(3, 69, 156, .45); box-shadow: inset 0 1px rgba(255,255,255,.07); }.page-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(230,244,255,.44); transition: .2s ease; }.page-dot:hover { background: white; }.page-dot.active { background: white; box-shadow: 0 0 8px white; }.bottom-page-number { display: grid; place-items: center; min-width: 79px; height: 28px; border-radius: 17px; background: rgba(3, 69, 156, .45); color: white; font: 12px "DM Mono", monospace; }

.toast { position: fixed; left: 50%; bottom: 77px; z-index: 20; padding: 11px 17px; border: 1px solid rgba(195, 233, 255, .28); border-radius: 12px; background: rgba(6, 58, 132, .9); color: white; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(0, 21, 67, .64); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: .2s; }.modal-backdrop.open { opacity: 1; pointer-events: auto; }.help-modal { position: relative; width: min(410px, 100%); padding: 30px; border: 1px solid rgba(165, 224, 255, .3); border-radius: 18px; background: #0752a5; box-shadow: 0 25px 90px rgba(0,0,0,.35); }.modal-close { position: absolute; top: 13px; right: 16px; border: 0; background: transparent; color: rgba(255,255,255,.74); font-size: 24px; }.modal-kicker { color: #7deaff; font: 10px "DM Mono", monospace; letter-spacing: .14em; }.help-modal h2 { margin: 12px 0 9px; font-size: 24px; letter-spacing: -.05em; }.help-modal p { color: rgba(255,255,255,.73); font-size: 12px; line-height: 1.7; }.guide-row { display: flex; align-items: center; gap: 12px; margin-top: 17px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.14); }.guide-row span { min-width: 58px; }.guide-row small { color: rgba(255,255,255,.76); font-size: 11px; }.help-modal kbd { padding: 3px 6px; border: 1px solid rgba(255,255,255,.28); border-radius: 4px; background: rgba(255,255,255,.1); font: 10px "DM Mono", monospace; }

@keyframes rainFall { from { transform: translate3d(0, 0, 0) rotate(12deg); } to { transform: translate3d(var(--drift), 125vh, 0) rotate(12deg); } }
@keyframes windSweep { from { transform: translate3d(-10vw, 0, 0) rotate(-8deg); } to { transform: translate3d(190vw, var(--wind-rise), 0) rotate(-8deg); } }
@keyframes lightningFlash { 0%, 12%, 32%, 100% { opacity: 0; } 6%, 22% { opacity: .88; } }
@keyframes flashGlow { 0%, 13%, 34%, 100% { opacity: 0; } 6%, 23% { opacity: 1; } }
@media (max-width: 700px) { .flipbook-viewer { padding: 10px 10px 12px; }.viewer-topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }.viewer-branding { grid-column: 1 / -1; justify-self: center; max-width: 100%; }.toolbar { grid-column: 1; grid-row: 2; justify-self: start; padding: 4px 7px; }.page-jump { grid-column: 2; grid-row: 2; }.toolbar-button { width: 24px; font-size: 14px; }.toolbar-divider { margin: 0 1px; }.page-jump > span:first-child { min-width: 31px; padding-left: 8px; }.page-total { padding-right: 6px; }.page-jump button { padding: 0 8px; }.side-nav { width: 42px; height: 42px; font-size: 32px; }.side-nav-next { right: 1%; }.side-nav-previous { left: 1%; }.viewer-bottom-bar { grid-template-columns: 1fr auto auto 1fr; gap: 5px; }.page-dots { min-width: 0; padding-inline: 9px; }.page-dot { width: 8px; height: 8px; }.bottom-page-number { min-width: 42px; } }
@media (max-width: 450px) { .toolbar-button:nth-child(3), .toolbar-button:nth-child(4), .toolbar-button:nth-child(8) { display: none; }.side-nav { width: 35px; height: 35px; font-size: 28px; }.side-nav-next { right: -3px; }.side-nav-previous { left: -3px; }.page-dots { gap: 4px; }.bottom-page-number { display: none; } }


/* The renderer owns the page transforms. Centering belongs to its outer frame. */
.book-positioner {
  position: relative;
  width: 880px;
  height: 638px;
  flex: none;
  will-change: transform;
}
.book {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  transform: none;
  filter: none;
}
.book .stf__wrapper { width: 100%; height: 100%; position: relative; }
.book .stf__block { width: 100%; height: 100%; }
.book .page { border: 1px solid rgba(39,43,55,.14); }
.book .page img { width: 100%; height: 100%; display: block; object-fit: contain; background: white; user-select: none; }
.page-content { padding: 9% 9% 6%; }
.page-content h3 { font-size: clamp(20px, 2.2vw, 32px); letter-spacing: -.05em; line-height: 1.2; margin: 30px 0 20px; }
.page-content p { font-size: clamp(14px, 1.2vw, 17px); line-height: 1.8; max-width: 100%; }
.demo-section { font-size: 11px; letter-spacing: .14em; color: #179db1; }
.section-rule { width: 42px; height: 3px; background: #1ca7bb; }
.page-number { font-size: 12px; }
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.page.--left::after { background: linear-gradient(to left, rgba(32,27,19,.14), rgba(32,27,19,.035) 4%, transparent 13%); }
.page.--right::after { background: linear-gradient(to right, rgba(32,27,19,.12), rgba(32,27,19,.025) 4%, transparent 13%); }
.blank-page { background: #faf9f5; }
.cover-page h3 { bottom: 16%; left: 8%; font-size: clamp(22px, 3.1vw, 42px); }
.cover-page p { bottom: 10%; left: 8%; }
.cover-page .demo-kicker { top: 6%; left: 8%; }
.back-cover .page-content::before { height: 100%; background: radial-gradient(circle at 72% 22%, rgba(70,228,239,.62), transparent 18%), linear-gradient(160deg, #0a4f9f, #0b7ec0 50%, #16c9cd); }
.back-cover .page-content::after { top: 58%; left: -25%; width: 150%; height: 19%; background: rgba(255,255,255,.13); transform: rotate(-19deg); }
.back-cover .demo-kicker, .back-cover h3, .back-cover p, .back-cover .page-number { color: white; }
.back-cover p { background: rgba(22,54,121,.65); }
.book-glow { width: min(65vw, 650px); height: 55%; opacity: .4; pointer-events: none; }
.side-nav { top: calc(50% - 26px); }
.side-nav-previous { opacity: 1; pointer-events: auto; }
.side-nav:disabled { opacity: 0; pointer-events: none; }
.toolbar-button:disabled { opacity: .3; cursor: default; }
.toolbar-button[aria-pressed="true"] { background: rgba(255,255,255,.2); }
.language-switcher {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(146, 218, 255, .22);
  border-radius: 18px;
  background: rgba(22, 91, 179, .72);
  box-shadow: 0 5px 18px rgba(0, 25, 90, .18), inset 0 1px rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.language-button {
  min-width: 38px;
  height: 27px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255,255,255,.82);
  font: 700 10px "DM Mono", monospace;
  letter-spacing: .08em;
}
.language-button:hover, .language-button.active { background: rgba(255,255,255,.22); color: white; }
.language-button:disabled { opacity: .35; cursor: default; }
.viewer-topbar, .viewer-bottom-bar { z-index: 20; flex-shrink: 0; }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 7px; }
.media-button { display: inline-flex; align-items: center; justify-content: center; min-height: 29px; padding: 0 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.18); box-shadow: inset 0 1px rgba(255,255,255,.12); color: white; font: 700 11px "DM Mono", monospace; text-decoration: none; transition: .2s ease; }
.media-button:hover { background: rgba(255,255,255,.28); }
.page-jump, .page-jump button { font-size: 13px; }
.page-jump > span:first-child { min-width: 50px; padding-inline: 10px; }
.page-stage { isolation: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
@media (max-width: 700px) {
  .toolbar { justify-self: start; }
  .topbar-actions { grid-column: 1 / -1; grid-row: 3; gap: 4px; }
  .media-button { min-height: 29px; padding: 0 8px; font-size: 10px; }
  .book-positioner { max-width: none; }
  .side-nav { top: calc(50% - 21px); }
  .page-content h3 { font-size: 24px; }
}
@media (max-width: 450px) {
  .viewer-branding { gap: 6px; }
  .viewer-logos { gap: 3px; }
  .viewer-logos img { width: 23px; height: 30px; }
  .viewer-logos img + img { width: 45px; height: 25px; }
  .brand-copy h1 { font-size: 13px; }
  .brand-title { font-size: 9px; }
  .brand-slogan { font-size: 8px; }
}
@media (max-height: 500px) {
  .flipbook-viewer { padding-block: 5px; }
  .viewer-topbar, .viewer-bottom-bar { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .viewer-background *, .viewer-background::after, .storm-weather::before { animation: none; }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: none;
}

::view-transition-new(root) {
  animation: bookReveal 1.35s cubic-bezier(.45, 0, .2, 1) both;
}

@keyframes bookReveal {
  from { clip-path: circle(0 at 50% 50%); }
  to { clip-path: circle(75vmax at 50% 50%); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation: none; }
}
