/* Affilipea: /affilipea/ (share Pea, get 40%), /affilipea/kit/ (the kit, unlisted) and
   /affilipea/rules/ (the rules, in plain words). Loads after base, pea2 and next and uses
   their tokens only: nothing new in the palette. Every rule here starts with an afp- class. */

/* ================= /affilipea/ ================= */

/* ---------- Hero ---------- */
.afp-hero__pea { width: clamp(124px, 14vw, 170px); }
.afp-hero .kicker { margin-top: 8px; }
.afp-hero h1 { margin-top: 14px; }
.afp-hero .lede { max-width: 30em; text-wrap: balance; }
.afp-hero__cta { align-items: center; gap: 14px 22px; }
/* the plain line for owners, beside the button */
.afp-owner { font-size: 17px; line-height: 1.4; color: var(--muted); text-wrap: balance; }
.afp-owner b, .afp-say { color: var(--ink); font-weight: 700; }
.afp-say { white-space: nowrap; }

/* ---------- How it goes: four beats, each a big word and one line ---------- */
.afp-how { padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.afp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1120px; margin: clamp(92px, 9vw, 104px) auto 0; padding: 0; list-style: none; }
.afp-step { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 0 18px 26px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.afp-step__pic { position: relative; display: grid; place-items: end center; height: 136px; margin: -68px 0 6px; }
.afp-step__pic::before { content: ""; position: absolute; left: 50%; bottom: -10px; width: 150px; height: 110px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 60%, rgba(199, 222, 168, .75), rgba(199, 222, 168, 0) 68%); }
.afp-step__pic img { position: relative; width: auto; height: 136px; max-width: none; filter: drop-shadow(0 14px 16px rgba(34, 56, 26, .22)); }
.afp-step__n { position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--pea); color: #fff; font: 800 19px/1 var(--display); box-shadow: 0 0 0 5px var(--pea-soft); }
.afp-step h3 { font: 800 clamp(25px, 2.5vw, 31px)/1.02 var(--display); letter-spacing: -.035em; }
.afp-step p { max-width: 20em; font-size: 16.5px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
/* the last beat is the money: a brass number */
.afp-step:last-child .afp-step__n { background: var(--brass); box-shadow: 0 0 0 5px var(--brass-soft); }

@media (max-width: 1000px) {
  .afp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 88px; max-width: 760px; }
}
/* Phones: each beat is a row, Pea beside the words */
@media (max-width: 600px) {
  .afp-steps { grid-template-columns: 1fr; gap: 12px; margin-top: 30px; }
  .afp-step { grid-template-columns: 82px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 14px; row-gap: 4px; padding: 16px 18px 16px 10px; text-align: left; }
  .afp-step__pic { grid-column: 1; grid-row: 1 / span 2; width: 82px; height: 104px; margin: 0; }
  .afp-step__pic::before { width: 96px; height: 80px; bottom: -6px; }
  .afp-step__pic img { height: 104px; max-width: 82px; object-fit: contain; object-position: 50% 100%; }
  .afp-step__n { left: 4px; top: 6px; width: 28px; height: 28px; font-size: 15px; box-shadow: 0 0 0 3px var(--pea-soft); }
  .afp-step:last-child .afp-step__n { box-shadow: 0 0 0 3px var(--brass-soft); }
  .afp-step h3 { grid-column: 2; align-self: end; font-size: 23px; }
  .afp-step p { grid-column: 2; align-self: start; font-size: 15.5px; }
}

