/* ============ Tokens ============ */
:root {
  --blush: #F8E9F3;
  --lavender: #E3D9FC;
  --moonlight: #DCE9FF;
  --twilight: #A7AED9;
  --night: #414765;
  --night-deep: #2C3150;
  --twilight-ink: #535A8C;   /* readable twilight for small text on paper */
  --rose: #B2477A;           /* approval ink */
  --paper: #FFFCFE;
  --moon: #FFF4C9;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Segoe Print', cursive;

  --r-doc: 30px;
  --r-panel: 20px;
  --r-chip: 12px;
  --shadow-doc: 0 40px 80px -30px rgba(20, 22, 48, .7), 0 12px 24px -12px rgba(20, 22, 48, .45);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--night);
  color: var(--night);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 60;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-variation-settings: 'SOFT' 100; text-wrap: balance; }
p { margin: 0; }
h1:focus, h2:focus, p:focus { outline: none; }

:focus-visible { outline: 3px solid #F2A0C0; outline-offset: 3px; }
.doc :focus-visible { outline-color: var(--rose); }

/* ============ Sky ============ */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 85% 0%, rgba(220, 233, 255, .16), transparent 60%),
    linear-gradient(180deg, var(--night-deep) 0%, var(--night) 48%, #5D6491 82%, #7F86B7 100%);
}
.moon {
  position: absolute;
  top: clamp(28px, 7vh, 70px);
  right: clamp(22px, 9vw, 140px);
  width: clamp(58px, 9vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFBEA 0%, var(--moon) 55%, #F1E3B5 100%);
  box-shadow: 0 0 40px 8px rgba(255, 244, 201, .35), 0 0 120px 40px rgba(227, 217, 252, .18);
  transition: opacity 2s ease, box-shadow 2s ease;
}
.moon::before, .moon::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(214, 196, 140, .35);
}
.moon::before { width: 18%; height: 18%; top: 28%; left: 52%; }
.moon::after { width: 12%; height: 12%; top: 58%; left: 30%; }
.is-declined .moon { opacity: .6; box-shadow: 0 0 30px 4px rgba(255, 244, 201, .2); }
.is-approved .moon { box-shadow: 0 0 60px 16px rgba(255, 244, 201, .5), 0 0 160px 60px rgba(244, 182, 207, .25); }

.stars i {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: .25;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .2; transform: scale(.8); }
  50% { opacity: .95; transform: scale(1.15); }
}
.cloud {
  position: absolute;
  border-radius: 50%;
  background: var(--lavender);
  filter: blur(40px);
  opacity: .22;
  animation: drift 60s linear infinite alternate;
}
.cloud-a { width: 60vw; height: 22vh; bottom: -8vh; left: -10vw; }
.cloud-b { width: 50vw; height: 18vh; bottom: 6vh; right: -15vw; background: var(--blush); opacity: .14; animation-duration: 80s; }
@keyframes drift { to { transform: translateX(8vw); } }

/* ============ Layout ============ */
main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow-x: hidden;
  overflow-x: clip; /* star bursts may fly wide; never let them widen the page */
  padding: max(24px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
}
.scene { width: 100%; max-width: 780px; min-width: 0; }

/* ============ Buttons ============ */
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  min-height: 50px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }

.btn-moon {
  background: var(--blush);
  color: var(--night);
  font-size: 1.1rem;
  padding: 16px 34px;
  box-shadow: 0 0 0 6px rgba(248, 233, 243, .14), 0 14px 30px -10px rgba(10, 12, 30, .6);
}
.btn-moon:hover { box-shadow: 0 0 0 10px rgba(248, 233, 243, .16), 0 18px 36px -10px rgba(10, 12, 30, .6); }
.btn-ink { background: var(--night); color: var(--blush); box-shadow: 0 8px 18px -8px rgba(65, 71, 101, .8); }
.btn-ink:hover { background: var(--night-deep); }
.btn-ghost { background: transparent; color: var(--night); box-shadow: inset 0 0 0 2px var(--twilight); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--night); }

