:root {
  --red: #b71920;
  --dark-red: #6f0f15;
  --ink: #251d18;
  --paper: #f4d66f;
  --paper-dark: #d7b64e;
  --gold: #ffd43b;
  --desk: #a20f16;
  --green: #56624a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,210,45,.08) 25%, transparent 25%) 0 0 / 46px 46px,
    linear-gradient(315deg, rgba(255,210,45,.06) 25%, transparent 25%) 0 0 / 46px 46px,
    var(--desk);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.desk-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background:
    repeating-linear-gradient(91deg, transparent 0 10px, rgba(20,10,4,.12) 10px 11px),
    repeating-linear-gradient(2deg, transparent 0 27px, rgba(255,255,255,.05) 27px 28px);
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(100% - 48px, 1500px);
  margin: 0 auto;
  padding: 22px 0;
  color: var(--gold);
  text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 10px; font: 900 15px/1 Georgia, serif; letter-spacing: .14em; }
.brand-star { color: #e5ba4d; font-size: 25px; }
.topbar-actions { display: flex; align-items: stretch; gap: 10px; }
.topbar nav { display: flex; gap: 8px; }
.topbar nav a { padding: 9px 12px; border: 2px solid rgba(255,212,59,.62); background: rgba(91,7,12,.3); font: 800 10px/1 Arial, sans-serif; letter-spacing: .12em; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: #fff; border-color: #fff; outline: none; }
.music-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 132px; padding: 8px 12px; border: 2px solid var(--gold); background: #680b11; color: var(--gold); cursor: pointer; font: 900 9px/1 Arial, sans-serif; letter-spacing: .1em; box-shadow: 3px 3px 0 rgba(47,3,6,.45); }
.music-toggle:hover, .music-toggle:focus-visible { background: #85131a; color: #fff07e; outline: 2px solid rgba(255,212,59,.35); outline-offset: 2px; }
.music-toggle.is-playing { background: var(--gold); color: var(--dark-red); }
.music-bars { display: flex; align-items: flex-end; gap: 2px; width: 15px; height: 15px; }
.music-bars i { display: block; width: 3px; height: 35%; background: currentColor; transform-origin: bottom; }
.music-bars i:nth-child(2) { height: 80%; }
.music-bars i:nth-child(3) { height: 55%; }
.music-toggle.is-playing .music-bars i { animation: soundBar .7s ease-in-out infinite alternate; }
.music-toggle.is-playing .music-bars i:nth-child(2) { animation-delay: -.24s; }
.music-toggle.is-playing .music-bars i:nth-child(3) { animation-delay: -.42s; }
@keyframes soundBar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100svh - 72px);
  padding: 26px 30px 70px;
  overflow: hidden;
}

.sunburst {
  position: absolute;
  inset: -45%;
  z-index: -1;
  background: repeating-conic-gradient(from -12deg, rgba(255,213,57,.2) 0 8deg, transparent 8deg 18deg);
  animation: posterTurn 80s linear infinite;
}
.hero-emblem { position: absolute; z-index: -1; color: rgba(255,213,57,.32); font: 900 clamp(120px, 18vw, 280px)/1 Georgia, serif; text-shadow: 5px 5px 0 rgba(91,7,12,.2); }
.emblem-left { left: -2vw; top: 4vh; transform: rotate(-9deg); }
.emblem-right { right: 1vw; bottom: 3vh; transform: rotate(11deg); }
@keyframes posterTurn { to { transform: rotate(360deg); } }

.passport {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1400px, 96vw);
  min-height: 700px;
  filter: drop-shadow(0 30px 28px rgba(48,3,6,.5));
  transform: rotate(-.25deg);
}
.passport::before {
  content: "";
  position: absolute;
  inset: -13px;
  z-index: -2;
  border: 4px solid #3b0d13;
  border-radius: 10px;
  background: #8f1018;
  box-shadow: inset 0 0 0 5px #bf2328, inset 0 0 0 8px rgba(255,212,59,.58);
}
.passport-spine {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 50%;
  z-index: 8;
  width: 28px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(65,35,23,.38), rgba(255,255,255,.18) 48%, rgba(65,35,23,.42));
  box-shadow: -8px 0 12px rgba(54,33,18,.16), 8px 0 12px rgba(54,33,18,.16);
  pointer-events: none;
}

