/* Public static pages — shared .pp-* header primitives + per-page blocks. */

/* These pages take the SHELL width, like every other public page (about, careers, legal,
   donate): `.app-public .public-content > .screen` in shell/public-shell.css. They each used to cap
   themselves at a different figure — 860 / 900 / 1100 / 760 — so the four of them were the
   only public pages that did not line up with the rest.
   No measure cap anywhere on these pages: `.pp-lede`, `.rules-rich` and `.faq-a p` all run the
   full frame width, so widening the frame lengthens the line. Deliberate — do not reinstate a
   max-width without asking. */

.pp-head { padding: 8px 0 4px; }
.pp-head h2 { margin: 4px 0 10px; letter-spacing: -0.015em; text-wrap: balance; }
.pp-lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.pp-cta-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--bronze) 5%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  /* Optically centred: asymmetric padding offsets the button's height. */
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-1);
}
.pp-cta-card h3 { margin: 0 0 4px; text-wrap: balance; }
.pp-cta-card p  { margin: 0; color: var(--ink-2); font-size: 0.9rem; }

.faq-screen .pp-cta-card {
  margin-top: 34px;
}

.faq-groups { display: flex; flex-direction: column; gap: 26px; }
.faq-group-title { margin: 0 0 10px; color: var(--bronze-2); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color 0.12s;
}
/* Border only. The answer appearing is the real signal — a background wash on top of it just
   makes the open card a different colour from every other one on the page.
   `[open]`, not a class: FaqList emits <details>, so the browser owns this state. */
.faq-item[open] {
  border-color: var(--bronze);
}
.faq-q {
  background: transparent; border: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; box-sizing: border-box;
  padding: 15px 18px;
  font: inherit; font-size: 0.98rem; font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: color 0.12s, background 0.12s;
  list-style: none;   /* the default disclosure triangle, replaced by ::after below */
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  color: var(--bronze-2); font-size: 1.3rem; line-height: 1; flex: none;
}
.faq-item[open] .faq-q::after { content: '−'; }
.faq-q:hover { color: var(--bronze-2); background: color-mix(in srgb, var(--bronze) 5%, transparent); }
/* Inset ring: an outset ring is clipped by the item's `overflow: hidden`. */
.faq-q:focus-visible {
  outline: 2px solid var(--bronze-2); outline-offset: -3px;
}
.faq-a { padding: 0 18px 16px; }
.faq-a p { margin: 0; color: var(--ink-2); line-height: 1.65; font-size: 0.94rem; text-wrap: pretty; }

.ranks-mine {
  display: inline-flex; align-items: baseline; gap: 10px;
  margin-top: 14px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}
.ranks-mine-label { color: var(--ink-3); font-size: 0.8rem; }
.ranks-mine-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
}
.ranks-mine-stars { color: var(--bronze-2); }
.ranks-ladder {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  /* Highest tier first reads as a ladder to climb. */
  flex-direction: column-reverse;
  gap: 8px;
}
.ranks-step {
  display: flex; align-items: center; gap: 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 12px 16px;
}
.ranks-step.is-current {
  border-color: var(--bronze-2);
  background: color-mix(in srgb, var(--bronze) 8%, var(--bg-1));
  box-shadow: 0 0 0 1px var(--bronze-2);
}
.ranks-step.is-achieved { opacity: 0.75; }
/* .medallion primitive (theme.css) supplies the gradient-clip disc; only size + numeral differ. */
.ranks-step-badge { --medallion-size: 40px; font-size: 1.2rem; }
.ranks-step-text { min-width: 0; flex: 1 1 auto; }
.ranks-step-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}
.ranks-step-range {
  font-size: 0.82rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.ranks-stars { color: var(--bronze-2); letter-spacing: 1px; margin-left: 6px; }
.ranks-stars-none { color: var(--ink-4); }
.ranks-you-pill {
  flex: 0 0 auto;
  padding: 2px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--bronze) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--bronze) 40%, transparent);
  color: var(--bronze-2);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
@media (max-width: 640px) {
  .faq-screen .pp-cta-card .btn { width: 100%; }
}

/* Public-page primaries are BRONZE (green is reserved for the landing Play CTA).
   _dispatchScreen sets .is-public-page for every PUBLIC_PHASES entry. */
.is-public-page .btn-primary {
  background: var(--bronze-gradient);
  color: var(--on-bronze);
  border-color: var(--bronze-deep);
}
.is-public-page .btn-primary:hover:not(:disabled) {
  background: var(--bronze-gradient-hover);
  border-color: var(--bronze-deep);
}

/* Overrides the global `.screen { align-items: center }` (layout.css), which else
   shrinks flex children to content width and breaks alignment with the cards/rows. */
.is-public-page > .screen {
  align-items: stretch;
}

.unsubscribe-screen { display: flex; justify-content: center; }
.unsubscribe-screen .unsub-card {
  width: 100%; max-width: 560px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 28px 30px; box-shadow: var(--shadow-1);
}
.unsubscribe-screen .unsub-title { font-family: var(--font-display); font-weight: 500; color: var(--ink); margin: 4px 0 14px; }
.unsubscribe-screen .unsub-msg { color: var(--ink-2); line-height: 1.6; margin: 0 0 16px; }
.unsubscribe-screen .unsub-topics { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.unsubscribe-screen .unsub-check { display: flex; align-items: center; gap: 10px; color: var(--ink); cursor: pointer; }
.unsubscribe-screen .unsub-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.unsubscribe-screen .unsub-done {
  padding: 10px 14px; margin-bottom: 16px; border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--laurel) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--laurel) 40%, transparent); color: var(--laurel-2);
}
