/* product-page.css — the page structure for a product's marketing site.
 *
 *   @import '@brignano/design/tokens.css';
 *   @import '@brignano/design/product-page.css';
 *   <html class="tier-marketing">
 *
 * Show, then tell. A stranger glancing at a phone gets what the product is,
 * what it does for them, and the one thing to do, from the first screen and
 * without reading a paragraph. Write the five-line brief first (DESIGN.md
 * §13); the page is built from it.
 *
 *   .pp-header    brand, a few in-page links, the primary action
 *   .pp-hero      .pp-hero-head (status, .pp-audience naming who it's for, a
 *                 thesis of 8 words or fewer), the proof (.pp-media), then
 *                 .pp-hero-body (the pain and the fix in one sentence, the
 *                 ask, "Try the live demo" when there is one, and a short
 *                 note). On a phone the proof sits between the thesis and
 *                 the subhead, so it is on the first screen.
 *   one signature band, the one only this product could have:
 *     .pp-gets    three cards, each a small picture of the product
 *     .pp-compare this product beside the obvious alternative
 *     or a band of the product's own (a library, an embedded demo)
 *   .pp-how       three numbered steps, one line each
 *   .pp-close     the primary action again, with whatever it needs: a short
 *                 .pp-form of .pp-field (.pp-done once it's sent), and the
 *                 prices (.pp-price) if the product has them
 *   .pp-footer    brand and links, then the legal line: © year, owner, and
 *                 the product's Privacy and Terms links if it has them
 *
 * Each product looks like itself (ADR-0011), with three choices on the page:
 *
 *   data-mark on .pp       teal | violet | magenta: the product's mark, which
 *                          inks its glyph, the hero rule, the stage behind the
 *                          proof and the step numerals. Never a button or text.
 *   data-layout on .pp-hero  split (default) | mirror (proof on the left) |
 *                          stage (centred words and actions, the proof full width under them)
 *   the proof's frame      bare, .pp-device (a phone) or .pp-browser (a window)
 *
 * The skeleton is previews/product-page.html, and a worked example is
 * previews/product-page-example.html: copy one, keep the order, replace the
 * words and pictures. scripts/fold.mjs checks the first phone screen.
 * Rules (DESIGN.md §13):
 *
 *   - One primary action per page (.pp-button). Everything else is secondary.
 *   - The status is a word with a dot, never a coloured badge on its own.
 *   - Every picture is the product: a live demo, a real screenshot, a screen
 *     recording, or a faithful mock built from the product's own components.
 *     No stock imagery, no illustrations of people.
 *   - Write for the person who will use it, in their words. Tool names
 *     (Terraform, CI, AWS) go in the steps, not the thesis.
 *
 * Every class starts with .pp- so it can sit beside a site's own stylesheet.
 * Colours are tokens only; widths are --pp-width / --pp-gutter, which a page
 * may override on .pp. */

.pp {
  --pp-width: 1160px;
  --pp-gutter: var(--s5);
  /* The product's mark (ADR-0011): ink until data-mark picks one. The stage
     is the field behind the hero proof, a faint wash of the mark. */
  --pp-mark: var(--ink);
  --pp-stage: color-mix(in srgb, var(--pp-mark) 8%, transparent);
  background: var(--bg);
  color: var(--ink);
  font: var(--text-base) / 1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
/* data-mark on .pp or on an ancestor (<html data-mark="teal">, the same
   attribute the app uses) picks the mark; tokens.css resolves it. */
.pp[data-mark], [data-mark] .pp { --pp-mark: var(--mark-current); }
/* On <body>, drop the browser's 8px margin so the sticky header and every band
   run to the screen edges. On a wrapper, the body is the site's business. */
body.pp { margin: 0; }
@media (max-width: 560px) { .pp { --pp-gutter: var(--s4); } }

/* The content column every band lines up on. */
.pp-wrap { max-width: var(--pp-width); margin: 0 auto; padding: 0 var(--pp-gutter); }

/* ── Skip link ─────────────────────────────────────────────────────────── */
.pp-skip { position: absolute; left: var(--s4); top: -100px; z-index: var(--z-float); padding: var(--s2) var(--s3);
  background: var(--card); color: var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-2); }
.pp-skip:focus { top: var(--s3); }

