/* ParrotPal app CTA module (ParrotPal 2.0 launch, 18 Nov 2026).
   One shared component for every content page, in both design worlds: the Label world (assets/label/label.css) and the
   main styles.css world. It borrows the Label grammar on purpose (2px ink rule, black head bar, green action) because
   a "label for the app" reads as part of the page, not an ad dropped on top of it.
   Inserted by scripts/app-cta/inject.py between <!-- app-cta:*:start/end --> markers. Everything is namespaced .ppcta
   so it can't leak into page styles, and every size has a px value so it renders the same whatever the root font size. */

.ppcta, .ppcta-sticky {
  --ppcta-ink: #111111;
  --ppcta-ink-2: #333333;
  --ppcta-paper: #ffffff;
  --ppcta-green: #047857;       /* white text on it = 5.9:1 */
  --ppcta-green-hover: #036149;
  --ppcta-green-ink: #065f46;   /* green text on white = 7.6:1 */
  --ppcta-tint: #f3f4f0;
  --ppcta-focus: #1d4ed8;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--ppcta-ink);
  -webkit-font-smoothing: antialiased;
}
.ppcta *, .ppcta-sticky * { box-sizing: border-box; }
/* reset at class weight via :where(), so it beats the page's bare p/ul rules but loses to the component's own classes */
.ppcta :where(p, ul), .ppcta-sticky :where(p) { margin: 0; padding: 0; max-width: none; }
.ppcta a:focus-visible, .ppcta-sticky a:focus-visible, .ppcta-sticky button:focus-visible {
  outline: 3px solid var(--ppcta-focus); outline-offset: 3px; border-radius: 8px;
}

