/* Problem pages (/first-phone and the pages that copy it, built by build.mjs from site/problems/*.md): one problem a
   parent searches, the pins' printables free in the first screen, the long version, then where Idlewild fits and the
   waitlist. They wear the homepage's materials (home.css: type, paper sheets, the porcelain slab, the waitlist form;
   banner.css: the glass key and its halo) on the porcelain room, under the pins' sunrise paled behind the first
   screen. Each section's list is dressed like its printable: red checkboxes, the Settings look or red handwritten
   numbers. Nothing here animates a filter or a shadow. */

body.pb { background: linear-gradient(180deg, #c8cff1 0, #d7d2f0 300px, #ead5df 620px, #f0e2df 820px, var(--pc-room) 1180px) no-repeat, var(--pc-room); }
.pb-top { padding-top: 22px; }
@media (max-width: 560px) { .pb-top { padding-top: 14px; } }

/* ---------- the first screen: the headline, the pins' printables fanned out, and the download ---------- */
.pb-hero { padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 7vw, 104px); }
.pb-hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.pb-hero__h { max-width: 11em; font-size: clamp(38px, 5.2vw, 78px); line-height: .95; letter-spacing: -.025em; text-wrap: balance; }
.pb-hero__get { display: grid; justify-items: start; gap: 12px; }
.pb-hero__note { margin: 0 0 0 8px; font-family: var(--pc-voice); font-weight: 700; font-size: 16px; color: var(--pc-body); }
@media (min-width: 900px) {
  .pb-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(32px, 5vw, 80px); row-gap: 34px; }
  .pb-hero__h { grid-area: 2 / 1; }
  .pb-hero__get { grid-area: 3 / 1; }
  .pb-fan { grid-area: 1 / 2 / 5 / 3; }
}
@media (max-width: 560px) {
  .pb-hero__get { justify-items: stretch; }
  .pb-hero__get .gl { width: 100%; }
  .pb-hero__note { margin: 0; text-align: center; }
}

/* The printables lie fanned on the table, the visitor's own in front (problem.js puts it first); each opens its
   section. The front sheet takes the most room on a phone, where the fan has to fit the first screen. */
.pb-fan { position: relative; width: 100%; max-width: 580px; aspect-ratio: 1 / .9; margin-inline: auto; }
.pb-fan__sheet { position: absolute; z-index: 1; top: 9%; width: 45%; aspect-ratio: 2 / 3; border-radius: 6px; transition: translate .25s var(--ease); }
.pb-fan__sheet img { width: 100%; height: 100%; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(26, 40, 68, .14), 0 10px 22px -6px rgba(34, 56, 98, .26), 0 34px 54px -26px rgba(34, 56, 98, .34); }
.pb-fan__sheet:nth-child(1) { z-index: 3; top: 2%; left: 23%; width: 54%; rotate: -1.5deg; }
.pb-fan__sheet:nth-child(2) { left: 0; rotate: -8deg; }
.pb-fan__sheet:nth-child(3) { z-index: 2; left: 55%; rotate: 7deg; }
.pb-fan__sheet:hover { translate: 0 -6px; }
.pb-fan__sheet:focus-visible { outline-offset: 6px; }
@media (max-width: 560px) {
  .pb-fan { aspect-ratio: 1 / .92; }
  .pb-fan__sheet:nth-child(1) { left: 19%; width: 61%; }
  .pb-fan__sheet:nth-child(2) { top: 12%; }
  .pb-fan__sheet:nth-child(3) { top: 12%; left: 56%; }
}

/* ---------- the long version: each section on its own sheet of paper, its printable beside it ---------- */
.pb-sec { padding-bottom: clamp(44px, 5vw, 72px); }
.pb-sec__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.pb-paper { width: auto; padding: clamp(28px, 4vw, 52px) clamp(22px, 4.4vw, 58px) clamp(28px, 4vw, 48px); }
.pb-paper h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1; letter-spacing: -.02em; text-wrap: balance; text-shadow: none; }
.pb-paper p { max-width: 62ch; margin: 18px 0 0; font-family: var(--sell); font-weight: 500; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; color: var(--pc-body); text-wrap: pretty; }
/* the lead, with the raised first letter every lead wears on the homepage */
.pb-paper h2 + p { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.45; color: var(--pc-ink); }
.pb-paper h2 + p::first-letter { font-weight: 600; font-size: 1.45em; line-height: .6; }
.pb-paper a, .pb-fit__card > p a { color: #1a4bb8; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pb-paper .pb-src { margin-top: 28px; font-size: 14px; line-height: 1.6; color: var(--pc-mute); }

/* a printable beside its section: on a wide screen it rides along as you read; narrower, it's clipped to the paper's
   corner, small, so the heading still says which sheet this is */
.pb-sheet { margin: 0; }
.pb-sheet img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 1px 2px rgba(26, 40, 68, .14), 0 12px 26px -8px rgba(34, 56, 98, .28); }
@media (min-width: 1000px) {
  .pb-sec__in { grid-template-columns: minmax(0, 760px) 290px; justify-content: center; column-gap: clamp(40px, 4.6vw, 72px); align-items: start; }
  .pb-sheet { position: sticky; top: 32px; margin-top: 28px; rotate: 2deg; }
  .pb-sec:nth-child(odd) .pb-sheet { rotate: -2deg; }
}
@media (max-width: 999px) {
  .pb-sheet { position: absolute; z-index: 1; top: -16px; right: calc(var(--gutter) - 8px); width: clamp(84px, 16vw, 132px); rotate: 5deg; }
  .pb-sec__in:has(> .pb-sheet) h2 { padding-right: clamp(70px, 14vw, 118px); }
}

