/* Guide pages (/bill-splitting-app, /splitwise-alternative, /receipt-splitting-app,
   /group-payment-app). Markup: src/seo-pages.ts. Header, FAQ, closing band and
   footer come from hero.css and closing.css; primitives from base.css. */

.pg { --pg-radius: clamp(22px, 2.8vw, 36px); --pg-shadow: -4px 5px 0 var(--plurel-ink); }

/* Sections on paper. Consecutive sections share one gap, not two. */
.pg-sec { padding-block: clamp(64px, 8vw, 112px); }
.pg-sec--tight { padding-top: 0; }
.pg-head { max-width: 54rem; }
.pg-head .ps-h2 { margin-top: 16px; }
.pg .pg-head__lede { margin-top: 20px; max-width: 60ch; color: var(--plurel-muted); }

/* ---------- Phone stage ----------
   A colored panel holding one whole phone, tilted, with the hard ink shadow
   of the homepage feature panels. Two doodles sit on the panel's top corners,
   clear of the screen. The hero adds a piece of drawn art; its markup and
   classes (.pf-link, .pf-chip, .pf-receipt) are the homepage's, from
   features.css, and only their placement is set here. */
.pg-stage {
  --pg-phone: min(56vw, 250px);
  --pg-tilt: 3deg;
  --pg-shift: 0%;
  position: relative; display: grid; place-items: center;
  padding: clamp(52px, 7vw, 68px) 16px;
  border: 1.5px solid var(--plurel-ink); border-radius: var(--pg-radius);
}
.pg-panel--blue { background: var(--ps-blue); }
.pg-panel--blush { background: var(--ps-blush); }
.pg-panel--yellow { background: var(--ps-yellow); }
.pg-panel--orange { background: var(--ps-orange); }
.pg-stage .pg-phone {
  position: relative; z-index: 1; width: var(--pg-phone);
  translate: var(--pg-shift) 0; rotate: var(--pg-tilt);
  filter: drop-shadow(-6px 8px 0 var(--plurel-ink));
}
.pg-stage--dive { --pg-tilt: -3deg; }

.pg-doodle { position: absolute; z-index: 2; width: clamp(46px, 4.8vw, 66px); height: auto; pointer-events: none; }
.pg-doodle--l { left: -10px; top: -24px; rotate: -10deg; }
.pg-doodle--r { right: -8px; top: -20px; rotate: 12deg; }

.pg-art { position: absolute; pointer-events: none; }
/* Bill splitting: the Split! sticker slapped on the bottom-left corner. */
.pg-stage--sticker { --pg-shift: 14%; }
.pg-art--sticker { z-index: 2; left: -10px; bottom: 22px; width: clamp(104px, 10vw, 140px); rotate: -12deg; }
.pg-art--sticker img { width: 100%; height: auto; }
/* Splitwise alternative: the group link, across the panel's bottom edge. */
.pg-stage--link { padding-bottom: clamp(84px, 9vw, 100px); }
.pg-art--link { z-index: 2; left: 50%; bottom: -14px; width: min(90%, 420px); translate: -50% 0; }
.pg-art--link .pf-link { position: relative; inset: auto; }
/* Receipt splitting: the taped bill, tucked behind the phone. */
.pg-stage--receipt { --pg-shift: 18%; }
.pg-art--receipt { z-index: 0; left: 2%; top: 50%; width: 290px; translate: 0 -46%; rotate: -7deg; scale: .6; transform-origin: 0 50%; }
.pg-art--receipt .pf-receipt { padding-bottom: 40px; rotate: none; }
.pg-art--receipt .pf-receipt__sticker { left: -36px; right: auto; bottom: -58px; width: 150px; rotate: -14deg; }
/* Group payment: friends' paid chips beside the phone. */
.pg-stage--chips { --pg-shift: 18%; }
.pg-art--chips { z-index: 2; inset: 0; }
.pg-art--chips .pf-chip--a { left: -8px; top: 30%; }
.pg-art--chips .pf-chip--b { left: -2px; right: auto; top: 45%; }