/* ============ Scene 1: Intro ============ */
.scene-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100dvh - 64px);
  gap: 8px;
}
.intro-stage { position: relative; width: clamp(170px, 46vw, 240px); }
.intro-halo {
  /* moonlight halo so the bunny reads against the night */
  position: absolute;
  inset: 8% -12% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 217, 252, .32), rgba(227, 217, 252, 0));
}
.intro-flyer { position: relative; z-index: 3; will-change: transform; }
.intro-bunny { will-change: transform; }
.alert-mark {
  position: absolute;
  top: -10%;
  left: 18%;
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  color: var(--moon);
  text-shadow: 0 2px 0 var(--night);
  opacity: 0;
}
.trail { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.trail span {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
  color: var(--moon);
  text-shadow: 0 0 8px rgba(255, 244, 201, .8);
}
.bunny-slot svg { display: block; width: 100%; height: auto; overflow: visible; }

.zzz { position: absolute; top: 6%; right: -6%; pointer-events: none; }
.zzz span {
  position: absolute;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--moonlight);
  opacity: 0;
}
.zzz-verdict span { color: var(--twilight-ink); }

.intro-copy { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 640px; }
.letterhead-line {
  color: var(--twilight);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}
.letterhead-line span { font-style: italic; font-weight: 400; color: var(--moonlight); opacity: .8; }
h1 {
  color: var(--blush);
  font-size: clamp(2.3rem, 8.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.015em;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}
.intro-sub {
  color: var(--moonlight);
  font-style: italic;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  max-width: 32ch;
  line-height: 1.45;
}
.intro-copy .btn { margin-top: 10px; }
.file-ref { color: var(--moonlight); font-size: .9rem; font-style: italic; opacity: .85; }

/* ============ Documents ============ */
.doc {
  position: relative;
  background: var(--paper);
  border-radius: var(--r-doc);
  padding: clamp(24px, 5.5vw, 52px);
  box-shadow: var(--shadow-doc);
}
.doc::before {
  /* stationery perforation */
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--r-doc) - 8px);
  border: 1.5px dashed rgba(167, 174, 217, .55);
  pointer-events: none;
}
.doc-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--lavender);
}
.seal {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--night);
  box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 5px var(--twilight);
  overflow: hidden;
}
.seal::after {
  /* crescent moon */
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  top: 11px;
  left: 9px;
  border-radius: 50%;
  box-shadow: 7px 2px 0 0 var(--moon);
}
.doc-dept { font-weight: 650; font-size: 1rem; line-height: 1.2; }
.doc-exhibit { font-style: italic; color: var(--twilight-ink); font-size: .92rem; }
.doc-page { font-size: .85rem; color: var(--twilight-ink); white-space: nowrap; }

.doc h2 {
  font-size: clamp(1.95rem, 6vw, 2.9rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-bottom: 22px;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}
.doc h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 6px; }

.doc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 2px solid var(--lavender);
}
.doc-nav .btn-ink { margin-left: auto; }

/* ============ Scene 2: Business case ============ */
.objective {
  position: relative;
  background: var(--lavender);
  border-radius: var(--r-panel);
  padding: 20px 22px;
  margin-bottom: 30px;
}
.objective p { font-size: 1.12rem; max-width: 52ch; }
.margin-note {
  position: absolute;
  top: -20px;
  right: 14px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--rose);
  transform: rotate(-8deg);
}
.evidence-title { margin-bottom: 14px !important; }
.evidence {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}
.stat-hero {
  background: var(--night);
  color: var(--blush);
  border-radius: 24px 24px 24px 8px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-num {
  font-size: clamp(4.2rem, 15vw, 6.6rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.04em;
  font-variation-settings: 'SOFT' 100, 'opsz' 144, 'WONK' 1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 1.05rem; margin-top: 8px; }
.stat-fine { font-family: var(--hand); font-size: 1.5rem; color: var(--twilight); line-height: 1.1; margin-top: 6px; }
.stat-mark { font-size: .4em; vertical-align: top; position: relative; top: .15em; margin-left: 2px; color: var(--twilight); }
.stat-disclosure {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(167, 174, 217, .5);
  font-size: .9rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--lavender);
}

.chart {
  margin: 0;
  background: var(--moonlight);
  border-radius: 8px 24px 24px 24px;
  padding: 18px 20px 16px;
}
.chart figcaption { font-weight: 600; font-size: .95rem; line-height: 1.3; margin-bottom: 30px; }
.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 120px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--night);
}
.bar {
  position: relative;
  flex: 1;
  height: var(--h);
  background: var(--twilight);
  border-radius: 8px 8px 3px 3px;
}
.bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .78rem;
  color: var(--twilight-ink);
  white-space: nowrap;
}
.bar-off { background: var(--rose); }
.bar-off em {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  font-family: var(--hand);
  font-style: normal;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--rose);
}
.chart-fine { font-size: .9rem; font-style: italic; color: var(--twilight-ink); line-height: 1.35; }

