/* Pixel-faithful PDF viewer */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #ffffff;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #1a2b3c;
}

.deck-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 1rem;
  background: #013658;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.deck-header .brand {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.deck-header .brand span {
  opacity: 0.75;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.lang-switch a:hover {
  color: #fff;
}

.lang-switch a.active {
  background: #fff;
  color: #013658;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: #ffc000;
  color: #013658;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn-download:hover {
  filter: brightness(1.05);
}

.btn-download svg {
  width: 15px;
  height: 15px;
}

.deck {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  background: #ffffff;
}

.deck-page {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  background: #fff;
  margin-bottom: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(1, 54, 88, 0.08);
}

.deck-page:last-child {
  margin-bottom: 0;
}

.deck-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  background: #013658;
}

.deck-footer .btn-download {
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  color: #013658 !important;
  background: #ffc000;
}

.deck-footer .btn-download svg {
  stroke: #013658;
}

.deck-footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin: 1rem 0 0;
}

.deck-footer p a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.deck-footer p a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* Mobile / tablet: scroll to top */
.btn-scroll-top {
  position: fixed;
  right: 1rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #013658;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 24px rgba(1, 54, 88, 0.4);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

.btn-scroll-top svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  pointer-events: none;
}

.btn-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.btn-scroll-top.is-visible:active {
  transform: translateY(0) scale(0.92);
}

@media (min-width: 1025px) {
  .btn-scroll-top {
    display: none !important;
  }
}
