/* The pricing page (/pricing, web/site/pricing.mjs): Anurag's approved mockup of 21 October 2026,
   in the front door's look (Anurag 21 October 2026: "Use the font and design styles from
   Picturebook"): its fonts (Instrument Serif headings, Plus Jakarta Sans for everything else, the
   reader's own files, app/styles/design.css @font-face), its ink pill buttons, white cards on an inset
   line and soft shadow (picturebook.css .pb-omni), and its green for what is free or picked
   (--pb-pick). Colours are the site's tokens (design.css), so the page follows light and dark. */

.pp {
  --pp-display: var(--display);
  --pp-ui: var(--body);
  --pp-pick: #2fa36b; --pp-pick-ink: #1f7a4f; --pp-pick-tint: #e6f4ec;
  --pp-ink: var(--ink); --pp-ink2: var(--muted); --pp-line: var(--line); --pp-surface: var(--surface);
  --pp-sunk: var(--sunk);
  --pp-lift: 0 24px 60px -30px rgba(20, 19, 24, .45);
  --pp-pink: #fbe7e4; --pp-blue: #e3eef9; --pp-yellow: #fbf1d9; --pp-cream: #f7f1e3;
  font-family: var(--pp-ui); color: var(--pp-ink);
  padding: 40px 16px 72px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp {
    --pp-pick: #4cc48a; --pp-pick-ink: #7fd8ab; --pp-pick-tint: #16301f;
    --pp-lift: 0 24px 60px -30px rgba(0, 0, 0, .8);
    --pp-pink: #33221f; --pp-blue: #1c2a38; --pp-yellow: #2e2818; --pp-cream: #29251b;
  }
}
:root[data-theme="dark"] .pp {
  --pp-pick: #4cc48a; --pp-pick-ink: #7fd8ab; --pp-pick-tint: #16301f;
  --pp-lift: 0 24px 60px -30px rgba(0, 0, 0, .8);
  --pp-pink: #33221f; --pp-blue: #1c2a38; --pp-yellow: #2e2818; --pp-cream: #29251b;
}
.pp-wrap { max-width: 1180px; margin: 0 auto; display: grid; gap: 26px; container-type: inline-size; }
.pp h1, .pp h2, .pp h3 { font-family: var(--pp-display); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
.pp .eyebrow { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pp-pick-ink); }

.pp-head { text-align: center; display: grid; gap: 12px; justify-items: center; }
.pp-head h1 { font-size: clamp(40px, 7cqi, 70px); line-height: 1.02; }
.pp-head p { margin: 0; max-width: 62ch; color: var(--pp-ink2); font-size: 16px; line-height: 1.5; }
.pp .if-out { display: none; }
.pp.out .if-out { display: block; }
.pp.out .if-open { display: none; }

