/* ==========================================================================
   Promptly Found: document surface layer (step 3b)
   Loads on guides, research reports and platform profiles (ArticleLayout and
   PlatformLayout) after site-lead.css. Every rule is scoped to html.pfm.pfl.
   The copy and the markup do not change.

     Night   the heading band
     Sheet   the first figure (.pf-figstrip) crosses the band edge, raised.
             Where a page has no figure, "In short" (.pf-answer) crosses.
             Research reports that open with plain text: nothing crosses.
             At a glance, charts and takeaways rest on the paper.
     Console platform facts (.pf-spec) and code blocks
     List    the evidence, tables and callouts: flat, a rule on top
     Desk    Questions, Notes, About this page and the follow links

   The crossing applies from 1001px. Below that width the one-column layout
   stays, with the surfaces.
   ========================================================================== */

/* ---- Console tokens --------------------------------------------------------- */
.pfm.pfl .pf-spec,
.pfm.pfl .pf-prose .pf-code {
  --paper: var(--pfl-console); --panel: #222226; --ink: #edebe6; --ink-2: #b5b3ad; --ink-3: #918f8a;
  --line: var(--pfl-console-line); --accent: #e58a9a; --focus: #8eb0ff;
  --sec-platforms: #86d1c9; --sec-crawlers: #e9b56c; --sec-ai-search: #9db7ee; --sec-llms: #d9a6cf; --sec-measurement: #a9d18f; --sec-geo: #e58a9a;
  color: var(--ink);
}
/* purpose labels inside a console: a quiet dark chip, the dot keeps the purpose colour */
.pfm.pfl :is(.pf-spec, .pf-prose .pf-code) .pf-purpose { background: rgb(255 255 255 / .08); color: var(--ink); }

/* ---- Sheets: the crossing objects and the resting objects ----------------- */
.pfm.pfl .pf-ahead + .pf-figstrip,
.pfm.pfl .pf-ahead + .pf-doc > .pf-doc__main > .pf-answer:first-child {
  position: relative; z-index: 1; padding: 32px 36px; border: 0; border-radius: 20px;
  background: var(--pfl-sheet); box-shadow: var(--pfl-raised);
}
.pfm.pfl .pf-ahead + .pf-figstrip { max-width: none; }
.pfm.pfl :is(.pf-glance, .pf-chart, .pf-takeaways ol, .pf-takeaways ul) { border: 0; border-radius: 16px; background: var(--pfl-sheet); box-shadow: var(--pfl-rest); }

/* ---- Consoles: platform facts and code ------------------------------------- */
.pfm.pfl .pf-spec { padding: 28px 32px 22px; border-radius: 20px; background: var(--pfl-console); box-shadow: var(--pfl-console-lift); }
.pfm.pfl .pf-spec dl { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.pfm.pfl .pf-spec dt { padding-left: 0; color: var(--ink-3); }
.pfm.pfl .pf-spec dd { padding-right: 0; color: var(--ink); }
.pfm.pfl .pf-spec :is(dt, dd) { border-bottom-color: var(--line); }
.pfm.pfl .pf-spec a { color: var(--ink); }
.pfm.pfl .pf-spec .pf-tag { background: rgb(255 255 255 / .08); color: var(--ink-2); }
.pfm.pfl .pf-spec__foot { color: var(--ink-3); }
.pfm.pfl .pf-prose .pf-code { border-radius: 16px; background: var(--pfl-console); box-shadow: var(--pfl-console-lift); }
.pfm.pfl .pf-prose .pf-code__copy:hover { background: rgb(255 255 255 / .08); }

/* ---- Flat lists: evidence, tables, callouts --------------------------------- */
.pfm.pfl :is(.pf-claim, .pf-claim:first-of-type, .pf-claim:last-of-type, .pf-claim:only-of-type) { padding-inline: 0; border: 0; border-radius: 0; }
.pfm.pfl .pf-claim { border-top: 1px solid var(--line); }
.pfm.pfl .pf-claim:first-of-type { border-top: 1px solid var(--ink); }
.pfm.pfl .pf-claim:last-of-type { border-bottom: 1px solid var(--line); }
.pfm.pfl .pf-table { border: 0; border-top: 1px solid var(--ink); border-radius: 0; }
.pfm.pfl .pf-table :is(thead th, td, tbody th):first-child { padding-left: 0; }
.pfm.pfl .pf-table :is(thead th, td, tbody th):last-child { padding-right: 0; }
.pfm.pfl .pf-table caption { padding-inline: 0; }
.pfm.pfl .pf-callout { padding: 20px 0 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--ink); }

