@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/BebasNeue-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue-deep: #02245f;
  --blue: #0c4cb3;
  --blue-bright: #1a66d6;
  --sheet: #e0e6ec;
  --ink: #161616;
  --chapter: #345dce;
  --logo: #337efb;
  --line: rgba(16, 36, 72, 0.14);
  --serif: "Times New Roman", Times, "Nimbus Roman", serif;
  --sans: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Bebas Neue", "Arial Narrow", "Nimbus Sans Narrow", Impact, sans-serif;
  --header: 64px;
  --page: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% 20%, rgba(70, 140, 255, 0.35), transparent 60%),
    radial-gradient(900px 600px at 100% 80%, rgba(0, 20, 80, 0.45), transparent 55%),
    linear-gradient(165deg, #1b6adf 0%, #0d4fbe 38%, #08368a 100%);
  font-family: var(--sans);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.05) 42% 46%, transparent 46% 70%, rgba(0, 20, 70, 0.18) 70% 100%);
  z-index: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { top: 12px; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #9ec6ff, #fff);
  z-index: 30;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  background: rgba(6, 28, 78, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar__inner { height: var(--header); }

.topbar__inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex: none;
}

.brand img { width: 34px; height: 31px; display: block; }

.brand small {
  display: block;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}

.nav a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 7px;
  border-radius: 999px;
}

.nav a:hover,
.nav a.is-active { background: rgba(255, 255, 255, 0.16); color: #fff; }

.nav a.pdf {
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-left: 6px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.stage {
  position: relative;
  z-index: 1;
  width: min(var(--page), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.cover {
  background: #ececee;
  color: #111;
  box-shadow: 0 22px 60px rgba(2, 16, 48, 0.35);
  overflow: hidden;
  margin-bottom: 28px;
}

.cover__top {
  position: relative;
  padding: 28px 36px 18px;
  background:
    linear-gradient(128deg, transparent 0 68%, #d5d8de 68% 100%);
}

.cover__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.cover__brand img { width: 58px; height: 53px; }

.cover__brand .year {
  margin-left: auto;
  font-family: var(--display);
  font-weight: 400;
  font-size: 46px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.cover__rule {
  height: 3px;
  margin: 14px 0 6px;
  background: #111;
}

.cover h1 {
  margin: 18px 0 8px;
  line-height: 0.86;
}

.cover h1 .ltd,
.cover h1 .wp {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.cover h1 .ltd {
  color: #3a62c4;
  font-size: clamp(64px, 10vw, 104px);
}

.cover h1 .wp {
  color: #111;
  font-size: clamp(52px, 8vw, 84px);
  margin-top: 4px;
}

.cover__dots {
  position: absolute;
  right: 28px;
  bottom: 18px;
  width: 120px;
  height: 90px;
  background-image: radial-gradient(circle, rgba(90, 130, 190, 0.55) 1.1px, transparent 1.3px);
  background-size: 10px 10px;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.cover__photo {
  position: relative;
  min-height: 280px;
}

.cover__photo img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 42%;
}

.ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring--blue {
  width: min(46vw, 340px);
  height: min(46vw, 340px);
  left: -8%;
  top: 8%;
  background: rgba(79, 146, 230, 0.5);
  border: 3px solid rgba(176, 132, 62, 0.55);
}

.ring--pale {
  width: min(28vw, 210px);
  height: min(28vw, 210px);
  left: -6%;
  bottom: 8%;
  background: rgba(236, 239, 243, 0.88);
}

.cover__tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 16px 20px 18px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(36, 112, 214, 0.15), rgba(28, 104, 214, 0.88) 28%, rgba(24, 98, 210, 0.92));
  font-weight: 650;
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: 0.01em;
}

.sheet {
  position: relative;
  background: var(--sheet);
  border-radius: 28px;
  padding: 32px 86px 48px 64px;
  margin: 0 0 26px;
  box-shadow: 0 18px 48px rgba(3, 20, 60, 0.28);
  overflow: hidden;
  scroll-margin-top: 112px;
}

.sheet__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.sheet__head img { width: 54px; height: 49px; display: block; }

.rule {
  flex: 1;
  height: 5px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1c1c1c 0 34%, #3d4f9a 52%, #6d8cff 74%, #b7dcff 100%);
}

.chapter {
  position: relative;
  z-index: 1;
  margin: 4px 0 18px;
  color: var(--chapter);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.chapter i {
  font-style: normal;
  font-weight: 500;
  margin: 0 0.35rem;
  opacity: 0.8;
}

.sheet h3 {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 1.35rem 0 0.55rem;
  scroll-margin-top: 120px;
}

.sheet p,
.kicker,
.toc a,
.colophon p {
  font-family: var(--serif);
}

.sheet p {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.72;
  text-align: justify;
}

.kicker {
  position: relative;
  z-index: 1;
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #5c6d88;
}

.sheet h2.plain {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-size: 1.8rem;
  margin: 6px 0 16px;
  letter-spacing: -0.03em;
}

.toc {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.toc a {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.35;
}

.toc a:hover { color: var(--chapter); }

.toc .ch { font-weight: 700; }

.toc .num {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--chapter);
  font-size: 0.92rem;
}

.toc .sub { font-size: 0.96rem; }
.toc .sub .num { font-weight: 600; color: #5d7194; }

.figure {
  position: relative;
  z-index: 1;
  margin: 0.4rem 0 0.2rem;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.constellation {
  position: absolute;
  right: 22px;
  top: 18%;
  bottom: 12%;
  width: 70px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px),
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 36%, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 40% 52%, rgba(255, 255, 255, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 68%, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 36% 84%, rgba(255, 255, 255, 0.75) 0 2px, transparent 3px),
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)) 48% 12% / 1px 78% no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: min(420px, calc(100% - 32px));
  margin: 0 auto 10px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pager a,
.pager span {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.pager a {
  padding: 8px 12px;
  border-radius: 999px;
}

.pager a:hover { background: rgba(255, 255, 255, 0.14); }
.pager a[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }

.pager span {
  min-width: 9.5rem;
  padding: 0 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.colophon {
  position: relative;
  z-index: 1;
  width: min(var(--page), calc(100% - 32px));
  margin: 0 auto 48px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 14px;
}

.colophon a { color: #fff; }

@media (min-width: 1100px) {
  .toc { columns: 2; column-gap: 2.4rem; }
  .toc li { break-inside: avoid; }
}

.chapter + h3 { margin-top: 0.15rem; }

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    width: min(var(--page), calc(100% - 32px));
    transform: translateX(-50%);
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    background: #061844;
    z-index: 20;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  }
  .nav.is-open { display: flex; }
  .nav a.pdf { margin-left: 0; text-align: center; }
}

@media (max-width: 720px) {
  .sheet { padding: 22px 20px 32px; border-radius: 18px; }
  .cover__top { padding: 20px 18px 12px; }
  .cover__photo img { height: 280px; }
  .cover h1 .ltd { font-size: 58px; }
  .cover h1 .wp { font-size: 46px; }
  .sheet p { text-align: left; }
  .constellation { display: none; }
  .pager span { min-width: 8.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body { background: #fff; }
  body::before, .topbar, .pager, .progress, .constellation { display: none; }
  .stage, .colophon { width: auto; margin: 0; padding: 0; color: #000; }
  .sheet, .cover { box-shadow: none; break-inside: avoid; }
}