/* ---------- Easy peasy sharing: a piece of the morning page ---------- */
.afp-share { padding-top: clamp(40px, 6vw, 72px); }
.afp-share .shead .lede { max-width: 34em; text-wrap: balance; }
.afp-mock { max-width: 600px; margin: 40px auto 0; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; text-align: left; }
/* the band: the little row of peas, the count, what's earned */
.afp-band { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 20px; background: linear-gradient(120deg, var(--pea-soft), var(--card)); border-bottom: 1px solid var(--line); }
.afp-pod { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--pea-glow); }
.afp-pod i { width: 14px; height: 14px; border-radius: 50%; background: var(--pea-soft); box-shadow: inset 0 0 0 1.5px var(--pea-glow); }
.afp-pod i.is-grown { background: radial-gradient(circle at 34% 30%, var(--pea-glow), var(--pea-hi) 52%, var(--pea)); box-shadow: inset -1px -2px 3px rgba(24, 32, 26, .2); }
.afp-band__count { font: 800 18px/1.1 var(--display); letter-spacing: -.015em; color: var(--ink); }
.afp-band__earned { margin-left: auto; padding: 8px 13px; border-radius: 999px; background: var(--brass-soft); color: var(--brass); font: 800 15px/1 var(--body); white-space: nowrap; }
/* the Say the word card on the page */
.afp-idea { padding: 18px 20px 20px; }
.afp-idea .tag { font-size: 11.5px; }
.afp-idea__row { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; }
.afp-idea__row .pea-ico { flex: none; width: 40px; height: 47px; }
.afp-idea__msg { padding: 14px 16px; border-radius: 18px 18px 18px 6px; background: var(--pea-soft); color: var(--ink); font-size: 16.5px; line-height: 1.5; font-weight: 550; text-wrap: pretty; }
.afp-idea__foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.afp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--band); color: var(--band-ink); font: 700 15px/1 var(--body); box-shadow: 0 10px 22px -14px rgba(34, 56, 26, .8); }
.afp-chip svg { width: 16px; height: 16px; color: var(--pea-glow); }
@media (max-width: 600px) {
  .afp-mock { margin-top: 30px; border-radius: 22px; }
  .afp-band { padding: 14px 16px; }
  .afp-band__earned { margin-left: 0; }
  .afp-idea { padding: 16px 16px 18px; }
  .afp-idea__row { gap: 10px; }
  .afp-idea__row .pea-ico { width: 32px; height: 38px; }
  .afp-idea__msg { font-size: 15.5px; padding: 12px 14px; }
}

/* ---------- Questions ---------- */
.afp-faq { padding-block: clamp(8px, 2vw, 24px) clamp(24px, 4vw, 48px); }
.afp-faq__pea { width: auto; height: clamp(112px, 12vw, 140px); margin: 0 auto 14px; filter: drop-shadow(0 14px 16px rgba(34, 56, 26, .2)); }
.afp-faq .h2 { text-align: center; }
.afp-faq .faq { margin-top: 30px; }
.afp-faq .faq details { transition: border-color .2s; }
.afp-faq .faq details:hover { border-color: var(--pea-glow); }
.afp-faq .faq--pea .ans a { color: var(--pea); font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .afp-faq .faq details { padding: 0 18px; }
  .afp-faq .faq summary { font-size: 18px; }
}

/* ---------- Close ---------- */
.afp-close { padding-top: clamp(48px, 8vw, 96px); }
.afp-close__pea { width: clamp(120px, 14vw, 156px); margin: 0 auto 10px; filter: drop-shadow(0 16px 18px rgba(34, 56, 26, .2)); }
.afp-close__tag { display: block; width: calc(var(--h, 180px) * 656 / 820); margin: 0 auto 10px; filter: drop-shadow(0 16px 18px rgba(34, 56, 26, .2)); }
.afp-close__own { margin-top: 20px; font-size: 16.5px; color: var(--muted); }

/* ================= /affilipea/kit/ ================= */

.afp-kit-hero__pea { width: clamp(122px, 14vw, 168px); }
.afp-kit-hero h1 { margin-top: 10px; }
.afp-kit-hero .lede { max-width: 30em; text-wrap: balance; }

/* Your link: the first thing, in a card under the headline */
.afp-link { display: flex; align-items: center; gap: 16px; max-width: 620px; margin: 30px auto 0; padding: 18px 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; }
.afp-link__ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--pea-soft); color: var(--pea); }
.afp-link__ico svg { width: 24px; height: 24px; }
.afp-link__h { font: 800 21px/1.1 var(--display); letter-spacing: -.02em; }
.afp-link p { margin-top: 4px; font-size: 16.5px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }

/* jump links */
.afp-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.afp-jump a { padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: 650 15px/1 var(--body); text-decoration: none; transition: border-color .2s, color .2s; }
.afp-jump a:hover { border-color: var(--pea-glow); color: var(--pea); }