/* the steps: red handwritten numbers, as the rules sheet prints them */
.pb-list { display: grid; gap: 20px; margin: 30px 0 0; padding: 0; list-style: none; counter-reset: step; }
.pb-list li { position: relative; padding-left: 50px; counter-increment: step; font-family: var(--sell); font-weight: 500; font-size: 17px; line-height: 1.5; color: var(--pc-body); text-wrap: pretty; }
.pb-list li::before { content: counter(step); position: absolute; left: 6px; top: -5px; font-family: var(--hand); font-weight: 700; font-size: 34px; line-height: 1; color: #d9283c; }
.pb-list strong { display: block; margin-bottom: 3px; font-family: var(--pc-voice); font-weight: 800; font-size: clamp(19px, 1.5vw, 22px); line-height: 1.2; color: var(--pc-ink); }
/* the checklist's empty red boxes */
.pb-sec--checks .pb-list li::before { content: ""; left: 2px; top: 2px; width: 25px; height: 25px; box-sizing: border-box; border: 2.5px solid #d9283c; border-radius: 6px; }

/* The setup: the Settings app's look, as on the setup sheet. Its section lies on Settings' grouped gray, the steps in
   one white card, each step's number on a coloured square, the separators starting under the words. */
.pb-sec--settings .pb-paper { background: #f2f2f7; }
.pb-sec--settings .pb-list { gap: 0; padding: 4px 0; border-radius: 22px; background: #fff; box-shadow: 0 1px 2px rgba(26, 40, 68, .06), 0 8px 22px -12px rgba(34, 56, 98, .2); }
.pb-sec--settings .pb-list li { padding: 16px 20px 17px 68px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 400; font-size: 16px; line-height: 1.45; color: #4b4b52; }
.pb-sec--settings .pb-list li:not(:last-child)::after { content: ""; position: absolute; left: 68px; right: 0; bottom: 0; height: 1px; background: rgba(60, 60, 67, .16); }
.pb-sec--settings .pb-list li::before { --sq: #2f7bf6; left: 18px; top: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--sq); font: 700 18px / 1 system-ui, -apple-system, sans-serif; color: #fff; }
.pb-sec--settings .pb-list li:nth-child(1)::before { --sq: #8e8e93; }
.pb-sec--settings .pb-list li:nth-child(4)::before { --sq: #34c759; }
.pb-sec--settings .pb-list li:nth-child(5)::before, .pb-sec--settings .pb-list li:nth-child(7)::before { --sq: #5e5ce6; }
.pb-sec--settings .pb-list strong { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: #000; }
@media (max-width: 560px) {
  .pb-sec--settings .pb-paper { padding-inline: 14px; }
  .pb-sec--settings .pb-paper > :not(.pb-list) { margin-inline: 8px; }
  .pb-sec--settings .pb-list li { padding: 14px 14px 15px 58px; }
  .pb-sec--settings .pb-list li::before { left: 12px; top: 14px; width: 32px; height: 32px; }
  .pb-sec--settings .pb-list li:not(:last-child)::after { left: 58px; }
}
/* a Settings path, set in the phone's own face on a faint gray, as a tappable row would read */
.path { padding: 1px 6px; border-radius: 6px; background: rgba(118, 118, 128, .12); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 600; font-size: .94em;
  color: #1c1c1e; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- where Idlewild fits: one porcelain card with the homepage's two phones, then the waitlist ---------- */
.pb-fit { padding: clamp(28px, 4vw, 56px) 0 clamp(72px, 8vw, 120px); }
.pb-fit__card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 1120px; margin-inline: auto; }
.pb-fit h2 { font-size: clamp(34px, 4vw, 58px); line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.pb-fit__card > p { max-width: 40ch; margin: 0; font-family: var(--sell); font-weight: 500; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.45; color: var(--pc-body); text-wrap: pretty; }
.pb-fit .join { width: min(560px, 100%); margin-top: 12px; }
.pb-fit .join__fine { width: auto; padding: 0; background: none; box-shadow: none; }
.pb-duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 36px); width: min(100%, 500px); margin: 10px auto 6px; }
.pb-duo__side { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; margin: 0; }
.pb-duo__side > img { width: 100%; height: auto; filter: drop-shadow(0 18px 26px rgba(30, 44, 80, .22)); }
.pb-duo__cap { order: -1; margin: 0 0 12px; font: 800 17px / 1.15 var(--pc-voice); text-align: center; color: var(--pc-body); text-shadow: var(--pc-emboss); white-space: nowrap; }
.pb-duo__side--idw .pb-duo__cap { display: inline-flex; align-items: center; gap: .3em; color: var(--pc-ink); }
.pb-duo__cap .mark { font-size: 1em; }
@media (min-width: 1000px) {
  .pb-fit__card { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); column-gap: clamp(40px, 5vw, 80px); align-items: start; }
  .pb-fit__card > * { grid-column: 1; }
  .pb-fit__card > .pb-duo { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
}
@media (max-width: 560px) { .pb-duo__cap { font-size: min(15px, 4vw); } }
