/* ── Rebuilt content pages (pg-): articles, guides, hubs, legal ── phone first.
   Built by tools/pages/*.py; tokens come from tokens.css / brand.css. */
.pg { background: var(--paper); color: var(--ink); font-family: var(--font); }
.pg p::before, .pg p::after { content: none; display: none; }
.pg h1, .pg h2, .pg h3, .pg h4, .pg p, .pg ul, .pg ol, .pg figure, .pg blockquote { margin: 0; }
.pg-wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }
.pg-narrow { width: min(100% - 40px, 760px); margin-inline: auto; }
.pg-sec { padding-top: 56px; }
.pg-sec:last-child { padding-bottom: 72px; }

/* Breadcrumbs */
.pg-crumbs { padding-top: 20px; font-size: 13px; color: var(--text-on-paper-3); }
.pg-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; padding: 0; list-style: none; }
.pg-crumbs li { display: inline-flex; align-items: center; }
.pg-crumbs li[aria-current] { padding: 6px 0; color: var(--text-on-paper-3); }
.pg-crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--text-on-paper-3); }
.pg-crumbs a { color: var(--text-on-paper-2); text-decoration: none; display: inline-block; padding: 6px 0; }
@media screen and (max-width: 767px) { .pg-crumbs li[aria-current] { display: none; } } /* the page title is the h1 just below */
.pg-crumbs a:hover { color: var(--hl-on-paper); text-decoration: underline; }

/* Page header */
.pg-hero { padding: 16px 0 8px; }
.pg-kicker { display: block; margin-bottom: 10px !important; font-size: 13px; font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--text-on-paper-3); }
.pg-h1 { font-size: 34px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); text-wrap: balance; max-width: 22ch; }
.pg-sub { margin: 16px 0 0 !important; max-width: 56ch; font-size: 17px; line-height: 1.55; color: var(--text-on-paper-2); }
.pg-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 16px !important; font-size: 13px; color: var(--text-on-paper-3); }
.pg-meta span + span::before { content: "\00b7"; margin: 0 10px; }
.pg-cta { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-top: 24px; }
.pg-cta .btn_primary { text-align: center; }
.pg-cta .btn_secondary { align-self: center; }

/* Article layout: contents list folds on phones, sticks beside the text on desktop */
.pg-article { display: grid; gap: 24px; padding-top: 28px; }
.pg-toc { border: 1px solid var(--hair-on-paper); border-radius: var(--r-card); background: var(--white); }
.pg-toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.pg-toc summary::-webkit-details-marker { display: none; }
.pg-toc summary::after { content: "+"; font-size: 20px; font-weight: 400; }
.pg-toc[open] summary::after { content: "\2212"; }
.pg-toc ol { margin: 0; padding: 0 16px 12px; list-style: none; }
.pg-toc li a { display: block; padding: 8px 0; border-top: 1px solid var(--hair-on-paper); font-size: 14px; line-height: 1.4; color: var(--text-on-paper-2); text-decoration: none; }
.pg-toc li a:hover { color: var(--hl-on-paper); }