.findings { grid-column: 1 / -1; list-style: none; margin: 4px 0 0; padding: 0; }
.findings li { padding: 12px 0 12px 30px; border-top: 1.5px dashed var(--twilight); position: relative; }
.findings li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 19px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: 4px 1px 0 0 var(--twilight-ink);
}
.doc-footnote { margin-top: 18px; font-size: .92rem; font-style: italic; color: var(--twilight-ink); max-width: 64ch; }
.footnotes { margin-top: 18px; display: grid; gap: 6px; }
.footnotes .doc-footnote { margin-top: 0; }

/* ============ Scene 3: Benefits ============ */
.doc-lede { margin: -8px 0 22px; }
.review-count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 12px;
  border-radius: 999px;
  background: var(--lavender);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ticket {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  text-align: left;
  font: inherit;
  color: var(--night);
  border: 0;
  padding: 18px 26px 22px;
  border-radius: 18px;
  cursor: pointer;
  /* coupon notches on both sides */
  -webkit-mask:
    radial-gradient(circle 11px at 0 58%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 11px at 100% 58%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 11px at 0 58%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 11px at 100% 58%, transparent 98%, #000) right / 51% 100% no-repeat;
  transition: transform .25s ease, filter .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.ticket:nth-child(odd) { transform: rotate(-.7deg); }
.ticket:nth-child(even) { transform: rotate(.8deg); }
.ticket:hover { transform: rotate(0) translateY(-3px); filter: brightness(1.02) drop-shadow(0 10px 12px rgba(65, 71, 101, .18)); }
.ticket:focus-visible { outline: none; filter: drop-shadow(0 0 0 var(--rose)) drop-shadow(0 0 2px var(--rose)) drop-shadow(0 0 2px var(--rose)); }
.t-blush { background: var(--blush); }
.t-lav { background: var(--lavender); }
.t-moon { background: var(--moonlight); }
.t-twi { background: #D3D7F0; }
.t-gold { background: #FFF5D9; }   /* certificate paper, from the moon's colour */
.ticket-fine {
  display: block;
  font-size: .9rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--twilight-ink);
}
@media (min-width: 641px) {
  /* the fifth ticket spans the row, like a framed certificate, so it never sits alone */
  .ticket-wide {
    grid-column: 1 / -1;
    grid-template-columns: 116px 1fr;
    grid-template-rows: none;
    column-gap: 22px;
    align-content: start;
  }
  .ticket-wide > .ticket-art { grid-row: 1 / span 4; width: 116px; height: 92px; margin: 2px 0 0; }
  .ticket-wide > .ticket-title,
  .ticket-wide > .ticket-desc,
  .ticket-wide > .ticket-fine,
  .ticket-wide > .ticket-extra { grid-column: 2; }
}
.ticket-art { display: block; width: 104px; height: 82px; margin-bottom: 4px; }
.ticket-art svg { width: 100%; height: 100%; overflow: visible; }
.ticket-title { font-weight: 650; font-size: 1.14rem; line-height: 1.2; font-variation-settings: 'SOFT' 100; }
.ticket-desc { font-size: .96rem; line-height: 1.45; }
.ticket-extra { display: block; height: 0; overflow: hidden; }
.ticket-extra > span {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1.5px dashed rgba(65, 71, 101, .25);
  font-size: .92rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--twilight-ink);
}
.ticket[aria-expanded='true'] { z-index: 1; }
.assessment { min-height: 0; }
.assessment-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--lavender);
  font-weight: 600;
  line-height: 1.35;
}
.mini-stamp {
  flex: none;
  padding: 2px 8px;
  border: 2.5px solid var(--rose);
  border-radius: 7px;
  color: var(--rose);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(-8deg);
}
.ticket-stamp {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 2px 9px;
  border: 2.5px solid var(--rose);
  border-radius: 7px;
  color: var(--rose);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-10deg);
}