@media (min-width: 600px) and (max-width: 899px) { .pg-stage { --pg-phone: 270px; } }
/* Narrow panels: a slimmer phone, so the art beside it stays off the screen. */
@media (max-width: 599px) {
  .pg-stage--receipt, .pg-stage--chips, .pg-stage--sticker { --pg-phone: min(52vw, 230px); }
  .pg-art--receipt { scale: .52; }
}
@media (min-width: 900px) {
  .pg-stage .pg-phone { filter: drop-shadow(-10px 12px 0 var(--plurel-ink)); }
}

/* ---------- Hero ---------- */
.pg-hero { padding-top: clamp(16px, 3vw, 40px); }
.pg-hero__grid { display: grid; gap: 40px; }
.pg-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: .875rem; }
.pg-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--plurel-muted); }
.pg-crumbs a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pg-crumbs [aria-current] { color: var(--plurel-muted); }

.pg .pg-kicker {
  display: inline-flex; align-items: center; min-height: 32px; margin-top: clamp(24px, 3.4vw, 40px); padding: 6px 14px;
  border: 1px solid var(--plurel-ink); border-radius: 999px; background: var(--ps-yellow);
}
.pg .pg-hero__title {
  margin-top: clamp(18px, 2.2vw, 28px);
  font-size: clamp(2rem, 4.2vw, 3.75rem); line-height: .96; letter-spacing: -.02em;
}
.pg-answer {
  max-width: 62ch; margin-top: clamp(24px, 3vw, 36px); padding: clamp(18px, 2.2vw, 24px) clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--plurel-ink); border-radius: 20px; background: var(--plurel-paper); box-shadow: var(--pg-shadow);
  font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty;
}
/* Quiet links down the page; the one sign-up is the closing band. */
.pg-jump { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: clamp(24px, 3vw, 32px); }

.pg-hero__shot { display: grid; margin-top: 16px; }

@media (min-width: 900px) {
  .pg-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(40px, 5vw, 80px); align-items: start; }
  .pg-hero__shot { margin-top: 0; }
  .pg-stage--hero { --pg-phone: clamp(206px, 19vw, 264px); }
}