/* one column of sections, like the press page */
.afp-kit { padding-block: clamp(36px, 5vw, 60px) clamp(20px, 4vw, 40px); }
.afp-kit__col { max-width: 920px; margin-inline: auto; }
.afp-sec { padding: clamp(44px, 6vw, 64px) 0 0; margin-top: clamp(44px, 6vw, 64px); border-top: 1px solid var(--line); text-align: left; scroll-margin-top: calc(var(--nav-h) + 12px); }
.afp-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.afp-h { margin-top: 12px; font: 800 clamp(32px, 4.2vw, 48px)/1.02 var(--display); letter-spacing: -.035em; }
.afp-h:first-child { margin-top: 0; }
.afp-lead { max-width: 40em; margin-top: 12px; font-size: clamp(17px, 2vw, 19px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.afp-note { max-width: 40em; margin-top: 16px; font-size: 16px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.afp-note .afp-say, .afp-lead .afp-say, .afp-link .afp-say { white-space: normal; }

/* download links: small pills with a down arrow */
.afp-dl { display: flex; flex-wrap: wrap; gap: 6px; }
.afp-dl a { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 8px 10px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font: 700 14px/1 var(--body); text-decoration: none; white-space: nowrap; transition: box-shadow .2s, color .2s, background .2s; }
.afp-dl a:hover { background: var(--card); color: var(--pea); box-shadow: inset 0 0 0 1.5px var(--pea-hi); }
.afp-dl svg { flex: none; width: 15px; height: 15px; }

/* Pictures */
.afp-all { margin-top: 20px; }
.afp-all .btn small { font-weight: 600; font-size: .82em; opacity: .7; }
.afp-pics { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.afp-pic { flex: 0 1 calc((100% - 32px) / 3); display: grid; align-content: start; gap: 10px; padding: 12px 12px 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.afp-pic img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--paper-2); }
.afp-pic__name { padding: 2px 4px 0; font: 800 21px/1.1 var(--display); letter-spacing: -.025em; }

/* The logo */
.afp-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.afp-logo { display: grid; align-content: start; gap: 10px; padding: 12px 12px 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.afp-logo__art { display: grid; place-items: center; height: 128px; padding: 20px; border-radius: 14px; background: var(--paper-2); }
.afp-logo__art img { width: auto; height: auto; max-width: 100%; max-height: 60px; }
.afp-logo h3 { padding: 2px 4px 0; font: 800 19px/1.1 var(--display); letter-spacing: -.02em; }
/* cream and white live on the dark green */
.afp-logo--dark { background: var(--band); border-color: var(--band); color: var(--band-ink); }
.afp-logo--dark .afp-logo__art { background: var(--band-2); }
.afp-logo--dark .afp-dl a { background: rgba(238, 243, 230, .08); box-shadow: inset 0 0 0 1.5px rgba(238, 243, 230, .2); color: var(--band-ink); }
.afp-logo--dark .afp-dl a:hover { background: rgba(238, 243, 230, .14); color: #b6e07f; box-shadow: inset 0 0 0 1.5px #b6e07f; }
.afp-logo--dark a:focus-visible { outline-color: #b6e07f; }

/* How Pea talks */
.afp-voice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.afp-voice li { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font: 650 17px/1.35 var(--body); color: var(--ink); }
.afp-voice li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, var(--pea-glow), var(--pea-hi) 52%, var(--pea)); }

/* the example post and the lines to copy */
.afp-copycard { display: grid; gap: 14px; margin-top: 22px; padding: clamp(18px, 3vw, 26px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.afp-copycard p { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; color: var(--ink); text-wrap: pretty; user-select: text; }
.afp-ph { padding: 1px 7px; border-radius: 8px; background: var(--brass-soft); color: var(--brass); font-weight: 700; white-space: nowrap; }
.afp-copy { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font: 700 14.5px/1 var(--body); cursor: pointer; transition: box-shadow .2s, color .2s, background .2s; }
.afp-copy:hover { color: var(--pea); box-shadow: inset 0 0 0 1.5px var(--pea-glow); }
.afp-copy svg { width: 16px; height: 16px; }
.afp-copy.is-copied { background: var(--pea-soft); color: var(--pea); box-shadow: none; }
.afp-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.afp-lines .afp-copycard { margin-top: 0; box-shadow: none; align-content: space-between; }
.afp-lines .afp-copycard p { font: 700 clamp(18px, 2.1vw, 21px)/1.35 var(--display); letter-spacing: -.01em; }

/* Where people say yes */
.afp-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.afp-who li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font: 650 17px/1.4 var(--body); color: var(--ink); text-wrap: pretty; }
.afp-who__ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--pea-soft); color: var(--pea); }
.afp-who__ico svg { width: 21px; height: 21px; }
.afp-big { max-width: 26em; margin-top: 22px; font: 800 clamp(22px, 2.8vw, 28px)/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }

/* Your own Pea page: the words, Pea on a laptop beside them */
.afp-own { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 36px; }
.afp-own__pea { width: clamp(150px, 18vw, 210px); height: auto; filter: drop-shadow(0 18px 22px rgba(34, 56, 26, .2)); }
.afp-own .btn { margin-top: 20px; }
.afp-own .btn svg { width: 16px; height: 16px; }

/* Please don't */
.afp-dont { display: grid; gap: 12px; max-width: 640px; margin: 24px 0 0; padding: 22px 24px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); list-style: none; }
.afp-dont li { position: relative; padding-left: 38px; font-size: 17px; line-height: 1.4; color: var(--ink); }
.afp-dont li::before { content: ""; position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--brass-soft); box-shadow: inset 0 0 0 1.5px rgba(138, 101, 38, .25); }
.afp-dont li::after { content: ""; position: absolute; left: 8px; top: 11px; width: 10px; height: 2.5px; border-radius: 2px; background: var(--brass); }

/* the line at the foot of the kit */
.afp-kit-foot { max-width: 620px; margin: clamp(48px, 7vw, 72px) auto 0; padding: 18px 22px; border-radius: 20px; background: var(--paper-2); font-size: 15.5px; line-height: 1.5; color: var(--muted); text-align: center; text-wrap: balance; }
.afp-kit-foot a { font-weight: 700; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .afp-pic { flex-basis: calc((100% - 16px) / 2); }
  .afp-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .afp-voice, .afp-who, .afp-lines { grid-template-columns: 1fr; }
  .afp-own { grid-template-columns: 1fr; }
  .afp-own__pea { grid-row: 1; width: 150px; }
}
/* Phones: each picture is a row, the square beside its name and downloads */
@media (max-width: 600px) {
  .afp-link { align-items: flex-start; padding: 16px 18px; gap: 14px; }
  .afp-link__ico { width: 42px; height: 42px; }
  .afp-pics { gap: 10px; }
  /* the square and its name side by side, the three downloads across the full card under them */
  .afp-pic { flex-basis: 100%; grid-template-columns: 96px minmax(0, 1fr); align-items: center; column-gap: 14px; row-gap: 10px; padding: 10px; }
  .afp-pic img { grid-row: 1; width: 96px; border-radius: 12px; }
  .afp-pic__name { grid-column: 2; grid-row: 1; padding: 0; font-size: 21px; }
  .afp-pic .afp-dl { grid-column: 1 / -1; grid-row: 2; }
  .afp-logos { gap: 10px; }
  .afp-logo { padding: 10px 10px 12px; }
  .afp-logo__art { height: 96px; padding: 14px; }
  .afp-logo__art img { max-height: 46px; }
  .afp-logo .afp-dl a { padding: 8px 6px; gap: 4px; }
  .afp-dont { padding: 18px 18px; }
}

/* ================= /affilipea/rules/ ================= */

.afp-rules-hero .phero__pea { width: clamp(108px, 12vw, 148px); margin-bottom: 14px; }
.afp-rules-hero h1 { font-size: clamp(46px, 8vw, 92px); }
.afp-rules-hero .lede a { font-weight: 700; text-underline-offset: 3px; }
.afp-date { margin-top: 20px; font: 700 12.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.afp-rules { padding-top: 0; }
.afp-sum { max-width: 680px; margin: 0 auto; padding: clamp(22px, 4vw, 32px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.afp-sum ol { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: afp-sum; }
.afp-sum li { position: relative; padding-left: 44px; font-size: 17px; line-height: 1.45; text-wrap: pretty; counter-increment: afp-sum; }
.afp-sum li::before { content: counter(afp-sum); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--pea-soft); color: var(--pea); font: 800 15px/1 var(--display); }
.afp-rules .prose { margin-top: clamp(16px, 3vw, 28px); }
.afp-rules .legal h2 { scroll-margin-top: calc(var(--nav-h) + 18px); }
.afp-rules .legal li::marker { color: var(--pea-hi); }
.afp-rules .legal a { font-weight: 600; }
.afp-rules .legal p, .afp-rules .legal li { text-wrap: pretty; }
@media (max-width: 600px) {
  .afp-sum li { font-size: 16px; padding-left: 40px; }
  .afp-rules .legal { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .afp-dl a, .afp-copy, .afp-jump a, .afp-faq .faq details { transition: none; }
}

/* Round two (25 Oct): the example post is shown, never copied; the "what a friend will need" heading. */
.afp-example { margin: 22px 0 0; padding: clamp(18px, 3vw, 26px); border-radius: var(--r-lg); background: var(--card); border: 1px dashed var(--line); }
.afp-example p { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; color: var(--ink); text-wrap: pretty; margin: 0; }
.afp-example figcaption { margin-top: 12px; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.afp-h3 { font: 800 20px/1.2 var(--display); letter-spacing: -.02em; margin: 30px 0 0; }