/* ============ Scene 4: Terms ============ */
.legal-top {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 26px;
  align-items: center;
}
.counsel { text-align: center; }
.counsel-bunny { width: 150px; margin: 0 auto; }
.counsel-name { font-weight: 650; font-size: .92rem; line-height: 1.3; margin-top: 6px; }
.counsel-name span { font-weight: 400; font-style: italic; color: var(--twilight-ink); }
.whereas { font-style: italic; line-height: 1.6; color: var(--night); }
.whereas b { font-style: normal; font-weight: 700; }

.articles { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 22px; }
.articles li { border-left: 4px solid var(--lavender); padding-left: 20px; }
.articles h3 { font-style: italic; font-weight: 500; font-size: .95rem; color: var(--twilight-ink); margin-bottom: 6px; }
.articles h3 span { display: block; font-style: normal; font-weight: 650; font-size: 1.3rem; color: var(--night); line-height: 1.2; }
.legalese { font-style: italic; font-size: .95rem; color: var(--twilight-ink); margin-bottom: 10px; max-width: 60ch; }
.plain {
  background: var(--blush);
  border-radius: 6px 16px 16px 16px;
  padding: 12px 16px;
  font-weight: 500;
  max-width: 62ch;
}
.plain::before { content: 'In plain words: '; font-weight: 700; }
.fn-ref { font-size: .7em; color: var(--twilight-ink); margin-left: 2px; }
.legal-footnote {
  margin-top: 8px;
  font-size: .9rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--twilight-ink);
  max-width: 60ch;
}
.legal-footnote sup { font-style: normal; margin-right: 2px; }

.sig-john { font-size: 2.3rem; transform: rotate(-3deg); transform-origin: left bottom; }

.easter-inner { margin-top: 22px; display: grid; gap: 4px; }
.easter-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.easter-label { font-size: .9rem; color: var(--twilight-ink); }
.easter-ink { font-family: var(--hand); font-weight: 700; font-size: 1.9rem; line-height: 1; color: var(--rose); white-space: nowrap; }
.easter-heart { display: inline-block; }
.easter-fine { font-size: .9rem; font-style: italic; color: var(--twilight-ink); max-width: 52ch; }

.disclaimer {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 6px 20px 20px 20px;
  background: var(--night);
  color: var(--blush);
  position: relative;
}
.disclaimer-main { font-size: 1rem; line-height: 1.55; max-width: 60ch; }
.disclaimer-sum {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(167, 174, 217, .5);
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--lavender);
}

.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 34px; align-items: end; }
.sig { display: flex; flex-direction: column; }
.sig-ink { font-family: var(--hand); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--night); padding: 4px 6px; }
.sig-line { border-top: 2px solid var(--night); padding-top: 6px; font-size: .9rem; color: var(--twilight-ink); }
.sig-btn {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin-bottom: 6px;
  padding: 6px 12px;
  background: transparent;
  color: var(--night);
  border: 2px dashed var(--twilight);
  border-radius: var(--r-chip);
  cursor: pointer;
  text-align: left;
}
.sig-btn:hover { border-color: var(--night); }
.sig-btn[aria-pressed='true'] { border-style: solid; border-color: var(--lavender); }
.sig-dalia { color: var(--rose); padding: 0; opacity: 0; }
.sig-btn[aria-pressed='false'] .sig-dalia { width: 0; overflow: hidden; }
.sig-cta { font-size: .92rem; font-style: italic; color: var(--twilight-ink); }