/* ---------- Three takeaways, one app color each ---------- */
.pg-cards { display: grid; gap: clamp(14px, 1.8vw, 24px); margin: clamp(32px, 4.4vw, 56px) 0 0; padding: 0; list-style: none; }
.pg-card { padding: clamp(24px, 3vw, 36px); border: 1.5px solid var(--plurel-ink); border-radius: var(--pg-radius); }
.pg-card--blue { background: var(--ps-blue); }
.pg-card--blush { background: var(--ps-blush); }
.pg-card--yellow { background: var(--ps-yellow); }
.pg .pg-card__label {
  display: inline-flex; align-items: center; min-height: 30px; padding: 5px 12px;
  border: 1px solid var(--plurel-ink); border-radius: 999px; background: var(--plurel-paper);
}
.pg .pg-card__title {
  margin-top: 22px;
  font: 400 clamp(1.375rem, 2.2vw, 1.875rem)/1 var(--plurel-label); letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance;
}
.pg .pg-card__body { margin-top: 16px; max-width: 46ch; font-size: 1.0625rem; line-height: 1.5; text-wrap: pretty; }
@media (min-width: 900px) { .pg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Long-form section: reads on paper at about 68 characters ---------- */
.pg-dive { display: grid; gap: clamp(40px, 5vw, 64px); }
.pg-prose { max-width: 68ch; }
.pg .pg-dive__title { margin-top: 16px; }
.pg .pg-prose > p:not(.ps-label) { margin-top: 20px; color: var(--plurel-muted); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.65; text-wrap: pretty; }
.pg .pg-prose > .pg-dive__title + p { margin-top: 28px; }
.pg-prose strong { color: var(--plurel-ink); }
.pg .pg-prose > p:last-child { margin-top: 28px; }
.pg-more { color: var(--plurel-ink); font-weight: 700; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.pg-more:hover { text-decoration-thickness: 2px; }
.pg .pg-more svg, .pg .pg-guide__go svg, .pg .pg-table__hint svg { display: inline-block; vertical-align: -3px; margin-left: 4px; }
@media (min-width: 960px) {
  .pg-dive { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: clamp(48px, 6vw, 96px); }
  .pg-stage--dive { --pg-phone: clamp(220px, 19vw, 260px); }
}

/* ---------- Comparison table ----------
   Scrolls sideways inside its own frame on narrow screens; the feature column
   stays put. The Plurel column is yellow, outlined, with an orange header. */
.pg-table__hint { display: none; }
.pg-table {
  margin-top: clamp(32px, 4vw, 48px); overflow-x: auto; overscroll-behavior-x: contain;
  border: 1.5px solid var(--plurel-ink); border-radius: var(--pg-radius); background: var(--plurel-paper);
}
.pg-table:focus-visible { outline-offset: 4px; }
.comp-table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: separate; border-spacing: 0; text-align: left; font-size: .9375rem; line-height: 1.45; }
.comp-table th, .comp-table td { padding: 16px 18px; vertical-align: top; border-bottom: 1px solid var(--plurel-hairline); }
.comp-table tbody tr:last-child > * { border-bottom: 0; }
.comp-table thead th {
  vertical-align: bottom; border-bottom: 1.5px solid var(--plurel-ink);
  font: 400 .75rem/1.25 var(--plurel-label); letter-spacing: .08em; text-transform: uppercase;
}
.comp-table tbody th { font-weight: 700; }
.comp-table td { color: var(--plurel-muted); }
.comp-table tr > :first-child {
  position: sticky; left: 0; z-index: 1; width: 22%; min-width: 150px;
  background: var(--plurel-paper); box-shadow: inset -1px 0 0 var(--plurel-hairline);
}
.comp-table .is-plurel {
  background: var(--ps-yellow); color: var(--plurel-ink); font-weight: 700;
  box-shadow: inset 1.5px 0 0 var(--plurel-ink), inset -1.5px 0 0 var(--plurel-ink);
}
.comp-table thead .is-plurel { background: var(--ps-orange); }
@media (max-width: 899px) {
  .pg-table__hint {
    display: flex; align-items: center; gap: 4px; margin-top: 28px;
    font: 400 .75rem/1 var(--plurel-label); letter-spacing: .08em; text-transform: uppercase;
  }
  .pg-table__hint + .pg-table { margin-top: 12px; }
  .comp-table { font-size: .875rem; }
  .comp-table th, .comp-table td { padding: 14px; }
  .comp-table tr > :first-child { min-width: 128px; width: 128px; }
}

/* ---------- More guides ---------- */
.pg-sec--related { border-top: 1px solid var(--plurel-ink); }
.pg-guides { display: grid; gap: clamp(16px, 2vw, 24px); margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; list-style: none; }
.pg-guides li { display: flex; }
.pg-guide {
  display: flex; flex-direction: column; gap: 14px; width: 100%; padding: clamp(22px, 2.6vw, 30px);
  border: 1.5px solid var(--plurel-ink); border-radius: var(--pg-radius); background: var(--plurel-paper);
  box-shadow: var(--pg-shadow); text-decoration: none;
  transition: transform .12s var(--ps-ease), box-shadow .12s var(--ps-ease), background-color .15s var(--ps-ease);
}
.pg-guide__title { font: 400 clamp(1.25rem, 1.9vw, 1.5rem)/1.02 var(--plurel-label); text-transform: uppercase; text-wrap: balance; }
.pg-guide__body { color: var(--plurel-muted); font-size: .9375rem; line-height: 1.5; text-wrap: pretty; }
.pg-guide__go {
  margin-top: auto; padding-top: 6px; font: 700 .8125rem/1.2 var(--plurel-body); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
@media (hover: hover) { .pg-guide:hover { background: var(--ps-yellow); transform: translate(-2px, 2px); box-shadow: -2px 3px 0 var(--plurel-ink); } }
.pg-guide:active { transform: translate(-4px, 5px); box-shadow: 0 0 0 var(--plurel-ink); }
.pg .pg-guide:focus-visible { outline-offset: 4px; }
@media (min-width: 900px) { .pg-guides { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg .pg-llms { margin-top: 32px; font-size: .9375rem; }
.pg-llms a { font-weight: 700; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (prefers-reduced-motion: reduce) { .pg-guide { transition: none; } }