/* Prose */
.pg-prose { min-width: 0; max-width: 70ch; font-size: 17px; line-height: 1.65; color: var(--text-on-paper-2); }
.pg-prose > * + * { margin-top: 18px !important; }
.pg-prose h2 { margin-top: 44px !important; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); text-wrap: balance; scroll-margin-top: 84px; }
.pg-prose h3 { margin-top: 32px !important; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 700; color: var(--ink); scroll-margin-top: 84px; }
.pg-prose h4 { margin-top: 24px !important; font-size: 17px; font-weight: 700; color: var(--ink); }
.pg-prose h2:first-child, .pg-prose h3:first-child { margin-top: 0 !important; }
.pg-prose p { margin-bottom: 0 !important; font-size: 17px; line-height: 1.65; color: var(--text-on-paper-2); }
.pg-prose > p + p { margin-top: 14px !important; }
.pg-prose strong { color: var(--ink); font-weight: 600; }
.pg-prose a { color: var(--hl-on-paper); text-decoration: underline; text-underline-offset: 2px; }
.pg-prose ul, .pg-prose ol { padding-left: 22px; }
.pg-prose ul { list-style: disc; }
.pg-prose ol { list-style: decimal; }
.pg-prose li { margin-top: 8px; padding-left: 2px; }
.pg-prose li::marker { color: var(--text-on-paper-3); }
.pg-prose img { display: block; max-width: 100%; height: auto; border-radius: var(--r-card); }
.pg-prose figure figcaption { margin-top: 8px; font-size: 13px; color: var(--text-on-paper-3); }
.pg-prose blockquote { padding: 2px 0 2px 18px; border: 0; border-left: 3px solid var(--hair-on-paper); border-radius: 0; font-size: 17px; line-height: 1.6; color: var(--ink); } /* base.css draws a 60px-padded pill */
.pg-prose hr { border: 0; border-top: 1px solid var(--hair-on-paper); margin: 32px 0 !important; }
.pg-prose code { padding: 2px 6px; border-radius: 6px; background: rgba(var(--ink-rgb), 0.06); font-size: 0.9em; color: var(--ink); word-break: break-word; }
.pg-prose pre { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px; border-radius: var(--r-card); background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.6; white-space: pre; }
.pg-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; word-break: normal; }
.pg-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--hair-on-paper); border-radius: var(--r-card); background: var(--white); }
.pg-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.pg-table th, .pg-table td { padding: 12px 14px; border-bottom: 1px solid var(--hair-on-paper); text-align: left; vertical-align: top; }
.pg-table th { font-weight: 600; color: var(--ink); background: rgba(var(--ink-rgb), 0.03); }
.pg-table tr:last-child td { border-bottom: 0; }
.pg-table p, .pg-faq_a p:first-child { margin: 0 !important; font-size: inherit; line-height: inherit; } /* base.css forces p margins */
.pg-table p + p { margin-top: 6px !important; }

/* Boxes */
.pg-note { padding: 18px 20px; border: 1px solid var(--hair-on-paper); border-radius: var(--r-card); background: var(--white); }
.pg-note > :first-child { margin-top: 0 !important; }
.pg-note h2, .pg-note h3 { margin-top: 0 !important; font-size: 17px; }
.pg-steps { counter-reset: s; padding: 0 !important; list-style: none !important; }
.pg-steps > li { position: relative; margin-top: 18px; padding-left: 46px; }
.pg-steps > li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 700; }
.pg-steps > li strong:first-child { display: block; color: var(--ink); }
.pg-ctacard { margin-top: 36px !important; padding: 24px 20px; border-radius: var(--r-card); background: var(--ink); color: var(--paper); }
.pg-ctacard p { color: var(--text-on-ink-2) !important; }
.pg-ctacard .pg-ctacard_h { margin: 0 0 8px !important; font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--paper) !important; }
.pg-ctacard .pg-cta { margin-top: 18px; }
.pg-ctacard .btn_primary { background: var(--paper); color: var(--ink); }
.pg-ctacard .btn_primary .btn_text { color: var(--ink); }
.pg-ctacard .btn_secondary { color: var(--paper) !important; }

/* FAQ */
.pg-faq { border-top: 1px solid var(--hair-on-paper); }
.pg-faq details { border-bottom: 1px solid var(--hair-on-paper); }
.pg-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 0; font-size: 17px; line-height: 1.35; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: "+"; flex: 0 0 auto; font-size: 22px; font-weight: 400; }
.pg-faq details[open] summary::after { content: "\2212"; }
.pg-faq .pg-faq_a { max-width: 70ch; padding: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--text-on-paper-2); }
.pg-faq .pg-faq_a p + p { margin-top: 10px !important; }
.pg-faq .pg-faq_a a { color: var(--hl-on-paper); text-decoration: underline; }

