/* ==========================================================================
   Promptly Found: section hub surface layer (step 3a)
   Loads on the hub pages (HubLayout) after site-lead.css. Every rule is scoped
   to html.pfm.pfl. The copy and the markup do not change.

     Night   the hub top band
     Sheet   "Start with" (or the latest report on /research): raised, and it
             crosses the bottom edge of the night band
     List    the document groups and "In this section": flat, ruled
     Console the bot matrix and the data code block (/crawlers)
     Desk    reading paths and the latest news close the page

   The crossing, the sticky group headings and the 5/7 splits apply from
   1001px. Below that width the one-column layout stays, with the surfaces.
   ========================================================================== */

/* ---- Console tokens: the dark theme inside a console on paper ------------ */
.pfm.pfl .pf-mx table,
.pfm.pfl .pf-data .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-ai-search: #9db7ee; --sec-llms: #d9a6cf; --sec-platforms: #86d1c9; --sec-crawlers: #e9b56c; --sec-geo: #e58a9a;
  color: var(--ink);
}

/* ---- Bots by operator and job: a console --------------------------------- */
.pfm.pfl .pf-mx table { max-width: none; border: 0; border-radius: 20px; background: var(--pfl-console); box-shadow: var(--pfl-console-lift); }
.pfm.pfl .pf-mx thead th { color: var(--ink-3); border-bottom-color: var(--line); }
.pfm.pfl .pf-mx :is(th, td) { border-bottom-color: var(--line); }
.pfm.pfl .pf-mx tbody th { color: var(--ink); }
.pfm.pfl .pf-mx a { color: var(--ink); }
.pfm.pfl .pf-mx a:hover code { color: var(--c, var(--accent)); }

/* ---- Download the data: the code block is a console on paper -------------- */
.pfm.pfl .pf-data { padding: 0; border-radius: 0; background: none; }
.pfm.pfl .pf-data .pf-code { border-radius: 20px; background: var(--pfl-console); box-shadow: var(--pfl-console-lift); }
.pfm.pfl .pf-data .pf-code__bar { color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.pfm.pfl .pf-data .pf-code pre { padding-top: 16px; color: var(--ink); }

/* ---- Start with / latest report: a white sheet --------------------------- */
.pfm.pfl .pf-start,
.pfm.pfl .pf-leadrep { position: relative; z-index: 1; border: 0; border-radius: 20px; background: var(--pfl-sheet); box-shadow: var(--pfl-raised); }
.pfm.pfl .pf-start { padding: 32px 28px; }
.pfm.pfl .pf-start ul { border: 0; border-radius: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: visible; }
.pfm.pfl .pf-start a { padding-inline: 0; }
.pfm.pfl .pf-start a:hover { background: none; color: var(--accent); }
.pfm.pfl .pf-leadrep:hover { background: var(--pfl-sheet); }
.pfm.pfl .pf-leadrep:hover b { color: var(--accent); }

/* ---- Document groups: flat lists ------------------------------------------ */
.pfm.pfl .pf-grp > div:last-child { border: 0; border-radius: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); overflow: visible; }
.pfm.pfl .pf-grp .pf-lrow { padding-inline: 0; }
.pfm.pfl .pf-grp .pf-lrow:hover { background: none; }
.pfm.pfl .pf-grp .pf-lrow:hover h3 { color: var(--accent); }

