:root {
  color-scheme: light;
  --ink: #15211c;
  --muted: #65736d;
  --line: #d7ded8;
  --paper: #fffdf8;
  --page-bg: #eef1ed;
  --brand: #005f52;
  --brand-dark: #023f38;
  --gold: #f3c34d;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(215, 222, 216, 0.92);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 12px clamp(14px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: var(--brand);
  color: var(--white);
}

.button.secondary {
  background: transparent;
  color: var(--brand-dark);
}

.document-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px clamp(10px, 4vw, 28px) 72px;
}

.intro {
  padding: 12px 4px 18px;
}

.intro p {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 8vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.pages {
  display: grid;
  gap: clamp(18px, 5vw, 32px);
}

.page {
  margin: 0;
  display: grid;
  gap: 10px;
}

.page-image-wrap {
  position: relative;
  width: min(100%, 920px);
  margin: 0 auto;
}

.page img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(21, 33, 28, 0.12);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(21, 33, 28, 0.12);
}

.page-link {
  position: absolute;
  z-index: 2;
  display: block;
  border-radius: 6px;
  outline: 0;
}

.page-link:hover,
.page-link:focus-visible {
  background: rgba(243, 195, 77, 0.18);
  box-shadow: inset 0 0 0 2px rgba(243, 195, 77, 0.9);
}

.page figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.download-band {
  margin-top: 34px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.download-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.download-band h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.15;
  letter-spacing: 0;
}

.back-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 12;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(2, 63, 56, 0.24);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 620px) {
  .topbar-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .brand strong {
    white-space: normal;
  }

  .document-shell {
    padding-inline: 8px;
  }

  .intro {
    padding-inline: 6px;
  }

  .page img {
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(21, 33, 28, 0.12);
  }

  .download-band {
    align-items: stretch;
    flex-direction: column;
    margin-inline: 2px;
  }

  .download-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