/* Tour embed: a poster until tapped, so it never traps a scrolling thumb */
.pg-tour { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; border: 0; border-radius: var(--r-card); background: #0b1326; cursor: pointer; }
.pg-tour img { width: 100%; height: 100%; object-fit: cover; }
.pg-tour iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pg-tour_play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 18px; border-radius: var(--r-pill); background: rgba(26, 26, 46, 0.82); color: var(--paper); font-size: 15px; font-weight: 600; white-space: nowrap; }

/* Card grid (hubs) */
.pg-h2 { max-width: 26ch; margin-bottom: 18px !important; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.pg-lead { max-width: 64ch; margin-bottom: 20px !important; font-size: 17px; line-height: 1.6; color: var(--text-on-paper-2); }
.pg-cards { display: grid; gap: 12px; padding: 0; list-style: none; }
.pg-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--hair-on-paper); border-radius: var(--r-card); background: var(--white); color: var(--ink); text-decoration: none; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
a.pg-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.pg-card_k { font-size: 12px; font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--text-on-paper-3); }
.pg-card_h { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.pg-card_d { font-size: 15px; line-height: 1.5; color: var(--text-on-paper-2); }
.pg-card_go { margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 600; color: var(--hl-on-paper); }
.pg-tag { display: inline-flex; align-self: flex-start; padding: 3px 9px; border-radius: var(--r-pill); background: var(--coral-100); color: var(--coral-900); font-size: 12px; font-weight: 600; }
.pg-tag.is--muted { background: rgba(var(--ink-rgb), 0.07); color: var(--ink); }

/* Facts list (guide pages) */
.pg-facts { display: grid; gap: 0; padding: 0 !important; list-style: none !important; border-top: 1px solid var(--hair-on-paper); }
.pg-facts li { display: grid; gap: 2px; margin: 0 !important; padding: 12px 0 !important; border-bottom: 1px solid var(--hair-on-paper); }
.pg-facts b { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-on-paper-3); }
.pg-facts span { font-size: 16px; color: var(--ink); }
.pg-src { font-size: 13px !important; line-height: 1.5 !important; color: var(--text-on-paper-3) !important; }
.pg-src a { color: var(--text-on-paper-2) !important; }

/* "Every guide" on /research: topic groups of plain links */
.pg-index { display: grid; gap: 28px; }
.pg-index_h { margin-bottom: 8px !important; font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--text-on-paper-3); }
.pg-index ul { padding: 0; list-style: none; }
.pg-index li a { display: block; padding: 7px 0; border-top: 1px solid var(--hair-on-paper); font-size: 15px; line-height: 1.4; color: var(--ink); text-decoration: none; }
.pg-index li a:hover { text-decoration: underline; }

@media screen and (min-width: 768px) {
  .pg-h1 { font-size: 46px; }
  .pg-cta { flex-direction: row; align-items: center; gap: 24px; }
  .pg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-facts li { grid-template-columns: 200px 1fr; gap: 16px; }
  .pg-ctacard { padding: 32px; }
  .pg-index { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}
@media screen and (min-width: 992px) {
  .pg-hero { padding-top: 28px; }
  .pg-h1 { font-size: 54px; }
  .pg-article { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 40px; }
  .pg-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; border: 0; background: none; }
  .pg-toc summary { pointer-events: none; min-height: 0; padding: 0 0 10px; font-size: 12px; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--text-on-paper-3); }
  .pg-toc summary::after, .pg-toc[open] summary::after { content: none; }
  .pg-toc ol { padding: 0; border-left: 1px solid var(--hair-on-paper); }
  .pg-toc li a { padding: 6px 0 6px 14px; border-top: 0; font-size: 13px; }
  .pg-cards.is--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-h2 { font-size: 32px; }
  .pg-prose h2 { font-size: 30px; }
}
