/*
  Layout for the public pages (scripts/build-public-pages.mjs), on DESIGN.md v2 ("Stage Night"). Loaded after the app's
  own stylesheet, which brings the tokens (src/index.css: colors, --e1..--e3, --glow, --spot), the fonts and the .btn-hero,
  .card, .card-lit, .chip and .float-bar components. Only token variables here, never raw colors, so the pages follow
  DESIGN.md and pick up token changes on the next build. Depth comes from the shadow tokens, not hairlines.
*/
.pp {
  min-height: 100vh;
  font-size: 16px;
  line-height: 26px;
}
.pp-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}
.pp-wide {
  max-width: 1120px;
}
@media (min-width: 768px) {
  .pp-wrap {
    padding: 0 24px;
  }
}
@media (min-width: 1024px) {
  .pp-wrap.pp-wide {
    padding: 0 32px;
  }
}
.pp-skip {
  position: absolute;
  left: -9999px;
}
.pp-skip:focus {
  left: 16px;
  top: 8px;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgb(var(--surface));
  color: rgb(var(--ink));
  box-shadow: var(--e3);
}
.pp-main a:not([class]) {
  color: rgb(var(--ink));
  text-decoration: underline;
  text-decoration-color: rgb(var(--accent-text) / 0.6);
  text-underline-offset: 3px;
}
.pp-main a:not([class]):hover {
  text-decoration-color: rgb(var(--accent-text));
}

/* Header: the logo stands alone at the left, the links sit in one floating pill at the right (DESIGN.md 6). */
.pp-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(var(--canvas) / 0.85);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.pp-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.pp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: rgb(var(--ink));
}
.pp-mark {
  width: 36px;
  height: 32px;
  flex-shrink: 0;
}
.pp-wordmark {
  font-family: 'Bricolage Grotesque Variable', 'Atkinson Hyperlegible Next Variable', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pp-wordmark span {
  color: rgb(var(--accent-text));
}
.pp-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 48px;
  padding: 0 6px;
  border-radius: 9999px;
}
.pp-nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
  color: rgb(var(--muted));
  transition: color 150ms, background-color 150ms;
}
.pp-nav a:hover {
  color: rgb(var(--ink));
}
/* The current section: a lifted pill, never an underline (DESIGN.md 6, tabs). */
.pp-nav a[aria-current='page'] {
  color: rgb(var(--ink));
  background: rgb(var(--surface-3));
  box-shadow: var(--hi);
}
@media (max-width: 559px) {
  .pp-nav {
    width: 100%;
    justify-content: space-between;
  }
  .pp-nav a {
    padding: 0 12px;
  }
}

/* Breadcrumbs */
.pp-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--subtle));
}
.pp-crumbs li + li::before {
  content: '/';
  margin: 0 8px;
  color: rgb(var(--line-strong));
}
.pp-crumbs a {
  color: rgb(var(--muted));
}
.pp-crumbs a:hover {
  color: rgb(var(--ink));
}
.pp-crumbs [aria-current] {
  color: rgb(var(--subtle));
}

/* Type (DESIGN.md 3): h1 Bricolage 800 at 90% width (the width comes from the app's base styles). */
.pp-main {
  padding-top: 24px;
  padding-bottom: 64px;
}
.pp h1 {
  margin: 0;
  font-size: 36px;
  line-height: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
@media (min-width: 768px) {
  .pp h1 {
    font-size: 48px;
    line-height: 50px;
    letter-spacing: -0.035em;
  }
}
.pp h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pp h2 a:not([class]) {
  text-decoration: none;
}
.pp h3 {
  margin: 20px 0 4px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}
.pp p {
  margin: 0 0 12px;
  max-width: 68ch;
}
.pp-lead {
  margin-top: 16px !important;
  font-size: 18px;
  line-height: 28px;
  color: rgb(var(--muted));
}
.pp-kicker {
  margin: 0 0 8px !important;
  font-size: 15px;
  font-weight: 600;
  color: rgb(var(--accent-text));
}
.pp-kicker a:not([class]) {
  color: inherit;
  text-decoration: none;
}
.pp-muted {
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--subtle));
}
.pp-center {
  text-align: center;
  margin-left: auto !important;
  margin-right: auto !important;
}
.pp-section {
  margin-top: 48px;
}
.pp-list {
  margin: 0 0 12px;
  padding-left: 22px;
  list-style: disc;
  max-width: 68ch;
}
.pp-list li {
  margin: 6px 0;
}
.pp-list li::marker {
  color: rgb(var(--accent-text));
}
.pp-ol {
  list-style: decimal;
}
.pp-ol li::marker {
  font-weight: 700;
}