/* ── Header ────────────────────────────────────────────────────────────── */
.pp-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--surface-sticky); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.pp-header > .pp-wrap { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.pp-brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-weight: var(--weight-semibold); font-size: var(--text-lg); letter-spacing: var(--tracking-title);
}
.pp-brand img, .pp-brand svg { width: 26px; height: 26px; }
/* An inline glyph drawn in currentColor takes the product's mark. */
.pp-brand svg { color: var(--pp-mark); }
.pp-nav { display: flex; align-items: center; gap: var(--s5); margin-left: auto; }
.pp-nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.pp-nav a:hover { color: var(--ink); }
.pp-header-actions { display: flex; align-items: center; gap: var(--s3); }
.pp-nav + .pp-header-actions { margin-left: 0; }
.pp-brand + .pp-header-actions { margin-left: auto; }
/* With the nav hidden, the actions go right. The selector repeats
   .pp-nav + .pp-header-actions so it outranks the margin-left: 0 above. */
@media (max-width: 860px) { .pp-nav { display: none; } .pp-nav + .pp-header-actions { margin-left: auto; } }
@media (max-width: 480px) { .pp-header .pp-status { display: none; } }

/* ── Status ────────────────────────────────────────────────────────────
   Where the product stands, as a word with a dot: "Pilot open", "In
   development", "Closed beta". The dot takes a state hue only when the state
   asks something of the reader (DESIGN.md §3): open = success (you can join),
   soon = attention (it is coming, watch for it). Without data-state it stays
   neutral. The word always carries the meaning on its own. */
.pp-status {
  display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap;
  font: 500 var(--text-xs) / 1 var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--ink-soft); padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.pp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); flex: none; }
.pp-status[data-state="open"]::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-surface); }
.pp-status[data-state="soon"]::before { background: var(--attention); box-shadow: 0 0 0 3px var(--attention-surface); }

/* ── Buttons ───────────────────────────────────────────────────────────
   .pp-button is the page's one primary action. .is-secondary is everything
   else. Works on <a> and <button>. */
.pp-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); box-sizing: border-box;
  font: 600 var(--text-base) / 1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  padding: 13px 22px; border-radius: 8px; border: 1px solid var(--i);
  background: var(--i); color: var(--on-i);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.pp-button:hover { background: var(--i-hover); border-color: var(--i-hover); color: var(--on-i); }
.pp-button:active { background: var(--i-pressed); border-color: var(--i-pressed); }
.pp-button.is-secondary { background: transparent; color: var(--ink); border-color: var(--line-control); font-weight: var(--weight-medium); }
.pp-button.is-secondary:hover { background: var(--surface-hover); color: var(--ink); }
.pp-button.is-secondary:active { background: var(--surface-active); }
.pp-button.is-small { font-size: var(--text-sm); padding: 8px 14px; }
.pp-button:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
.pp-button:disabled { background: var(--i-disabled-bg); border-color: transparent; color: var(--i-disabled-ink); cursor: not-allowed; }
/* The 44px touch target includes padding and border (border-box above), so
   a small header button stays 44px tall rather than growing to 62px. */
@media (pointer: coarse) { .pp-button { min-height: 44px; } }

.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: 0; }
.pp-note { margin: var(--s3) 0 0; font-size: var(--text-sm); color: var(--ink-soft); }

/* ── Hero ──────────────────────────────────────────────────────────────
   Split into .pp-hero-head (status, thesis), the proof (.pp-media), and
   .pp-hero-body (subhead, actions, note). On a phone they stack in that
   order, so the proof is on the first screen; from 960px the head and body
   share the left column and the proof takes the right.

   The older markup, one copy <div> then the figure, still lays out (copy
   first, proof under it on a phone), but it puts the proof below the first
   phone screen, so new pages use the split. */