/* ============ Scene 5: Verdict ============ */
.doc-form { text-align: center; }
.doc-form .doc-head { text-align: left; }
.verdict-stage { position: relative; width: 180px; margin: -6px auto 10px; }
.burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.burst span { position: absolute; left: -.5em; top: -.5em; line-height: 1; text-shadow: 0 0 1px var(--night), 0 0 1px var(--night); }
.zzz-verdict { top: 18%; right: -10%; }
.verdict-lede { max-width: 44ch; margin: 0 auto 28px; font-size: 1.08rem; }
.verdict-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}
.btn-choice { min-height: 60px; font-size: 1.1rem; padding: 16px 20px; }
.btn-approve { background: var(--rose); color: #fff; box-shadow: 0 10px 22px -10px rgba(178, 71, 122, .9); }
.btn-approve:hover { background: #9E3B6B; }
.btn-decline { background: var(--night); color: var(--blush); box-shadow: 0 10px 22px -10px rgba(65, 71, 101, .9); }
.btn-decline:hover { background: var(--night-deep); }

.verdict-result { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stamp {
  display: inline-block;
  color: var(--rose);
  border: 4px solid currentColor;
  border-radius: 12px;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px currentColor;
  padding: 8px 22px;
  font-size: clamp(1.5rem, 6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.1;
  font-variation-settings: 'SOFT' 0, 'opsz' 144;
  margin-bottom: 6px;
}
.verdict-result[data-kind='declined'] .stamp { color: var(--twilight-ink); }
.result-main { font-weight: 650; font-size: 1.18rem; max-width: 36ch; line-height: 1.35; }
.result-sub { font-style: italic; color: var(--twilight-ink); max-width: 40ch; }

/* ============ Sealed envelope gate ============ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  text-align: center;
}
.gate-to { color: var(--twilight); font-size: 1rem; font-style: italic; line-height: 1.35; }
.gate-to span {
  font-style: normal;
  font-weight: 600;
  font-size: clamp(2rem, 9vw, 2.8rem);
  color: var(--blush);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}
.gate-hint { color: var(--moonlight); font-size: .95rem; opacity: .85; }

.envelope {
  position: relative;
  width: min(300px, 76vw);
  aspect-ratio: 3 / 2;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  perspective: 900px;
  filter: drop-shadow(0 26px 30px rgba(10, 12, 30, .55));
  -webkit-tap-highlight-color: transparent;
}
.envelope:focus-visible { outline-offset: 10px; border-radius: 12px; }
.env-back, .env-front, .env-flap { position: absolute; left: 0; right: 0; border-radius: 10px; }
.env-back { inset: 0; background: #E8D4E3; z-index: 0; }
.env-letter { z-index: 1; }
.env-front { z-index: 2; }
.env-flap { z-index: 3; }
.env-seal { z-index: 4; }
.env-letter {
  position: absolute;
  left: 7%; right: 7%; top: 7%; bottom: 8%;
  border-radius: 6px;
  background: var(--paper);
  display: flex;
  justify-content: center;
  padding-top: 8%;
  font-size: .85rem;
  font-style: italic;
  color: var(--twilight-ink);
}
.env-front {
  inset: 0;
  background: linear-gradient(170deg, #F8E9F3, #F1DDEB);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  top: 0;
  height: 62%;
  background: linear-gradient(180deg, #F3E1EE, #EBD3E5);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  border-radius: 10px 10px 0 0;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #D0709B, var(--rose) 60%, #8E345F);
  box-shadow: 0 3px 8px rgba(80, 20, 50, .4), inset 0 0 0 4px rgba(255, 255, 255, .12);
}
.env-seal::after {
  /* crescent moon pressed into the wax */
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  top: 16px; left: 13px;
  border-radius: 50%;
  box-shadow: 6px 2px 0 0 rgba(255, 233, 243, .85);
}

/* ============ Moon sound toggle ============ */
.sound-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(227, 217, 252, .45);
  background: rgba(65, 71, 101, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 18px 2px rgba(255, 244, 201, .22);
  cursor: pointer;
  transition: box-shadow .4s ease, border-color .3s ease, background-color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.sound-toggle:hover { border-color: var(--lavender); }
.sound-toggle svg { width: 26px; height: 26px; overflow: visible; }
.st-moon { fill: var(--moon); transition: fill .3s ease; }
.st-star { fill: var(--lavender); transition: opacity .3s ease; }
.st-waves { stroke: var(--lavender); stroke-width: 1.8; transition: opacity .3s ease; }
.st-slash { stroke: var(--blush); stroke-width: 2; opacity: 0; transition: opacity .3s ease; }
.sound-toggle[aria-pressed='false'] { box-shadow: none; background: rgba(44, 49, 80, .6); border-color: rgba(167, 174, 217, .35); }
.sound-toggle[aria-pressed='false'] .st-moon { fill: var(--twilight); }
.sound-toggle[aria-pressed='false'] .st-waves,
.sound-toggle[aria-pressed='false'] .st-star { opacity: 0; }
.sound-toggle[aria-pressed='false'] .st-slash { opacity: .9; }

/* ============ Emergency appeal ============ */
.appeal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(56px, calc(env(safe-area-inset-top, 0px) + 56px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.appeal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 40, 68, .74);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.appeal-body {
  position: relative;
  margin: auto;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.appeal-close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 3;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(248, 233, 243, .45);
  background: rgba(65, 71, 101, .6);
  color: var(--blush);
  cursor: pointer;
}
.appeal-close:hover { border-color: var(--blush); }
.appeal-bunny-wrap { position: relative; z-index: 2; margin-bottom: -26px; }
.appeal-bunny { width: min(64vw, 36vh, 270px); }
.appeal-card {
  position: relative;
  width: 100%;
  background: var(--paper);
  border-radius: 26px;
  padding: 38px 22px 22px;
  text-align: center;
  box-shadow: var(--shadow-doc);
}
.appeal-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  border: 1.5px dashed rgba(178, 71, 122, .35);
  pointer-events: none;
}
.appeal-label { font-size: .74rem; font-weight: 700; letter-spacing: .08em; color: var(--rose); }
.appeal-title {
  margin: 6px 0 10px;
  font-size: clamp(1.55rem, 7.4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.04;
  color: var(--night);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}
.appeal-title:focus { outline: none; }
.appeal-msg { font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; line-height: 1.4; margin-bottom: 20px; }
.appeal-stamp {
  position: absolute;
  bottom: -13px;
  right: 14px;
  z-index: 1;
  padding: 3px 9px;
  background: var(--paper);
  border: 2.5px solid var(--rose);
  border-radius: 7px;
  color: var(--rose);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(9deg);
}
.appeal-choices { max-width: none; }
.appeal:focus { outline: none; }
.appeal-label { white-space: nowrap; }
@media (max-width: 360px) {
  .appeal-label { font-size: .66rem; letter-spacing: .04em; }
}
@media (max-height: 700px) {
  .appeal { padding-top: max(50px, calc(env(safe-area-inset-top, 0px) + 50px)); }
  .appeal-bunny { width: min(56vw, 27vh, 240px); }
  .appeal-bunny-wrap { margin-bottom: -18px; }
  .appeal-card { padding: 28px 18px 18px; }
  .appeal-title { font-size: 1.45rem; margin: 4px 0 8px; }
  .appeal-msg { font-size: .98rem; margin-bottom: 14px; }
  .appeal-choices .btn-choice { min-height: 48px; padding-top: 12px; padding-bottom: 12px; }
}
.appeal-choices .btn-choice { min-height: 54px; font-size: 1.02rem; }

/* ============ The THANK YOU crawl ============ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
body.is-crawling main { visibility: hidden; }   /* just the night sky and the crawl */
.crawl {
  --cb: clamp(112px, 30vw, 160px);                                          /* Barnaby's width */
  --floor: calc(var(--cb) * 1.15 + max(10px, env(safe-area-inset-bottom, 0px)));
  position: fixed;
  inset: 0;
  z-index: 55;
  overflow: hidden;
}
.crawl-skip {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 3;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(248, 233, 243, .5);
  background: rgba(65, 71, 101, .6);
  color: var(--blush);
  cursor: pointer;
}
.crawl-skip:hover { border-color: var(--blush); }
.crawl-title {
  position: absolute;
  left: 0; right: 0;
  top: 22%;
  z-index: 2;
  padding: 0 16px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(2.6rem, 14vw, 6.5rem);
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--blush);
  text-shadow: 0 0 18px rgba(244, 182, 207, .75), 0 0 48px rgba(244, 182, 207, .4);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}
.crawl-stage {
  position: absolute;
  left: 0; right: 0; top: 0;
  bottom: var(--floor);
  perspective: clamp(260px, 42vh, 440px);
  perspective-origin: 50% 0%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 3%, #000 40%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 3%, #000 40%, #000 90%, transparent 100%);
}
.crawl-plane {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(640px, 94vw);
  height: 300%;
  transform: translateX(-50%) rotateX(32deg);
  transform-origin: 50% 100%;
  overflow: hidden;
}
.crawl-text {
  position: absolute;
  left: 0; right: 0;
  top: 100%;                                  /* rows start just out of sight, above Barnaby */
  display: grid;
  gap: .45em;
  text-align: center;
  font-weight: 800;
  font-size: min(5vw, 2rem);
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--blush);
  text-shadow: 0 0 10px rgba(244, 182, 207, .55);
  font-variation-settings: 'SOFT' 100;
  will-change: transform;
}
.crawl-text > p { margin: 0; }
.crawl-row { white-space: nowrap; }
.crawl-text > .crawl-big {
  margin: .35em 0;
  font-size: 1.6em;
  line-height: 1.05;
  color: #F4B6CF;
  text-wrap: balance;
  text-shadow: 0 0 16px rgba(244, 182, 207, .8);
}
.crawl-text > .crawl-note {
  margin: .5em 0;
  font-size: .72em;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0;
  color: var(--lavender);
  text-shadow: none;
}
/* real colour emoji, crisp under the 3D tilt: emoji fonts first, no glow drawn behind them */
.emo {
  display: inline-block;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-shadow: none;
  line-height: 1;
}
.crawl-bunny-wrap {
  position: absolute;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  z-index: 2;
  width: var(--cb);
  transform: translateX(-50%);
}
.crawl-bunny-wrap .burst { top: 32%; }

/* ============ Responsive ============ */
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .moon { right: 72px; top: 34px; }   /* leave the corner to the sound toggle */
  .doc { border-radius: 24px; }
  .doc::before { inset: 7px; border-radius: 18px; }
  .doc-head { gap: 12px; margin-bottom: 22px; }
  .seal { width: 40px; height: 40px; }
  .seal::after { width: 18px; height: 18px; top: 9px; left: 8px; box-shadow: 6px 2px 0 0 var(--moon); }
  .evidence { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; gap: 14px; }
  .ticket { grid-template-columns: 84px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; padding: 16px 22px 18px 20px; }
  .ticket-art { grid-row: 1 / span 2; width: 84px; height: 68px; margin: 4px 0 0; }
  .ticket-stamp { top: 54px; right: auto; left: 10px; font-size: .66rem; padding: 1px 5px; background: rgba(255, 252, 254, .85); }
  .file-ref { text-wrap: balance; }
  .legal-top { grid-template-columns: 1fr; gap: 14px; }
  .counsel { display: flex; align-items: center; gap: 12px; text-align: left; }
  .counsel-bunny { width: 96px; margin: 0; flex: none; }
  .signatures { grid-template-columns: 1fr; gap: 22px; }
  .verdict-choices { grid-template-columns: 1fr; }
  .stamp { font-size: 1.35rem; padding: 6px 16px; max-width: 88%; }
  .ticket-extra { grid-column: 2; }
  .ticket-fine { grid-column: 2; }
  .ticket-wide .ticket-stamp { top: 100px; }   /* below the certificate, so its 96%+ stamp stays visible */
  .disclaimer { padding: 18px; }
  .appeal-choices { grid-template-columns: 1fr; gap: 10px; }
  .doc-nav { flex-wrap: nowrap; }
  .doc-nav .btn-ink { flex: 1 1 auto; }
}

@media (max-width: 360px) {
  .doc { padding: 22px 16px; }
  .doc-head { gap: 10px; }
  .doc-page { font-size: .78rem; }
  .ticket { grid-template-columns: 70px 1fr; padding: 14px 18px 16px 16px; }
  .ticket-art { width: 70px; height: 56px; }
  .ticket-stamp { left: 4px; top: 46px; font-size: .58rem; letter-spacing: .05em; }
  .ticket-wide .ticket-stamp { top: 82px; }
  .sig-john { font-size: 2rem; }
  .verdict-stage { width: 150px; }
  .doc-nav .btn { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .stars i, .cloud { animation: none; }
  .btn, .ticket { transition: none; }
  .btn:hover, .ticket:hover { transform: none; }
}