/* Facts: one raised card, line dividers between the cells. */
.pp-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 0;
  overflow: hidden;
  border-radius: 20px;
  background: rgb(var(--line));
  box-shadow: var(--e1);
}
@media (min-width: 640px) {
  .pp-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.pp-facts div {
  padding: 14px 16px;
  background: rgb(var(--surface));
}
.pp-facts dt {
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--subtle));
}
.pp-facts dd {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

/* The one big action */
.pp-cta {
  margin: 32px 0 8px !important;
  max-width: none !important;
}
.pp-cta .btn-hero {
  width: 100%;
}
@media (min-width: 640px) {
  .pp-cta .btn-hero {
    width: auto;
    min-width: 280px;
  }
}
/* The lit card around it: the page's one stage light (DESIGN.md 5). */
.pp-stage {
  margin: 32px 0 0;
}
.pp-stage-in {
  position: relative;
  padding: 28px 20px 20px;
}
@media (min-width: 640px) {
  .pp-stage-in {
    padding: 36px 32px 28px;
  }
}
.pp-stage-title {
  margin: 0 0 4px !important;
  font-family: 'Bricolage Grotesque Variable', 'Atkinson Hyperlegible Next Variable', system-ui, sans-serif;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pp-stage-text {
  color: rgb(var(--muted));
}
.pp-stage .pp-cta {
  margin: 24px 0 12px !important;
}
.pp-stage .pp-muted {
  margin-bottom: 0;
}
.pp-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.pp-icon-lg {
  width: 20px;
  height: 20px;
}

/* Rows of links in one card */
.pp-cards {
  display: block;
  margin: 12px 0 16px;
  padding: 0;
  overflow: hidden;
  list-style: none;
}
.pp-cards li + li {
  border-top: 1px solid rgb(var(--line));
}
.pp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 16px 12px 20px;
  color: rgb(var(--ink));
  transition: background-color 150ms;
}
.pp-card:hover {
  background: rgb(var(--surface-2));
}
.pp-card-text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.pp-card-title {
  font-weight: 600;
}
.pp-card-meta {
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--subtle));
}
.pp-chev {
  color: rgb(var(--subtle));
}

/* Chips */
.pp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.pp-chips a.chip {
  min-height: 32px;
}
.pp-chips a.chip:hover {
  color: rgb(var(--ink));
  background: rgb(var(--surface-3));
}
.pp-chips-tight {
  margin-top: 16px;
}
.pp-chips + p {
  margin-top: 16px;
}

/* Scenario */
.pp-scenario {
  padding: 24px;
}
.pp-scenario p:last-child,
.pp-scenario ul:last-child {
  margin-bottom: 0;
}
.pp-scenario ul {
  margin: 0 0 12px;
  padding-left: 22px;
  list-style: disc;
}

/* Tables: a raised card, line dividers between rows. */
.pp-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border-radius: 20px;
  background: rgb(var(--surface));
  box-shadow: var(--e1);
}
.pp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 22px;
}
.pp-table th,
.pp-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(var(--line));
}
.pp-table thead th {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: rgb(var(--subtle));
}
.pp-table tbody th {
  font-weight: 400;
}
.pp-table thead th.n {
  text-align: right;
}
.pp-table td.n {
  white-space: nowrap;
  text-align: right;
  font-family: 'Atkinson Hyperlegible Mono Variable', ui-monospace, monospace;
  font-size: 14px;
}
.pp-table tbody tr:last-child th,
.pp-table tbody tr:last-child td {
  border-bottom: 0;
}
.pp-table tfoot th,
.pp-table tfoot td {
  border-top: 1px solid rgb(var(--line-strong));
  border-bottom: 0;
  font-weight: 700;
}

/* Sample questions */
.pp-questions {
  display: grid;
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.pp-question {
  padding: 24px 20px;
}
.pp-q-meta {
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--subtle));
  margin-bottom: 8px !important;
}
.pp-q-stem {
  font-size: 19px;
  line-height: 28px;
  font-weight: 600;
  max-width: 60ch;
}
/* The app's answer rows (.option), drawn static: a soft raised row with a quiet control edge. */
.pp-options {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}
.pp-options li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid rgb(var(--control) / 0.4);
  border-radius: 14px;
  background: rgb(var(--surface-2) / 0.6);
  box-shadow: var(--hi);
}
.pp-key {
  font-family: 'Atkinson Hyperlegible Mono Variable', ui-monospace, monospace;
  font-weight: 700;
  color: rgb(var(--muted));
}
/* "Show the answer": the app's secondary button. */
.pp-question details summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  background: rgb(var(--surface-2));
  box-shadow: var(--hi);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: background-color 150ms;
}
.pp-question details summary::-webkit-details-marker {
  display: none;
}
.pp-question details summary:hover {
  background: rgb(var(--surface-3));
}
.pp-question details[open] summary {
  margin-bottom: 16px;
}
.pp-answer {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px 16px;
  border: 1px solid rgb(var(--success));
  border-radius: 12px;
  background: rgb(var(--success) / 0.12);
}
.pp-answer .pp-icon {
  margin-top: 4px;
  color: rgb(var(--success));
}

/* FAQ */
.pp-faq h3:first-child {
  margin-top: 0;
}

/* Footer */
.pp-footer {
  border-top: 1px solid rgb(var(--line));
  padding: 32px 0;
}
.pp-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 8px;
}
.pp-foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 15px;
  color: rgb(var(--muted));
}
.pp-foot-links a:hover {
  color: rgb(var(--ink));
}
.pp-foot-legal a {
  font-size: 13px;
}
.pp-notice {
  margin-top: 8px !important;
  font-size: 13px;
  line-height: 18px;
  color: rgb(var(--subtle));
}