.pp-hero { padding: var(--s7) 0 var(--s8); }
@media (max-width: 560px) { .pp-hero { padding: var(--s5) 0 var(--s7); } }
.pp-hero > .pp-wrap { display: grid; gap: var(--s7); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .pp-hero > .pp-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.pp-hero > .pp-wrap:has(> .pp-hero-head) { gap: var(--s5); grid-template-areas: "head" "media" "body"; }
.pp-hero-head { grid-area: head; }
.pp-hero-body { grid-area: body; }
.pp-hero-head ~ .pp-media { grid-area: media; }
@media (min-width: 960px) {
  .pp-hero > .pp-wrap:has(> .pp-hero-head) {
    gap: var(--s4) var(--s7); align-items: stretch;
    grid-template-areas: "head media" "body media"; grid-template-rows: 1fr 1fr;
  }
  .pp-hero-head { align-self: end; }
  .pp-hero-body { align-self: start; }
  .pp-hero-head ~ .pp-media { align-self: center; }
}
.pp-hero .pp-status { margin-bottom: var(--s4); }
/* The hero rule: a short bar in the product's mark, the first thing on the
   page that is this product's and nobody else's. */
.pp-hero-head::before {
  content: ""; display: block; width: 48px; height: 4px; border-radius: 2px;
  background: var(--pp-mark); margin-bottom: var(--s4);
}
/* Who it's for, in a few words, above the thesis: "For teams running on AWS".
   A stranger decides "is this for me?" before reading anything else. Ink,
   not cobalt: cobalt says "you can act on this", and this is a label. */
.pp-audience { margin: 0 0 var(--s2); font-size: var(--text-base); font-weight: var(--weight-semibold); line-height: var(--leading-ui); color: var(--ink-soft); }
/* The thesis names the outcome in 8 words or fewer. On a phone it steps down
   from --text-4xl so it takes two or three lines, not five. */
.pp-thesis {
  font-size: min(var(--text-4xl), 1.25rem + 4vw); font-weight: var(--weight-semibold); line-height: 1.04; letter-spacing: -0.035em;
  margin: 0 0 var(--s4); max-width: 16ch; text-wrap: balance;
}
.pp-hero-head .pp-thesis { margin-bottom: 0; }
/* The subhead is one sentence, 25 words or fewer. */
.pp-subhead { font-size: var(--text-lg); line-height: 1.5; color: var(--ink-soft); margin: 0 0 var(--s5); max-width: 40ch; text-wrap: pretty; }
.pp-media { margin: 0; min-width: 0; }
/* The stage: the proof sits on a field of the product's mark, so the eye
   lands on it first and each product's first screen has its own colour. */
.pp-hero .pp-media { box-sizing: border-box; padding: var(--s6); border-radius: calc(var(--radius-lg) * 2); background: var(--pp-stage); }
@media (max-width: 560px) { .pp-hero .pp-media { padding: var(--s4); border-radius: var(--radius-lg); } }

/* Hero layouts (ADR-0011). Split is the default above. Mirror puts the proof
   on the left, for a product whose picture should be read first. Stage
   centres the words and the actions, then gives the proof the full width
   under them, for a wide picture: a map, a dashboard, a before and after.
   The actions sit above the proof so they stay on a laptop's first screen.
   On a phone all three stack the same way: head, proof, body. */
@media (min-width: 960px) {
  .pp-hero[data-layout="mirror"] > .pp-wrap:has(> .pp-hero-head) {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "media head" "media body";
  }
  .pp-hero[data-layout="stage"] > .pp-wrap:has(> .pp-hero-head) {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "media"; grid-template-rows: auto;
    gap: var(--s6); justify-items: center; text-align: center;
  }
  .pp-hero[data-layout="stage"] .pp-hero-head::before { margin-inline: auto; }
  .pp-hero[data-layout="stage"] .pp-thesis { max-width: 20ch; margin-inline: auto; }
  .pp-hero[data-layout="stage"] .pp-subhead { max-width: 52ch; margin-inline: auto; }
  .pp-hero[data-layout="stage"] .pp-actions { justify-content: center; }
  .pp-hero[data-layout="stage"] .pp-hero-head ~ .pp-media { width: 100%; max-width: 1000px; }
  .pp-hero[data-layout="stage"] .pp-media { text-align: start; }
}

/* A browser window around the proof, for a product that lives in a web page
   (an extension, a web app). The bar holds the address, in mono. */
.pp-browser {
  overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
}
.pp-browser-bar {
  display: flex; align-items: center; gap: var(--s3); padding: 8px 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.pp-browser-bar::before {
  content: ""; flex: none; width: 44px; height: 10px;
  background: radial-gradient(circle at 5px 5px, var(--line-strong) 4px, transparent 4.5px) 0 0 / 17px 10px repeat-x;
}
.pp-browser-url {
  flex: 1; min-width: 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font: var(--text-xs) / 1.4 var(--mono); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-browser > :not(.pp-browser-bar) { display: block; width: 100%; height: auto; }

/* ── Proof media: a clip, a phone frame, the steps it shows ───────────────
   The proof slot holds an <img> or a <video>, bare or in a .pp-device phone
   frame, and optionally a row of .pp-steps naming what the clip shows.

     <figure class="pp-media">
       <div class="pp-device">
         <video muted loop playsinline preload="metadata" width="390" height="844"
                poster="finished.png" aria-describedby="clip-steps">
           <source src="clip.mp4" type="video/mp4"></video>
       </div>
       <figcaption class="pp-caption">
         <ol class="pp-steps" id="clip-steps">
           <li data-at="0">Change the hours</li>
           <li data-at="3">Press Save</li>
           <li data-at="6">The site updates</li>
         </ol>
         <button class="pp-play" type="button" hidden>Pause</button>
       </figcaption>
     </figure>

   No autoplay attribute: the small script in DESIGN.md §13 starts the clip
   unless the reader prefers reduced motion, shows the Pause / Play button,
   and lights the step the clip is on. Without the script, or with reduced
   motion, the poster stands still, so the poster is the finished state. */
.pp-media > img, .pp-media > video {
  display: block; width: 100%; height: auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
}

/* A phone around the clip. The bezel is --device, dark in both themes; the
   screen is whatever the frame's one child is (video, img, or a stand-in). */
.pp-device {
  --pp-device-width: 280px;
  box-sizing: border-box; width: min(100%, var(--pp-device-width)); margin: 0 auto;
  padding: 10px; background: var(--device); border-radius: 44px; box-shadow: var(--shadow-3);
}
.pp-device > * {
  display: block; box-sizing: border-box; width: 100%; height: auto; aspect-ratio: 9 / 19.5;
  object-fit: cover; overflow: hidden; border-radius: 34px; background: var(--card);
}

/* Under the clip: the steps in mono, then the control. Centred, because the
   phone is. */
.pp-caption {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: var(--s3) var(--s5);
  margin-top: var(--s5);
}
.pp-steps {
  list-style: none; margin: 0; padding: 0; counter-reset: pp-step;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s4);
}
.pp-steps > li {
  counter-increment: pp-step; padding-top: var(--s2); border-top: 2px solid var(--line-strong);
  font: 500 var(--text-xs) / 1.4 var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--ink-soft);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pp-steps > li::before { content: counter(pp-step) " "; color: var(--ink); }
/* The step the clip is on: the word inks, the bar takes the product's mark.
   Identity, not state, so it never needs a word of its own. */
.pp-steps > li[aria-current="step"] { color: var(--ink); border-top-color: var(--pp-mark); }

/* Pause / Play. A word, because moving content that runs past five seconds
   needs a way to stop it (WCAG 2.2.2). Hidden until the script wires it. */
.pp-play {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; cursor: pointer;
  font: 500 var(--text-xs) / 1 var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-control);
  background: transparent; color: var(--ink);
}
.pp-play:hover { background: var(--surface-hover); }
.pp-play:active { background: var(--surface-active); }
.pp-play:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
.pp-play[hidden] { display: none; }
@media (pointer: coarse) { .pp-play { min-height: 44px; } }

/* ── Bands: what you get, how it works ─────────────────────────────────
   A band is a hairline, a short title that is a sentence, and a grid. */
.pp-band { padding: var(--s8) 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
@media (max-width: 560px) { .pp-band { padding: var(--s7) 0; } }
.pp-title {
  font-size: clamp(var(--text-xl), 1rem + 2vw, var(--text-3xl)); font-weight: var(--weight-semibold); line-height: var(--leading-display);
  letter-spacing: var(--tracking-display); margin: 0; max-width: 24ch; text-wrap: balance;
}

/* What you get: three cards. Each is a small picture of the product doing the
   thing, a short heading, and one line. The picture carries it; the words
   name it. On a phone they stack; from about 820px they sit in a row. */
.pp-gets { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pp-get { display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.pp-get-media { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center;
  background: var(--bg); border-bottom: 1px solid var(--line); }
.pp-get-media > img, .pp-get-media > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-get h3 { margin: var(--s4) var(--s4) 4px; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); }
.pp-get p { margin: 0 var(--s4) var(--s4); color: var(--ink-soft); }

/* Compare: this product beside the thing the reader would otherwise use
   ("a site builder", "a wiki of screenshots"). Two columns, the same rows in
   each, said as words, so nothing rests on colour. Ours is on the right and
   carries the mark on its top rule. On a phone they stack, ours first. */
.pp-compare { margin: var(--s6) 0 0; display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .pp-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-compare > div { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
.pp-compare > .is-ours { border-top: 4px solid var(--pp-mark); box-shadow: var(--shadow-2); }
@media (max-width: 719px) { .pp-compare > .is-ours { order: -1; } }
.pp-compare h3 { margin: 0 0 var(--s3); font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); }
.pp-compare > :not(.is-ours) h3 { color: var(--ink-soft); }
.pp-compare ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.pp-compare li { padding-top: var(--s2); border-top: 1px solid var(--line); }
.pp-compare > :not(.is-ours) li { color: var(--ink-soft); }

/* How it works: three numbered steps, one line each, numbered by the list. */
.pp-how { list-style: none; margin: var(--s6) 0 0; padding: 0; counter-reset: pp-how; display: grid; gap: var(--s5);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pp-how > li { counter-increment: pp-how; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--s3); align-items: baseline; }
.pp-how > li::before {
  content: counter(pp-how); grid-row: span 2; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid var(--pp-mark); font: 600 var(--text-sm) / 1 var(--mono); color: var(--ink);
}
.pp-how h3 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); }
.pp-how p { margin: 0; color: var(--ink-soft); }
.pp-band .pp-figure { margin-top: var(--s6); }

/* ── Story ─────────────────────────────────────────────────────────────
   Optional, and at most one chapter on a product page (the longer argument
   belongs in the docs). An <ol> of chapters. Each opens on a hairline with "01 / Label" in mono,
   then a headline that is a sentence, then a short body and an optional
   figure. Wide screens put the label in its own column. */
.pp-story { list-style: none; margin: 0; padding: 0; counter-reset: pp-chapter; }
.pp-chapter { counter-increment: pp-chapter; padding: var(--s8) 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.pp-chapter > .pp-wrap { display: grid; gap: var(--s4) var(--s7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .pp-chapter > .pp-wrap { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
  .pp-chapter-body { grid-column: 2; }
}
.pp-label { margin: 0; padding-top: 0.4em; font: 500 var(--text-xs) / 1.4 var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--ink-soft); }
.pp-label::before { content: counter(pp-chapter, decimal-leading-zero) " / "; color: var(--ink); }
.pp-chapter h2 {
  font-size: clamp(var(--text-xl), 1rem + 2vw, var(--text-3xl)); font-weight: var(--weight-semibold); line-height: var(--leading-display);
  letter-spacing: var(--tracking-display); margin: 0 0 var(--s4); max-width: 22ch; text-wrap: balance;
}
.pp-chapter-body > p { margin: 0 0 var(--s4); max-width: 62ch; color: var(--ink-soft); font-size: var(--text-lg); line-height: 1.55; }
.pp-chapter-body > p:last-child { margin-bottom: 0; }

/* Two to four short points under a chapter: a ruled column each. */
.pp-points { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pp-points > li { border-top: 2px solid var(--ink); padding-top: var(--s3); }
.pp-points h3 { margin: 0 0 6px; font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-title); }
.pp-points p { margin: 0; color: var(--ink-soft); }

/* A chapter's figure: a terminal, a screenshot, a small mock of the product. */
.pp-figure { margin: var(--s6) 0 0; }
.pp-figure > img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.pp-figure figcaption { margin-top: var(--s2); font-size: var(--text-sm); color: var(--ink-soft); }
.pp-terminal { margin: 0; overflow-x: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: var(--s5); font: var(--text-sm) / 1.7 var(--mono); }
.pp-terminal code { font: inherit; }

/* ── Close ─────────────────────────────────────────────────────────────
   The primary action once more, with the room a form needs. */
.pp-close { padding: var(--s8) 0 var(--s9); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.pp-close > .pp-wrap { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .pp-close > .pp-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.pp-close h2 { font-size: clamp(var(--text-xl), 1rem + 2vw, var(--text-3xl)); font-weight: var(--weight-semibold); line-height: var(--leading-display); letter-spacing: var(--tracking-display); margin: var(--s4) 0 var(--s3); text-wrap: balance; }
.pp-close .pp-subhead { margin-bottom: 0; }
.pp-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: var(--s6); }
@media (max-width: 560px) { .pp-panel { padding: var(--s5) var(--s4); } }

/* ── Form ──────────────────────────────────────────────────────────────
   The short form a close panel may need: a few .pp-field, then the primary
   action in .pp-actions, then a .pp-note for the privacy line (or, after a
   failed send, the error). Mark the optional fields with .pp-optional inside
   the label; required is the default and goes unmarked.

   A field that fails takes aria-invalid="true" on its control and a
   .pp-error message under it, tied with aria-describedby. The message is a
   sentence, so the colour is never the only sign (DESIGN.md §3).

   On success the form is replaced in the panel by .pp-done: a short heading
   and one line, with role="status" so it is announced, and tabindex="-1" so
   script can move focus to it. */
.pp-form { display: grid; gap: var(--s4); margin: 0; }
.pp-form .pp-actions { margin-top: var(--s2); }
/* [hidden] is how the form gives way to .pp-done; display: grid would beat it. */
.pp-form[hidden], .pp-error[hidden], .pp-done[hidden] { display: none; }
.pp-field { display: grid; gap: 6px; min-width: 0; }
.pp-field > label { font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: var(--leading-ui); color: var(--ink); }
.pp-optional { font-weight: var(--weight-regular); color: var(--ink-soft); }
.pp-field input, .pp-field textarea {
  box-sizing: border-box; width: 100%; margin: 0; min-width: 0;
  font: var(--text-base) / 1.5 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--line-control); border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--dur-fast) var(--ease);
}
.pp-field textarea { min-height: 7em; resize: vertical; }
.pp-field input::placeholder, .pp-field textarea::placeholder { color: var(--slate); opacity: 1; }
/* Hover darkens the edge rather than lightening it: --line-strong would drop
   the boundary under 3:1 (DESIGN.md §4). */
.pp-field input:hover, .pp-field textarea:hover { border-color: var(--ink-soft); }
.pp-field input:focus-visible, .pp-field textarea:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
.pp-field input:disabled, .pp-field textarea:disabled { background: var(--surface-hover); color: var(--ink-soft); cursor: not-allowed; }
.pp-field [aria-invalid="true"], .pp-field [aria-invalid="true"]:hover { border-color: var(--danger); }
.pp-error { margin: 0; font-size: var(--text-sm); line-height: var(--leading-ui); color: var(--danger-ink); }
/* A send error reuses the note under the button. */
.pp-note.is-error { color: var(--danger-ink); }

.pp-done h3 { margin: 0 0 var(--s2); font-size: var(--text-xl); font-weight: var(--weight-semibold); line-height: 1.25; letter-spacing: -0.015em; }
.pp-done p { margin: 0; color: var(--ink-soft); }
.pp-done:focus { outline: none; }
.pp-done:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 4px; border-radius: var(--radius-sm); }
/* ── Price ─────────────────────────────────────────────────────────────
   Two to four ways to pay, as a <dl>: one <div> per option, the price as <dt>,
   one line of condition as <dd>. Ruled like .pp-points, narrower so three fit
   in the close band's left column. It goes under the close's subhead (or in a
   chapter body, if pricing is the argument). The options carry no buttons:
   the page's one .pp-button stays in the panel, and an option that needs its
   own way in gets a plain link in its <dd>. */
.pp-price { margin: var(--s6) 0 0; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pp-price > div { border-top: 2px solid var(--ink); padding-top: var(--s3); }
.pp-price dt { margin: 0 0 6px; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); }
.pp-price dd { margin: 0; font-size: var(--text-sm); color: var(--ink-soft); }
.pp-price dd a { color: var(--i-ink); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.pp-footer { border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s7); color: var(--ink-soft); font-size: var(--text-sm); }
.pp-footer > .pp-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); }
.pp-footer p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.pp-footer .pp-brand { font-size: var(--text-base); }
.pp-footer .pp-brand img, .pp-footer .pp-brand svg { width: 20px; height: 20px; }
.pp-footer nav { display: flex; flex-wrap: wrap; gap: var(--s4); }
.pp-footer nav a { color: var(--ink-soft); text-decoration: none; }
.pp-footer nav a:hover { color: var(--ink); }
/* The legal line: the copyright, then Privacy / Terms when the product has
   them. Full width under the brand row, quieter than it. The year is filled in
   by the site's build, never typed and never written by client script. */
.pp-legal { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--text-xs); }
.pp-legal small { font-size: inherit; }

/* Card and step headings balance their lines, like the band headings above. */
:where(.pp-get, .pp-compare, .pp-how, .pp-points, .pp-done) h3, .pp-price dt { text-wrap: balance; }