/* the cards */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin-top: 6px; }
.tier { position: relative; background: var(--pp-surface); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--pp-line); padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tier.free { background: var(--pp-pick-tint); box-shadow: none; }
.tier.pick { box-shadow: var(--pp-lift), inset 0 0 0 2px var(--pp-ink); }
.flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--pp-ink); color: var(--bg); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.tname { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pp-ink2); }
.tier.free .tname { color: var(--pp-pick-ink); }
.tier .price { font-family: var(--pp-display); font-size: 48px; line-height: 1; }
.blurb { margin: 0; color: var(--pp-ink2); font-size: 14.5px; line-height: 1.45; min-height: 46px; padding-bottom: 14px; border-bottom: 1px solid var(--pp-line); }
.tier.free .blurb { border-bottom: 0; padding-bottom: 0; }
.plus { margin: 0; font-weight: 700; font-size: 14.5px; }
.slot { display: flex; align-items: center; gap: 10px; background: var(--pp-surface); border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 700; }
.slot[hidden] { display: none; }
.slot .bar { width: 46px; height: 6px; border-radius: 999px; background: var(--pp-line); overflow: hidden; flex: none; }
.slot .bar i { display: block; height: 100%; width: 100%; background: var(--pp-pick); }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; flex: 1; align-content: start; }
.tier li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 14.5px; line-height: 1.35; font-weight: 600; }
.tier li svg { width: 20px; height: 20px; stroke: var(--pp-pick); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.tier li.hi span { color: var(--pp-pick-ink); font-weight: 800; }
.tier li small { display: block; color: var(--pp-ink2); font-size: 13px; font-weight: 500; margin-top: 2px; }
.none { margin: 0; text-align: center; font-size: 13px; color: var(--pp-ink2); }
/* Pricing's buttons are the one button (design.css), stretched to the card. */
.pp .btn { display: flex; }
.pp .btn svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pp .btn:focus-visible, .pp summary:focus-visible { outline: 3px solid var(--pp-pick); outline-offset: 3px; }

/* none of today's free books left: the free card turns plain and says so (pricing.js) */
.pp .gone-box { display: none; background: var(--pp-sunk); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 700; }
.pp .nofree { display: none; }
.pp.out .tier.free { background: var(--pp-surface); box-shadow: inset 0 0 0 1px var(--pp-line); }
.pp.out .tier.free .tname { color: var(--pp-ink2); }
.pp.out .tier.free .slot, .pp.out .tier.free .claim { display: none; }
.pp.out .tier.free .gone-box { display: block; }
.pp.out .tier.free ul { opacity: .55; }
.pp.out .tier.free .nofree { display: flex; }

/* the promises */
.band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--pp-surface); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--pp-line); padding: 22px 4px; }
.band > div { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; padding: 0 20px; min-width: 0; }
.band > div + div { border-left: 1px solid var(--pp-line); }
.band b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 4px; }
.band p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--pp-ink2); }
.ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--pp-pick-tint); }
.ico svg { width: 24px; height: 24px; stroke: var(--pp-pick-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* the cast, book by book */
.cast { background: var(--pp-pick-tint); border-radius: 28px; padding: 28px; display: grid; gap: 18px; }
.cast h2, .games h2 { font-size: clamp(32px, 4.4cqi, 46px); line-height: 1.05; margin: 8px 0; }
.cast > header p, .games header p { margin: 0; color: var(--pp-ink2); font-size: 18px; line-height: 1.5; max-width: 78ch; }
.books { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.bk { border-radius: 20px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.bk.b1 { background: var(--pp-pink); } .bk.b2 { background: var(--pp-blue); } .bk.b3 { background: var(--pp-yellow); }
.pic { aspect-ratio: 16 / 9; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 12px; }
.face { width: 88px; height: 88px; border-radius: 50%; background: var(--pp-surface); box-shadow: 0 0 0 3px var(--pp-surface); margin-left: -16px; flex: none; }
.face:first-child { margin-left: 0; }
.b3 .face { width: 70px; height: 70px; margin-left: -14px; }
.b3 .face:first-child { margin-left: 0; }
.bk .cap { padding: 4px 20px 20px; display: grid; gap: 6px; align-content: start; }
.bk .tag { display: block; padding: 0; border: 0; border-radius: 0; background: none; font-size: 16px; font-weight: 800; color: var(--pp-pick-ink); }
.bk h3 { font-size: 30px; line-height: 1.1; }
.bk p { margin: 0; font-size: 17px; line-height: 1.45; color: var(--pp-ink2); }
.pill { justify-self: start; background: var(--pp-surface); border-radius: 999px; padding: 7px 16px; font-size: 16px; font-weight: 800; margin-top: 10px; }
.arrow { color: var(--pp-pick-ink); font-size: 22px; align-self: center; }

/* the games */
.games { background: var(--pp-cream); border-radius: 28px; padding: 26px 28px; display: grid; gap: 16px; }
.games header p.lead { color: var(--pp-ink); font-weight: 800; font-size: 16.5px; margin-bottom: 4px; }
.glist { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.g { background: var(--pp-surface); border-radius: 16px; padding: 14px 6px 12px; text-align: center; font-size: 13px; font-weight: 700; display: grid; gap: 8px; justify-items: center; align-content: start; min-width: 0; line-height: 1.25; }
.g img { width: 48px; height: 48px; object-fit: contain; }
.nudge { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; background: var(--pp-surface); border-radius: 18px; padding: 16px 18px; }
.nudge b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 2px; }
.nudge p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--pp-ink2); }

/* quick answers */
.faq { padding: 6px 2px; display: grid; gap: 14px; }
.faq h2 { font-size: 38px; line-height: 1.05; margin-top: 6px; }
.qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; align-items: start; }
.qs details { background: var(--pp-surface); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--pp-line); }
.qs summary { list-style: none; cursor: pointer; padding: 14px 16px; font-size: 14.5px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--pp-ink2); border-bottom: 2px solid var(--pp-ink2); transform: rotate(45deg) translateY(-2px); flex: none; transition: transform .15s; }
.qs details[open] summary::after { transform: rotate(225deg); }
.qs details p { margin: 0; padding: 0 16px 14px; color: var(--pp-ink2); font-size: 14px; line-height: 1.5; }

@container (max-width: 1020px) {
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .books { grid-template-columns: 1fr; }
  .pic { aspect-ratio: auto; padding: 22px 16px 12px; justify-content: flex-start; }
  .arrow { transform: rotate(90deg); justify-self: center; }
  .glist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (max-width: 640px) {
  .tiers, .band, .qs { grid-template-columns: 1fr; }
  .band > div + div { border-left: 0; border-top: 1px solid var(--pp-line); padding-top: 16px; margin-top: 16px; }
  .cast, .games { padding: 22px 16px; }
  .blurb { min-height: 0; }
  .g { font-size: 12px; padding: 12px 4px 10px; }
  .g img { width: 40px; height: 40px; }
}
