.journal-study { --blue: #0873ff; --muted: #666b80; }
/* Restore the scroll offset, not an element displaced by its entrance animation. */
.journal-study .opening { display: block; overflow-x: clip; overflow-anchor: none; }
.journal-study .header { width: min(calc(100% - 2 * max(40px, var(--safe-left), var(--safe-right))), 1000px); min-height: 76px; justify-content: space-between; }
.journal-study main { display: block; padding: 0; min-height: 0; place-items: normal; }
.journal-study .composition { margin-inline: auto; }
.hero-scene { position: relative; width: 100%; max-width: 1700px; min-height: 505px; margin-inline: auto; }
.hero-art { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.mascot { position: absolute; display: block; height: auto; }
.mascot--dog { width: min(29%, calc((100% - 520px) / 2)); left: 0; top: 143px; }
.mascot--cat { width: min(27%, calc((100% - 520px) / 2)); right: 0; top: 135px; }
/* The scene stops growing at 1700px, but the clouds always come in from the screen's edges.
   --bleed is the gap between the scene and the screen edge; % resolves against the scene. */
.hero-art { --bleed: max(0px, (100vw - 100%) / 2); }
.scene-edge { position: absolute; width: 390px; height: auto; }
.scene-edge--left { left: calc(-250px - var(--bleed)); top: -60px; }
.scene-edge--right { right: calc(-250px - var(--bleed)); top: -110px; transform: scaleX(-1); }
.butterfly-scene { position: absolute; right: 11%; top: 50px; width: 66px; height: 66px; }
.butterfly { display: block; width: 100%; height: 100%; transform: rotate(-16deg); }
.butterfly-trail { position: absolute; left: 50px; top: 48px; width: 195px; height: 83px; overflow: visible; }
.butterfly-trail path { stroke: var(--blue); stroke-width: 1.7; stroke-dasharray: 7 8; stroke-linecap: round; }
.journal-study .composition { position: relative; width: 540px; max-width: 100%; padding-top: 63px; }
.journal-study h1 { position: relative; display: inline-block; max-width: none; font-size: 72px; line-height: 1.02; letter-spacing: -.055em; }
.journal-study .marked { margin-left: .025em; padding-bottom: 20px; color: #0969ed; }
.journal-study .pen-stroke { stroke: #0969ed; }
.journal-study .intro { margin: 30px auto 0; font-size: 16px; line-height: 1.6; }
.journal-study .waitlist { width: 470px; max-width: 100%; margin: 34px auto 0; padding-bottom: 0; }
.journal-study .form-controls input { height: 54px; padding-inline: 24px; font-size: 14px; }
.journal-study .join-control { width: 147px; }
.journal-study .join-control button { height: 54px; font-size: 14px; }
.journal-study .form-note { margin-top: 15px; max-width: calc(100% - 157px); font-size: 11px; }
/* The arrow's room under the form is the bot check's top margin, so a visible challenge sits
   below "save me a spot". flow-root keeps the margin inside the form while the check is empty.
   The hero's min-height already holds the full room, so the page doesn't move. A challenge
   stays above the pets and the butterfly's trail. */
.journal-study #bot-check { position: relative; z-index: 1; display: flow-root; margin-top: 134px; }
.journal-study .invitation { width: 144px; top: calc(100% + 6px); color: #0969ed; font-size: 23px; }
.journal-study .invitation svg { width: 110px; height: 95px; margin-inline: auto; }
.journal-study .invitation span { transform: rotate(5deg); }

@media (min-width: 1600px) {
  .journal-study .composition { padding-top: 75px; }
  .mascot--dog { left: 1%; width: 28%; top: 145px; }
  .mascot--cat { right: 1%; width: 26%; top: 133px; }
}
@media (min-width: 1001px) and (max-width: 1100px) {
  .journal-study h1 { font-size: 64px; }
  .journal-study .composition { width: 480px; }
  .hero-scene { min-height: 560px; }
  .mascot--dog { width: 24%; top: 270px; }
  .mascot--cat { width: 23%; top: 265px; }
}
@media (max-width: 1000px) {
  .journal-study .header { width: calc(100% - 2 * max(20px, var(--safe-left), var(--safe-right))); min-height: 66px; }
  .journal-study .header nav { gap: 15px; font-size: 11px; }
  .journal-study .availability { display: flex; font-size: 10px; }
  .hero-scene { display: flex; flex-direction: column; min-height: 0; }
  .journal-study .composition { order: 0; width: 100%; padding: 47px max(20px, var(--safe-right)) 0 max(20px, var(--safe-left)); }
  .journal-study h1 { font-size: clamp(40px, 12.3vw, 69px); letter-spacing: -.05em; }
  .journal-study .marked { padding-bottom: 17px; }
  .journal-study .intro { max-width: 285px; font-size: 14px; margin-top: 22px; line-height: 1.6; }
  .journal-study .intro-platform { display: inline; }
  .journal-study .waitlist { width: 100%; max-width: 370px; margin-top: 25px; }
  .journal-study #bot-check { margin-top: 116px; }
  .journal-study .form-controls { flex-direction: row; gap: 8px; }
  .journal-study .form-controls input { height: 51px; padding-inline: 16px; font-size: 12px; }
  .journal-study .join-control { width: 123px; }
  .journal-study .join-control button { height: 51px; padding-inline: 12px; font-size: 12px; }
  .journal-study .form-note { max-width: calc(100% - 131px); font-size: 10px; text-align: center; line-height: 1.5; }
  .journal-study .invitation { width: 122px; top: calc(100% + 9px); font-size: 21px; }
  .journal-study .invitation svg { width: 98px; height: 76px; }
  /* Scenery follows form content, including a visible bot challenge or long status. It rises
     into the arrow's room below the form, so the pets keep their place until a challenge shows. */
  .hero-art { position: relative; order: 1; width: 100%; max-width: 700px; margin: -31px auto 0; height: clamp(215px, 58vw, 390px); }
  .mascot--dog { width: 54%; left: -2%; top: 10px; }
  .mascot--cat { width: 51%; right: -1%; top: 0; }
  .scene-edge { width: 270px; }
  .scene-edge--left { left: calc(-180px - var(--bleed)); top: -8%; }
  .scene-edge--right { right: calc(-180px - var(--bleed)); top: -20%; }
  .butterfly-scene { left: 12%; right: auto; top: -36px; width: 40px; height: 40px; }
  .butterfly-trail { left: 30px; top: 35px; width: 90px; height: 45px; }
}