.passport-page {
  position: relative;
  min-width: 0;
  padding: clamp(34px, 4vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.36), transparent 22%),
    repeating-linear-gradient(0deg, rgba(87,65,38,.025) 0 1px, transparent 1px 4px),
    var(--paper);
}
.photo-page { border-radius: 5px 0 0 5px; }
.data-page { border-radius: 0 5px 5px 0; }
.passport-page::after {
  content: "USSR  ★  SOVIET DOG  ★  USSR  ★  SOVIET DOG  ★  USSR";
  position: absolute;
  left: -10%;
  bottom: 31%;
  width: 130%;
  color: rgba(129,15,21,.07);
  font: 900 36px/1 Georgia, serif;
  letter-spacing: .16em;
  transform: rotate(-28deg);
  white-space: nowrap;
  pointer-events: none;
}

.page-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 2px solid var(--red); color: var(--red); font: 900 12px/1 Georgia, serif; letter-spacing: .13em; }
.page-header b { font-size: 30px; }
.photo-frame {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  margin: 34px auto 20px;
  padding: 12px;
  border: 2px solid #5e5546;
  background: #d9cfb7;
  box-shadow: 8px 8px 0 rgba(92,70,45,.15);
  transform: rotate(-1deg);
}
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; filter: sepia(.1) contrast(.97) saturate(.88); }
.photo-corner { position: absolute; width: 46px; height: 46px; border-color: var(--red); border-style: solid; }
.corner-one { top: 4px; left: 4px; border-width: 3px 0 0 3px; }
.corner-two { right: 4px; bottom: 4px; border-width: 0 3px 3px 0; }
.round-stamp {
  position: absolute;
  right: -45px;
  bottom: -32px;
  display: grid;
  place-items: center;
  width: 142px;
  aspect-ratio: 1;
  border: 5px double rgba(127,29,35,.75);
  border-radius: 50%;
  color: rgba(127,29,35,.8);
  font: 900 9px/1 Arial, sans-serif;
  letter-spacing: .08em;
  transform: rotate(-16deg);
}
.round-stamp strong { font-size: 41px; line-height: .7; }
.round-stamp small { font-size: 8px; }
.photo-caption { display: flex; justify-content: space-between; gap: 20px; width: min(100%, 460px); margin: 0 auto; color: #574b3a; font: 800 9px/1 Arial, sans-serif; letter-spacing: .12em; }
.photo-caption strong { color: var(--red); font-size: 12px; }
.signature { width: min(82%, 400px); margin: 46px auto 0; padding-bottom: 4px; border-bottom: 1px solid #6f6250; color: #3e4764; font: italic 32px/1 "Brush Script MT", cursive; text-align: right; transform: rotate(-4deg); }

.document-number { display: flex; justify-content: space-between; color: var(--red); font: 900 12px/1 "Courier New", monospace; letter-spacing: .12em; }
.document-number span { color: #514538; }
.document-label { margin: 46px 0 8px; color: #72634e; font: 800 10px/1 Arial, sans-serif; letter-spacing: .18em; }
h1 { margin: 0; color: var(--dark-red); font: 900 clamp(58px, 6vw, 106px)/.9 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.token-stamp { display: inline-block; margin: 17px 0 30px; padding: 8px 12px 7px; border: 3px solid var(--red); color: var(--red); font: 900 clamp(18px, 2vw, 28px)/1 "Courier New", monospace; transform: rotate(-2deg); }
.passport-fields { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin: 0 0 28px; }
.passport-fields div { min-width: 0; padding-bottom: 9px; border-bottom: 1px solid rgba(67,51,36,.48); }
.passport-fields dt { margin-bottom: 5px; color: #806e55; font: 800 8px/1 Arial, sans-serif; letter-spacing: .15em; }
.passport-fields dd { margin: 0; font: 900 13px/1.2 "Courier New", monospace; }

.contract, .bottom-contract {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 2px solid var(--red);
  background: rgba(255,250,229,.45);
  cursor: pointer;
  text-align: left;
}
.contract { padding: 15px; }
.contract span, .contract em, .bottom-contract span, .bottom-contract em { color: var(--red); font: 900 8px/1 Arial, sans-serif; letter-spacing: .13em; font-style: normal; }
.contract strong, .bottom-contract strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 11px/1 "Courier New", monospace; text-align: center; }
.contract:hover, .contract:focus-visible { background: rgba(255,255,255,.64); outline: 3px solid rgba(138,31,41,.2); }

.passport-actions { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 13px; }
.passport-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border: 2px solid var(--dark-red); background: #ffdf55; color: var(--dark-red); box-shadow: 4px 4px 0 rgba(91,7,12,.3); font: 900 10px/1 Arial, sans-serif; letter-spacing: .06em; transition: transform .14s ease, box-shadow .14s ease; }
.passport-button:hover, .passport-button:focus-visible { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(52,40,31,.25); outline: none; }
.passport-button svg { width: 27px; height: 27px; fill: currentColor; }
.pump-button svg, .dex-button svg { width: 32px; height: 32px; }
.pump-button { background: #f1c83c; }
.dex-button { background: #ffea79; color: var(--dark-red); }
.approval-stamp { position: absolute; right: 42px; bottom: 66px; z-index: 0; padding: 10px 15px; border: 5px double rgba(117,27,34,.25); color: rgba(117,27,34,.25); font: 900 21px/1 Arial, sans-serif; letter-spacing: .1em; transform: rotate(-11deg); }
.fine-print { position: absolute; left: clamp(34px,4vw,64px); right: clamp(34px,4vw,64px); bottom: 21px; margin: 0; color: #74654f; font: 700 8px/1.3 Arial, sans-serif; letter-spacing: .08em; }

.archive-section {
  position: relative;
  min-height: 100vh;
  padding: clamp(75px, 8vw, 120px) max(24px, calc((100vw - 1460px)/2));
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08) 25%, transparent 25%) 0 0 / 32px 32px,
    #efc832;
  color: var(--dark-red);
  border-top: 9px solid #681016;
  border-bottom: 9px solid #681016;
}
.archive-section::before, .archive-section::after { content: "★"; position: absolute; color: rgba(153,13,20,.09); font: 900 430px/1 Georgia, serif; pointer-events: none; }
.archive-section::before { left: -90px; top: 90px; }
.archive-section::after { right: -90px; bottom: -120px; }
.archive-banner { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 20px; padding: 14px 20px; background: var(--red); color: var(--gold); border: 4px double var(--gold); font: 900 13px/1 Georgia, serif; letter-spacing: .18em; }
.archive-banner span { font-size: 26px; }
.archive-heading { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 42px 0 28px; }
.archive-heading p { margin: 0 0 8px; font: 900 10px/1 Arial, sans-serif; letter-spacing: .16em; }
.archive-heading h2 { margin: 0; font: 900 clamp(42px, 5vw, 76px)/.88 Georgia, serif; letter-spacing: -.04em; }
.archive-number { padding: 10px 13px; border: 3px solid var(--red); font: 900 11px/1 "Courier New", monospace; transform: rotate(2deg); }
.archive-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.archive-grid figure { margin: 0; padding: 12px; border: 3px solid var(--dark-red); background: #f7e596; box-shadow: 8px 8px 0 var(--red); }
.archive-grid figure:nth-child(1) { transform: rotate(-1deg); }
.archive-grid figure:nth-child(2) { transform: rotate(.7deg); }
.archive-grid figure:nth-child(3) { transform: rotate(-.5deg); }
.archive-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid #311c16; background: #211a18; }
.archive-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.16) 3px 4px); mix-blend-mode: screen; }
.archive-photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) sepia(.12) contrast(1.08); transition: transform .28s ease; }
.archive-grid figure:hover img { transform: scale(1.025); }
.archive-grid figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 13px 3px 2px; font: 900 9px/1.2 "Courier New", monospace; }
.archive-grid figcaption span { text-align: right; opacity: .7; }
.archive-footerline { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 38px; padding-top: 18px; border-top: 3px solid var(--red); font: 900 10px/1 Arial, sans-serif; letter-spacing: .12em; }
.archive-footerline a { padding: 12px 15px; background: var(--red); color: var(--gold); border: 2px solid var(--dark-red); }

.chart-section { min-height: 100vh; padding: clamp(75px, 9vw, 135px) max(24px, calc((100vw - 1400px)/2)); background: linear-gradient(145deg, #a81018, #700d13); color: #ffe35b; border-top: 8px solid #3d1015; }
.chart-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.chart-heading p { margin: 0 0 9px; color: var(--gold); font: 800 10px/1 Arial, sans-serif; letter-spacing: .18em; }
.chart-heading h2 { margin: 0; font: 900 clamp(38px, 5vw, 72px)/.9 Georgia, serif; }
.chart-heading a { padding: 10px 12px; border: 1px solid var(--gold); font: 800 9px/1 Arial, sans-serif; letter-spacing: .12em; }
.chart-frame { position: relative; min-height: 650px; padding: 18px; border: 5px double var(--gold); background: #221b17; box-shadow: 12px 12px 0 #4c1017, -8px -8px 0 #d7ac24; }
.chart-plaque { position: absolute; top: -19px; left: 28px; z-index: 3; padding: 9px 13px; border: 2px solid #4c1017; background: var(--paper); color: var(--dark-red); font: 900 9px/1 Arial, sans-serif; letter-spacing: .12em; }
.chart-frame iframe { display: block; width: 100%; height: 615px; border: 0; background: #17110e; }
.chart-fallback { position: absolute; inset: 18px; display: grid; place-content: center; justify-items: center; gap: 16px; background: repeating-linear-gradient(45deg, rgba(217,182,92,.03) 0 15px, transparent 15px 30px), #261a17; text-align: center; }
.chart-fallback.is-hidden { display: none; }
.chart-fallback > span { color: var(--gold); font-size: 64px; }
.chart-fallback strong { font: 900 clamp(17px, 2vw, 27px)/1.2 Georgia, serif; }
.chart-fallback a { padding: 12px 16px; border: 2px solid var(--gold); color: var(--gold); font: 900 9px/1 Arial, sans-serif; letter-spacing: .12em; }
.bottom-contract { margin-top: 28px; padding: 14px 16px; border-color: var(--gold); background: rgba(48,11,14,.55); color: #f8edce; }
.bottom-contract span, .bottom-contract em { color: var(--gold); }

footer { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 24px; border-top: 3px solid var(--gold); background: #650d13; color: var(--gold); font: 900 10px/1 Arial, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%,18px); padding: 12px 17px; border: 2px solid #361015; background: var(--paper); color: var(--dark-red); box-shadow: 5px 5px 0 var(--gold); font: 900 10px/1 Arial, sans-serif; letter-spacing: .1em; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 980px) {
  .hero { padding-top: 18px; }
  .passport { grid-template-columns: 1fr; width: min(760px, 94vw); transform: none; }
  .passport-spine { display: none; }
  .photo-page { border-radius: 5px 5px 0 0; }
  .data-page { border-radius: 0 0 5px 5px; min-height: 660px; }
  .passport-page { padding: 44px; }
  .photo-frame { width: min(82%, 470px); }
  .round-stamp { right: -28px; }
  .chart-frame { min-height: 540px; }
  .chart-frame iframe { height: 510px; }
  .archive-grid { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; }
  .archive-grid figure { transform: none !important; }
}

@media (max-width: 620px) {
  .topbar { width: calc(100% - 28px); padding: 15px 0; }
  .brand { font-size: 12px; }
  .topbar-actions { gap: 6px; }
  .topbar nav a { padding: 8px; font-size: 8px; }
  .topbar nav a:nth-child(2) { display: none; }
  .music-toggle { min-width: 44px; padding: 8px; }
  .music-toggle > span:last-child { display: none; }
  .hero { padding: 14px 14px 48px; }
  .passport { width: 100%; }
  .passport::before { inset: -7px; }
  .passport-page { padding: 26px 20px; }
  .photo-frame { width: 88%; margin-top: 25px; padding: 8px; }
  .round-stamp { right: -16px; bottom: -24px; width: 112px; }
  .signature { margin-top: 38px; }
  .data-page { min-height: 620px; }
  .document-label { margin-top: 34px; }
  h1 { font-size: clamp(50px, 18vw, 78px); }
  .passport-fields { grid-template-columns: 1fr; gap: 12px; }
  .contract { grid-template-columns: 1fr auto; }
  .contract strong { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .passport-actions { grid-template-columns: 1fr; }
  .passport-button { min-height: 48px; }
  .fine-print { position: static; margin-top: 25px; }
  .approval-stamp { display: none; }
  .chart-section { padding-left: 14px; padding-right: 14px; }
  .archive-section { padding-left: 14px; padding-right: 14px; }
  .archive-banner { gap: 10px; font-size: 9px; letter-spacing: .08em; }
  .archive-heading { align-items: flex-start; }
  .archive-heading h2 { font-size: 39px; }
  .archive-number { font-size: 8px; }
  .archive-footerline { align-items: flex-start; flex-direction: column; }
  .chart-heading { align-items: flex-start; }
  .chart-heading h2 { font-size: 37px; }
  .chart-heading a { font-size: 7px; }
  .chart-frame { min-height: 470px; padding: 10px; box-shadow: 7px 7px 0 #4c1017; }
  .chart-frame iframe { height: 445px; }
  .chart-fallback { inset: 10px; }
  .bottom-contract { grid-template-columns: auto 1fr; }
  .bottom-contract em { display: none; }
  footer { gap: 10px; padding: 20px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