/* ---------- the button: one action per module ---------- */
.ppcta__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 10px;
  /* fallbacks: the button is also used outside a .ppcta card (homepage release-notes panel) */
  background: var(--ppcta-green, #047857); color: #fff !important; border: 2px solid var(--ppcta-green, #047857);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 18px; font-weight: 800; line-height: 1.2; text-decoration: none !important; white-space: nowrap;
  transition: background-color .15s ease;
}
.ppcta__btn:hover { background: var(--ppcta-green-hover, #036149); border-color: var(--ppcta-green-hover, #036149); }
.ppcta__btn svg { width: 18px; height: 18px; flex: none; }

/* real app icon from the App Store listing */
.ppcta__icon { display: block; flex: none; width: 56px; height: 56px; border-radius: 13px; border: 1px solid rgba(17,17,17,.12); }

/* ---------- (1) compact inline card, after the answer ---------- */
.ppcta--intro {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 16px;
  margin: 28px 0; padding: 16px 18px;
  background: var(--ppcta-paper); border: 2px solid var(--ppcta-ink); border-radius: 6px;
}
.ppcta--intro .ppcta__h { font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.ppcta--intro .ppcta__line { margin-top: 4px; font-size: 17px; line-height: 1.45; color: var(--ppcta-ink-2); text-wrap: pretty; }
.ppcta__meta { margin-top: 6px; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--ppcta-green-ink); }

/* ---------- (2) fuller end card: the app's own "label" ---------- */
.ppcta--end { margin: 48px 0 40px; border: 2px solid var(--ppcta-ink); border-radius: 6px; background: var(--ppcta-paper); }
.ppcta__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--ppcta-ink); color: #fff; border-radius: 3px 3px 0 0;
  font-size: 17px; font-weight: 800; line-height: 1.3;
}
.ppcta__head span:last-child { font-weight: 700; }
.ppcta__main { display: grid; grid-template-columns: auto 1fr; gap: 16px 18px; padding: 20px 18px 8px; align-items: start; }
.ppcta--end .ppcta__icon { width: 72px; height: 72px; border-radius: 16px; }
.ppcta--end .ppcta__h { font-size: clamp(25px, 4.4vw, 30px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.ppcta--end .ppcta__line { margin-top: 8px; font-size: 19px; line-height: 1.5; color: var(--ppcta-ink); text-wrap: pretty; }
.ppcta__ticks { list-style: none; margin: 0; padding: 4px 18px 6px; display: grid; gap: 0; }
.ppcta__ticks li {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  padding: 11px 0; border-top: 1px solid #d9d9d4; font-size: 18px; line-height: 1.45;
}
.ppcta__ticks svg { width: 24px; height: 24px; margin-top: 1px; }
.ppcta__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 18px 18px; border-top: 2px solid var(--ppcta-ink);
}
.ppcta__foot .ppcta__meta { margin: 0; font-size: 16px; color: var(--ppcta-ink-2); font-weight: 600; }
.ppcta__foot .ppcta__meta b { color: var(--ppcta-ink); font-weight: 800; }
.ppcta__note { padding: 0 18px 16px; font-size: 16px; line-height: 1.5; color: var(--ppcta-ink-2); }

/* Official-style "Download on the App Store" badge, built in SVG + text (no badge asset in the repo).
   Black, thin grey keyline, Apple mark, two-line lockup, as Apple's marketing guidelines describe. */
.ppcta-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 7px 18px 7px 14px; border-radius: 11px;
  background: #000; color: #fff !important; border: 1px solid #a6a6a6;
  text-decoration: none !important; line-height: 1; transition: background-color .15s ease;
}
.ppcta-badge:hover { background: #1f1f1f; }
.ppcta-badge svg { width: 24px; height: 29px; flex: none; fill: #fff; }
.ppcta-badge span { display: flex; flex-direction: column; gap: 3px; font-family: -apple-system, 'SF Pro Text', 'Hanken Grotesk', system-ui, sans-serif; }
.ppcta-badge small { font-size: 12px; font-weight: 500; letter-spacing: .01em; }
.ppcta-badge b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

/* ---------- (3) slim sticky bar: phones only, after the first card has scrolled away ---------- */
.ppcta-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; gap: 12px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) 14px;
  background: var(--ppcta-paper); border-top: 2px solid var(--ppcta-ink);
  box-shadow: 0 -8px 24px -12px rgba(17,17,17,.25);
  transform: translateY(110%); visibility: hidden;
  transition: transform .32s cubic-bezier(.16,1,.3,1), visibility 0s linear .32s;
}
.ppcta-sticky.is-on { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.16,1,.3,1), visibility 0s; }
.ppcta-sticky .ppcta__icon { width: 40px; height: 40px; border-radius: 10px; }
.ppcta-sticky__txt { flex: 1; min-width: 0; font-size: 16px; line-height: 1.25; }
.ppcta-sticky__txt b { display: block; font-weight: 800; }
.ppcta-sticky__txt span { display: block; color: var(--ppcta-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppcta-sticky .ppcta__btn { min-height: 44px; padding: 8px 14px; font-size: 16px; }
.ppcta-sticky__x {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 -4px 0 -6px;
  background: none; border: 0; border-radius: 8px; color: var(--ppcta-ink); cursor: pointer;
}
.ppcta-sticky__x:hover { background: var(--ppcta-tint); }
.ppcta-sticky__x svg { width: 20px; height: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  /* the bar only exists on phones; the page always reserves its height so nothing shifts when it appears */
  .ppcta-sticky { display: flex; }
  body:has(.ppcta-sticky) { padding-bottom: 76px; }
}
@media (max-width: 560px) {
  .ppcta--intro { grid-template-columns: auto 1fr; padding: 16px; }
  .ppcta--intro .ppcta__icon { width: 48px; height: 48px; border-radius: 11px; align-self: start; }
  .ppcta--intro .ppcta__btn { grid-column: 1 / -1; width: 100%; margin-top: 10px; }
  .ppcta__main { grid-template-columns: 1fr; padding-top: 18px; }
  .ppcta--end .ppcta__icon { width: 60px; height: 60px; }
  .ppcta__foot .ppcta-badge { width: 100%; justify-content: center; }
}

/* dark surroundings: invert the card, keep the green action */
.ppcta[data-tone="dark"] { --ppcta-ink: #f4f7f5; --ppcta-ink-2: #d5ddd8; --ppcta-paper: #10201a; --ppcta-green-ink: #7ee2b8; border-color: #f4f7f5; }
.ppcta[data-tone="dark"] .ppcta__head { color: #10201a; }

/* keep "7-day" and "iOS 17+" from breaking across lines in the small print (Round 2) */
.ppcta__nw { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .ppcta-sticky, .ppcta-sticky.is-on { transition: none; }
  .ppcta__btn, .ppcta-badge { transition: none; }
}
@media print { .ppcta, .ppcta-sticky { display: none !important; } }