/* ---- The desk closes the page: Questions, Notes, About this page, follow ---- */
.pfm.pfl .pf-doc__main > .pf-gap-l:has(> :is(.pf-faq, .pf-notes)),
.pfm.pfl .pf-doc__main > .pf-gap-l:has(> :is(.pf-faq, .pf-notes)) ~ .pf-gap-l,
.pfm.pfl .pf-doc + .pf-gap-l:has(> .pf-follow) {
  position: relative; isolation: isolate; margin-top: 0; padding-top: 72px;
  --line: #e2e0da;
}
.pfm.pfl .pf-doc__main > .pf-gap-l:has(> :is(.pf-faq, .pf-notes))::before,
.pfm.pfl .pf-doc__main > .pf-gap-l:has(> :is(.pf-faq, .pf-notes)) ~ .pf-gap-l::before,
.pfm.pfl .pf-doc + .pf-gap-l:has(> .pf-follow)::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: var(--pfl-desk); box-shadow: 0 0 0 100vmax var(--pfl-desk); clip-path: inset(0 -100vmax);
}
/* the first desk block keeps the space above it, on the paper */
.pfm.pfl .pf-doc__main > .pf-gap-l:not(:has(> :is(.pf-faq, .pf-notes))) + .pf-gap-l:has(> :is(.pf-faq, .pf-notes)),
.pfm.pfl .pf-doc__main > .pf-body + .pf-gap-l:has(> :is(.pf-faq, .pf-notes)) { margin-top: 88px; }
.pfm.pfl .pf-doc + .pf-gap-l:has(> .pf-follow) { padding-bottom: 96px; }
.pfm.pfl .pf-wrap:has(> .pf-doc + .pf-gap-l > .pf-follow) { padding-bottom: 0; }
/* on the desk the panels become flat lists */
.pfm.pfl :is(.pf-faq details, .pf-faq details:first-of-type, .pf-faq details:last-of-type, .pf-faq details:only-of-type) { padding-inline: 0; border-inline: 0; border-radius: 0; }
.pfm.pfl .pf-faq details:first-of-type { border-top: 1px solid var(--ink); }
.pfm.pfl .pf-about { border: 0; border-top: 1px solid var(--ink); border-radius: 0; }
.pfm.pfl .pf-about .pf-fold { padding-inline: 0; }
.pfm.pfl .pf-follow { border-top-color: var(--line); }

@media (min-width: 1001px) {
  /* the band runs on below the byline, and the first sheet crosses its edge */
  .pfm.pfl { --pfl-cross: 96px; }
  .pfm.pfl .pf-ahead:has(+ .pf-figstrip),
  .pfm.pfl .pf-ahead:has(+ .pf-doc > .pf-doc__main > .pf-answer:first-child) { padding-bottom: calc(64px + var(--pfl-cross)); }
  .pfm.pfl .pf-ahead + .pf-figstrip,
  .pfm.pfl .pf-ahead + .pf-doc > .pf-doc__main > .pf-answer:first-child { margin-top: calc(var(--pfl-cross) * -1); }
  .pfm.pfl .pf-ahead + .pf-figstrip { padding: 36px 44px; }
  .pfm.pfl .pf-ahead + .pf-doc > .pf-doc__main > .pf-answer:first-child { max-width: none; padding: 36px 44px 40px; }
  .pfm.pfl .pf-ahead + .pf-doc:has(> .pf-doc__main > .pf-answer:first-child) { margin-top: 0; }
  .pfm.pfl .pf-ahead + .pf-doc:has(> .pf-doc__main > .pf-answer:first-child) > .pf-doc__rail { padding-top: 48px; }
  .pfm.pfl .pf-ahead + .pf-figstrip + .pf-doc { margin-top: 72px; }
}
