/* Budget is a standalone comic chapter. Shared brand tokens and fonts come
   from catalog.css; every layout rule here is scoped to this page. */
body.budget-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(97, 88, 166, .2) 1px, transparent 1.2px);
  background-size: 12px 12px;
  -webkit-user-select: text;
  user-select: text;
}

.shop-header.budget-header {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 80px;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 4px solid var(--ink);
}

.budget-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  max-width: 170px;
}

.budget-brand img {
  width: 170px;
  height: auto;
}

.budget-header-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-tint-deep);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-decoration: underline;
  text-underline-offset: .35em;
  text-decoration-thickness: 2px;
}

.budget-header-back:hover {
  color: #fff;
}

.budget-main {
  flex: 1;
  width: 100%;
  display: grid;
  align-items: center;
  padding: clamp(24px, 4vw, 54px) clamp(18px, 4vw, 56px) clamp(34px, 5vw, 64px);
}

.budget-poster {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1240px;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  margin: 0 auto;
  border: 4px solid var(--ink);
  background: var(--brand);
  box-shadow: 10px 10px 0 var(--ink);
}

.budget-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(30px, 4.4vw, 64px);
  background-image: radial-gradient(rgba(17, 16, 21, .12) .8px, transparent 1px);
  background-size: 8px 8px;
}

.budget-kicker {
  max-width: 100%;
  margin: 0 0 36px;
  padding: 9px 13px 8px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.budget-copy h1 {
  position: relative;
  margin: 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8.7vw, 7.9rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 6px 0 var(--ink);
}

.budget-status {
  max-width: 100%;
  margin: 27px 0 0;
  padding: 10px 15px 7px;
  border: 3px solid var(--ink);
  background: var(--brand-tint-deep);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 400;
  line-height: 1.2;
  transform: rotate(-2deg);
}

.budget-description {
  max-width: 24ch;
  margin: 27px 0 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 650;
  line-height: 1.6;
}

.budget-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  max-width: 100%;
  margin-top: 33px;
  padding: 13px 21px;
  border: 3px solid var(--ink);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--paper);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.budget-back-arrow {
  font-family: var(--font-body);
  font-size: 1.55rem;
  line-height: .7;
}

.budget-back:hover {
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}

.budget-back:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.budget-page a:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 9px var(--ink);
}

.budget-art {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 590px;
  display: grid;
  justify-items: center;
  align-items: end;
  padding: 35px 18px 23px;
  overflow: hidden;
  border-left: 4px solid var(--ink);
  background-color: var(--brand-tint-deep);
  background-image: radial-gradient(rgba(97, 88, 166, .26) 1.3px, transparent 1.5px);
  background-size: 10px 10px;
}

.budget-issue {
  position: absolute;
  z-index: 2;
  top: 19px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 66px;
  border: 3px solid var(--ink);
  background: var(--brand);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
  transform: rotate(6deg);
}

.budget-burst {
  position: absolute;
  z-index: -2;
  top: 14%;
  left: -10%;
  width: 120%;
  aspect-ratio: 1;
  background: var(--ink);
  clip-path: polygon(50% 0, 57% 18%, 72% 5%, 73% 25%, 94% 18%, 84% 37%, 100% 45%, 83% 55%, 97% 72%, 76% 72%, 79% 94%, 59% 83%, 50% 100%, 42% 82%, 23% 96%, 24% 74%, 3% 80%, 16% 60%, 0 50%, 18% 40%, 5% 21%, 27% 26%, 27% 5%, 43% 18%);
  transform: rotate(-8deg);
}

.budget-burst::before {
  position: absolute;
  inset: 6px;
  background: var(--paper);
  clip-path: inherit;
  content: "";
}

.budget-orbit {
  position: absolute;
  z-index: -1;
  width: 34px;
  height: 34px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--brand);
}

.budget-orbit-one {
  top: 29px;
  left: 26px;
  width: 20px;
  height: 20px;
}

.budget-orbit-two {
  right: 23px;
  bottom: 53px;
}

.budget-ground {
  position: absolute;
  z-index: -1;
  right: 10%;
  bottom: 20px;
  left: 10%;
  height: 24px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--brand);
}

.budget-mascot {
  position: relative;
  width: auto;
  max-width: 100%;
  height: 530px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(6px 5px 0 rgba(17, 16, 21, .2));
}

.budget-footer .shop-footer {
  min-height: 88px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 25px clamp(18px, 4vw, 56px);
  border-top: 4px solid var(--ink);
  color: var(--brand-tint-deep);
  font-size: .7rem;
  line-height: 1.6;
  letter-spacing: .07em;
}

.budget-footer-brand {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: .025em;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .budget-mascot {
    animation: budget-arrive 650ms cubic-bezier(.2, .8, .25, 1) both;
  }
}

@keyframes budget-arrive {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .budget-poster {
    min-height: 530px;
  }

  .budget-copy {
    padding: 32px 24px;
  }

  .budget-copy h1 {
    font-size: clamp(4.1rem, 9vw, 5.1rem);
  }

  .budget-art {
    min-height: 530px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .budget-mascot {
    height: 470px;
  }
}

@media (max-width: 680px) {
  .shop-header.budget-header {
    min-height: 72px;
    gap: 16px;
    padding: 10px 18px;
  }

  .budget-brand,
  .budget-brand img {
    width: 134px;
  }

  .budget-header-back {
    font-size: .72rem;
    letter-spacing: .015em;
  }

  .budget-main {
    padding: 23px 18px 35px;
  }

  .budget-poster {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    box-shadow: 7px 7px 0 var(--ink);
  }

  .budget-copy {
    padding: 33px 25px 34px;
  }

  .budget-kicker {
    margin-bottom: 28px;
    font-size: .68rem;
  }

  .budget-copy h1 {
    font-size: clamp(3.8rem, 18.5vw, 6.5rem);
    text-shadow: 4px 5px 0 var(--ink);
  }

  .budget-status {
    margin-top: 22px;
    padding: 8px 12px 6px;
    font-size: 1.5rem;
  }

  .budget-description {
    max-width: none;
    margin-top: 21px;
    font-size: 1rem;
  }

  .budget-back {
    margin-top: 23px;
    min-height: 50px;
    font-size: .8rem;
  }

  .budget-art {
    min-height: 385px;
    padding: 22px 30px 19px;
    border-top: 4px solid var(--ink);
    border-left: 0;
  }

  .budget-mascot {
    width: 230px;
    height: auto;
    max-height: 350px;
  }

  .budget-burst {
    top: 2%;
    left: 50%;
    width: min(116%, 440px);
    transform: translateX(-50%) rotate(-8deg);
  }

  .budget-issue {
    top: 17px;
    right: 16px;
    width: 49px;
    height: 54px;
    font-size: 1.9rem;
  }

  .budget-orbit-two {
    width: 25px;
    height: 25px;
  }

  .budget-ground {
    right: 17%;
    bottom: 17px;
    left: 17%;
    height: 18px;
  }

  .budget-footer .shop-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    min-height: 96px;
    padding: 20px 22px;
    font-size: .62rem;
  }
}

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

  .budget-mascot {
    animation: none;
  }
}