/* ---- Reading paths and latest news: the desk closes the page -------------- */
.pfm.pfl .pf-block:has(> :is(.pf-pcards, .pf-newsbox)) { position: relative; isolation: isolate; padding-block: 96px; }
.pfm.pfl .pf-block:has(> :is(.pf-pcards, .pf-newsbox))::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-block: 0; left: calc(50% - 50vw); width: 100vw; background: var(--pfl-desk);
}
/* two desk blocks in a row read as one surface */
.pfm.pfl .pf-block:has(> :is(.pf-pcards, .pf-newsbox)) + .pf-block:has(> :is(.pf-pcards, .pf-newsbox)) { margin-top: 0; padding-top: 0; }
.pfm.pfl .pf-wrap:has(> .pf-block:last-child > :is(.pf-pcards, .pf-newsbox)) { padding-bottom: 0; }
.pfm.pfl .pf-block:has(> :is(.pf-pcards, .pf-newsbox)) { --line: #e2e0da; }
.pfm.pfl .pf-pcards .pf-entries { border: 0; background: var(--pfl-sheet); box-shadow: var(--pfl-rest); }
.pfm.pfl .pf-pcards .pf-entry { display: flex; flex-direction: column; padding: 34px 36px 30px; }
.pfm.pfl .pf-pcards .pf-entry:hover { background: color-mix(in srgb, var(--pfl-desk) 55%, var(--pfl-sheet)); }
.pfm.pfl .pf-pcards .pf-entry__title { font-size: 26px; line-height: 32px; letter-spacing: -.016em; }
.pfm.pfl .pf-pcards .pf-kicker { order: 9; margin: auto 0 0; padding-top: 22px; }
.pfm.pfl .pf-newsbox ol { border-top-color: var(--ink); }

@media (min-width: 1001px) {
  /* the night band runs on below the counts, and the first sheet crosses its edge */
  .pfm.pfl { --pfl-cross: 112px; }
  .pfm.pfl .pf-hubtop:has(+ :is(.pf-start, .pf-leadrep)) { padding-bottom: calc(64px + var(--pfl-cross)); }
  .pfm.pfl .pf-hubtop + :is(.pf-start, .pf-leadrep) { margin-top: calc(var(--pfl-cross) * -1); }
  .pfm.pfl .pf-start { padding: 44px 56px 48px; }
  .pfm.pfl .pf-start h2 { font-size: 48px; line-height: 52px; }

  /* group headings stay in view while their list scrolls */
  .pfm.pfl .pf-grp > div:first-child { position: sticky; top: var(--pfl-rail-top); }

  /* latest news: heading on the left, the posts as a flat list on the right */
  .pfm.pfl .pf-newsbox { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 96px; align-items: start; }
  .pfm.pfl .pf-newsbox h2 { grid-column: 1; grid-row: 1 / span 2; margin: 0; font: 400 56px/58px var(--font-sans); letter-spacing: -.028em; font-variation-settings: "wdth" 90; }
  .pfm.pfl .pf-newsbox > :not(h2) { grid-column: 2; }
}

/* ---- Bot matrix: full width, names on one line, tokens as hollow dots ---- */
.pfm.pfl .pf-mx, .pfm.pfl .pf-mx table { max-width: none; }
.pfm.pfl .pf-mx table { width: 100%; }
.pfm.pfl .pf-mx__bot code { white-space: nowrap; }
.pfm.pfl .pf-mx__bot.pf-bot--token i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }

/* ---- Pillar hubs (a hub with `headline`): lede, guide cards, tools, questions ---- */
.pfm.pfl .pf-shead__lede { max-width: 46em; margin: 18px 0 0; font: 400 19px/29px var(--font-sans); color: color-mix(in srgb, var(--ink) 82%, transparent); text-wrap: pretty; }
.pfm.pfl .pf-guides { position: relative; z-index: 1; border-radius: 20px; background: var(--pfl-sheet); box-shadow: var(--pfl-raised); padding: 28px 24px 24px; }
.pfm.pfl .pf-guides h2 { margin: 0 0 18px; font: 400 28px/34px var(--font-sans); letter-spacing: -.02em; }
.pfm.pfl .pf-guides ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pfm.pfl .pf-guides a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.pfm.pfl .pf-guides a:hover { border-color: var(--ink); background: color-mix(in srgb, var(--pfl-desk) 40%, var(--pfl-sheet)); }
.pfm.pfl .pf-guides__title { font: 500 18px/24px var(--font-sans); letter-spacing: -.01em; }
.pfm.pfl .pf-guides__desc { font: 400 14px/21px var(--font-sans); color: var(--ink-2); }
.pfm.pfl .pf-guides__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font: 500 14px/20px var(--font-sans); color: var(--accent); }
.pfm.pfl .pf-guides__more .pf-icon { width: 16px; height: 16px; transition: transform .15s ease; }
.pfm.pfl .pf-guides a:hover .pf-guides__more .pf-icon { transform: translateX(3px); }
.pfm.pfl .pf-hubtools { display: grid; gap: 20px; }
.pfm.pfl .pf-hubtools h2 { margin: 0; font: 400 32px/38px var(--font-sans); letter-spacing: -.022em; }
.pfm.pfl .pf-hubtools > div p { margin: 8px 0 0; color: var(--ink-2); }
.pfm.pfl .pf-hubtools ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pfm.pfl .pf-hubtools a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; border-radius: 14px; background: var(--ink); color: var(--paper); text-decoration: none; }
.pfm.pfl .pf-hubtools a b { font: 500 17px/23px var(--font-sans); }
.pfm.pfl .pf-hubtools a span { font: 400 14px/20px var(--font-sans); color: color-mix(in srgb, var(--paper) 78%, transparent); }
.pfm.pfl .pf-hubtools .pf-hubtools__go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-weight: 500; color: var(--paper); }
.pfm.pfl .pf-hubtools__go .pf-icon { width: 16px; height: 16px; }
.pfm.pfl .pf-hubtools a:hover { background: var(--accent); }
@media (min-width: 1001px) {
  .pfm.pfl .pf-hubtop:has(+ .pf-guides) { padding-bottom: calc(64px + var(--pfl-cross)); }
  .pfm.pfl .pf-hubtop + .pf-guides { margin-top: calc(var(--pfl-cross) * -1); }
  .pfm.pfl .pf-guides { padding: 40px 48px 44px; }
  .pfm.pfl .pf-guides h2 { font-size: 36px; line-height: 42px; }
  .pfm.pfl .pf-hubtools { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; align-items: start; }
}

/* Pillar hub body: contents on the left, text in the middle, tools on the right (all three stay in view). */
.pfm.pfl .pf-pillar__toc h2, .pfm.pfl .pf-pillar__card h2 { margin: 0 0 10px; font: 600 13px/18px var(--font-sans); color: var(--ink-3); }
.pfm.pfl .pf-pillar__toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.pfm.pfl .pf-pillar__toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font: 400 14px/20px var(--font-sans); color: var(--ink-2); text-decoration: none; }
.pfm.pfl .pf-pillar__toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.pfm.pfl .pf-pillar__rail { display: grid; gap: 16px; align-content: start; }
.pfm.pfl .pf-pillar__card { padding: 22px 22px 20px; border-radius: 16px; background: var(--pfl-sheet); box-shadow: var(--pfl-rest); }
.pfm.pfl .pf-pillar__card > p { margin: 0 0 14px; font: 400 14px/20px var(--font-sans); color: var(--ink-2); }
.pfm.pfl .pf-pillar__card ul { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.pfm.pfl .pf-pillar__card ul a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); text-decoration: none; }
.pfm.pfl .pf-pillar__card ul a:hover { background: var(--accent); }
.pfm.pfl .pf-pillar__card ul b { font: 500 15px/20px var(--font-sans); }
.pfm.pfl .pf-pillar__card ul span { font: 400 13px/18px var(--font-sans); color: color-mix(in srgb, var(--paper) 78%, transparent); }
.pfm.pfl .pf-pillar__card--quiet { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.pfm.pfl .pf-pillar__card--quiet h2 { color: var(--ink); font-size: 16px; line-height: 22px; font-weight: 500; }
.pfm.pfl .pf-pillar__all { font: 500 14px/20px var(--font-sans); color: var(--accent); }
@media (max-width: 1179px) {
  .pfm.pfl .pf-pillar__toc { margin-bottom: 32px; }
  .pfm.pfl .pf-pillar__rail { display: none; }
}
@media (min-width: 1180px) {
  .pfm.pfl .pf-pillar { display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; column-gap: 56px; align-items: start; max-width: none; }
  .pfm.pfl .pf-pillar__body { max-width: 720px; }
  .pfm.pfl .pf-pillar__toc, .pfm.pfl .pf-pillar__rail { position: sticky; top: var(--pfl-rail-top, 96px); }
  .pfm.pfl .pf-hubtools--narrow { display: none; }
}
