/* ==========================================================================
   Promptly Found: homepage surface layer
   Load after home-modern.css. Every rule is scoped to html.pfm.pfl. The class
   pfl is set on <html> in BaseLayout. The copy does not change.

   Three kinds of object, and each one has its own height:
     Console (dark, raised)  an instrument: the answer figure, the tools,
                             the crawler table.
     Sheet (white, resting)  a document: findings, the lead article, paths.
     List (flat, ruled)      an index: news, chapters, the evidence scale.
   Three surfaces carry them: night (the hero), desk (warm grey), paper.
   The structure rules apply from 1001px. Below that width the current
   one-column layout stays, with the new surfaces.
   ========================================================================== */

.pfl-stage { display: none; }

.pfm.pfl .pf-block { margin-top: var(--pfl-band); }

/* ---- Hero: the answer figure is a console -------------------------------- */
.pfm.pfl .pf-anatomy__src { border-bottom-color: transparent; }
.pfm.pfl .pf-anatomy__src:not(.pf-anatomy__src--no) {
  margin: 0 -14px 6px; padding-inline: 14px; border-radius: 8px;
  background: rgb(255 255 255 / .07);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 12px 20px -12px rgb(0 0 0 / .8);
}
/* The dim goes on the contents, so the build sequence (home-depth.css) still controls the opacity of the row. */
.pfm.pfl .pf-anatomy__src--no > * { opacity: .6; }
/* on narrow screens the figure has less room at its edges than the 14px the tiles reach out, so they stay inside */
@media (max-width: 1000px) {
  .pfm.pfl .pf-anatomy__src:not(.pf-anatomy__src--no) { margin-inline: 0; padding-inline: 12px; }
}

@media (min-width: 1001px) {
  /* the night band stops half way down the console (home-lead.js measures it) */
  .pfm.pfl .pf-home-hero::before {
    background: linear-gradient(180deg, var(--pfl-night) var(--pfl-split, 100%), var(--pfl-desk) var(--pfl-split, 100%));
  }
  .pfm.pfl .pf-anatomy {
    grid-row: 4; margin: 84px 0 0;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.05fr) minmax(0, 1.3fr);
    grid-template-rows: auto 1fr;
    border: 0; border-radius: 20px; background: var(--pfl-console); box-shadow: var(--pfl-console-lift);
  }
  .pfm.pfl .pf-anatomy__q {
    grid-column: 1 / -1; grid-row: 1; padding: 36px 44px 38px;
    border-left: 0; border-bottom: 1px solid var(--pfl-console-line);
    font-size: 38px; line-height: 46px; letter-spacing: -.024em;
    min-height: 0 !important; /* the site script locks a height that it measured in the old layout */
  }
  .pfm.pfl .pf-anatomy__cols > div { grid-row: 2; padding: 32px 44px 52px; border-left: 0; }
  .pfm.pfl .pf-anatomy__cols > div:first-child { grid-column: 1; }
  .pfm.pfl .pf-anatomy__cols > div:last-child { grid-column: 2; border-left: 1px solid var(--pfl-console-line); }
  .pfm.pfl .pf-anatomy__sub { border-bottom-color: var(--pfl-console-line); }
  /* the answer is a white sheet that stands out of the console */
  .pfm.pfl .pf-anatomy__ans {
    --ink: #18181b; --ink-2: #4f4f57; --ink-3: #6b6b73; --paper: #ffffff; --accent: #8a1c2f;
    grid-column: 3; grid-row: 2; align-self: start; margin: -24px -28px 40px 4px; padding: 34px 40px 44px;
    border: 0; border-radius: 16px; background: var(--pfl-sheet); color: var(--ink);
    box-shadow: 0 0 0 1px rgb(var(--pfl-shade) / .08), 0 30px 50px -24px rgb(0 0 0 / .6), 0 70px 110px -60px rgb(0 0 0 / .55);
    font-size: 30px; line-height: 40px; letter-spacing: -.018em;
  }
  .pfm.pfl .pf-anatomy__ans .pf-anatomy__step { margin-bottom: 22px; }
  /* the counts and the evidence marks follow the console, on the desk */
  .pfm.pfl .pf-hero__proof { grid-row: 5; margin: 132px 0 0; }
  .pfm.pfl .pf-hero__scale { grid-row: 6; margin: 40px 0 0; padding: 0; border-top: 0; }
  .pfm.pfl .pf-home-hero[data-pfl-split] :is(.pf-hero__proof, .pf-hero__scale) {
    --ink: #18181b; --ink-2: #4f4f57; --ink-3: #6b6b73; --paper: #f5f4f0; --line: #e5e4df; --mark-tile: #ffffff;
    color: var(--ink);
  }
}

/* ---- Findings: sheets on the desk, and the lead finding is raised --------- */
.pfm.pfl section[aria-labelledby="findings"] { position: relative; isolation: isolate; margin-top: 0; padding-top: 128px; }
.pfm.pfl section[aria-labelledby="findings"]::before,
.pfm.pfl section[aria-labelledby="tools"]::before,
.pfm.pfl .pf-block:has(> :is(.pf-pcards, .pf-standard))::before {
  content: ""; display: block; position: absolute; z-index: -1; pointer-events: none;
  inset-block: 0; left: calc(50% - 50vw); width: 100vw; background: var(--pfl-desk); box-shadow: none;
}
.pfm.pfl .pf-findings-home {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  border: 0; border-radius: 0; overflow: visible;
}
.pfm.pfl .pf-findings-home a {
  padding: 36px 40px 32px; border-radius: var(--pfm-r); background: var(--pfl-sheet);
  box-shadow: var(--pfl-rest);
  transition: translate .45s var(--pfl-ease), box-shadow .45s var(--pfl-ease);
}
.pfm.pfl .pf-findings-home a + a { border-left: 0; }
.pfm.pfl .pf-findings-home a:hover { background: var(--pfl-sheet); translate: 0 -3px; box-shadow: var(--pfl-raised); }
.pfm.pfl .pf-findings-home a:first-child {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto 1fr; column-gap: 80px; align-items: start;
  padding: 56px 64px 52px; box-shadow: var(--pfl-raised);
}
.pfm.pfl .pf-findings-home a:first-child .pf-findings-home__num {
  grid-column: 1; grid-row: 1 / -1; align-self: center;
  font-size: clamp(120px, 14.5vw, 232px); line-height: .84; font-weight: 300; letter-spacing: -.055em;
  font-variation-settings: "wdth" 78;
}
.pfm.pfl .pf-findings-home a:first-child .pfm-share { grid-column: 2; height: 28px; margin: 10px 0 50px; }
.pfm.pfl .pf-findings-home a:first-child .pf-findings-home__label {
  grid-column: 2; max-width: 20em; margin-bottom: 36px;
  font: 300 30px/38px var(--font-sans); letter-spacing: -.018em; font-variation-settings: "wdth" 92;
}
.pfm.pfl .pf-findings-home a:first-child .pf-findings-home__title { grid-column: 2; align-self: end; font-size: 17px; line-height: 24px; }
/* the bar is a measure: a tick at each 10% under the track */
.pfm.pfl .pf-findings-home .pfm-share { position: relative; overflow: visible; margin-bottom: 34px; }
.pfm.pfl .pf-findings-home .pfm-share::before { border-radius: 3px 0 0 3px; }
.pfm.pfl .pf-findings-home .pfm-share::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 6px); height: 8px;
  background:
    linear-gradient(var(--ink-3), var(--ink-3)) 100% 0 / 1px 100% no-repeat,
    repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 10%);
  opacity: .55;
}

/* ---- Tools: a console on the desk ---------------------------------------- */
.pfm.pfl section[aria-labelledby="tools"] { position: relative; isolation: isolate; margin-top: 0; padding-block: var(--pfl-band); }
.pfm.pfl section[aria-labelledby="tools"] .pf-entries {
  --ink: #edebe6; --ink-2: #b5b3ad; --ink-3: #918f8a; --line: var(--pfl-console-line);
  border: 0; border-radius: 20px; background: var(--pfl-console); color: var(--ink); box-shadow: var(--pfl-console-lift);
}
.pfm.pfl section[aria-labelledby="tools"] .pf-entry { padding: 38px 44px; color: var(--ink); }
.pfm.pfl section[aria-labelledby="tools"] .pf-entry:hover { background: rgb(255 255 255 / .045); }
.pfm.pfl section[aria-labelledby="tools"] .pf-entry__title { font-size: 26px; line-height: 32px; letter-spacing: -.016em; color: var(--ink); }
.pfm.pfl section[aria-labelledby="tools"] .pf-entry__desc { color: var(--ink-2); }

/* ---- Six sections: a list on the left, the chosen section on a stage ------ */
@media (min-width: 1001px) {
  .pfm.pfl section[aria-labelledby="sections"]:has(.pfl-stage) {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 32px; align-items: stretch;
  }
  .pfm.pfl section[aria-labelledby="sections"]:has(.pfl-stage) .pf-bhead { grid-column: 1 / -1; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; row-gap: 4px; max-width: none; border: 0; border-radius: 0; overflow: visible; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section {
    grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 24px; align-content: center; min-height: 88px; padding: 0 28px 0 24px;
    border-radius: 14px; transition: background-color .3s;
  }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section + .pf-section { border-top: 0; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section:hover { background: none; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section.pfl-on { background: var(--t); }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section h3 { font-size: 36px; line-height: 40px; letter-spacing: -.024em; transition: color .3s; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section.pfl-on h3 { color: var(--h); }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section p { display: none; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section__count { grid-column: 3; display: block; color: var(--ink-3); }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section.pfl-on .pf-section__count { color: var(--h); }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section__count::before { display: none; }

  .pfm.pfl .pfl-stage {
    position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 548px; padding: 56px 64px 44px;
    border-radius: 20px; background: var(--t);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--h) 16%, transparent), 0 36px 60px -36px color-mix(in srgb, var(--h) 55%, transparent);
    transition: background-color .35s, box-shadow .35s;
  }
  .pfm.pfl .pfl-stage > svg {
    position: absolute; right: -56px; top: -64px; width: 340px; height: 340px; pointer-events: none;
    color: var(--h); fill: none; stroke: currentColor; stroke-width: .5; opacity: .3;
  }
  .pfm.pfl .pfl-stage__name {
    position: relative; margin: 0; color: var(--h);
    font: 300 104px/.92 var(--font-sans); letter-spacing: -.05em; font-variation-settings: "wdth" 80;
  }
  .pfm.pfl .pfl-stage__desc { position: relative; max-width: 19em; margin: 28px 0 0; font: 300 28px/38px var(--font-sans); letter-spacing: -.016em; color: var(--ink); }
  .pfm.pfl .pfl-stage__count { position: relative; margin: 18px 0 40px; font: 400 15px/22px var(--font-sans); color: var(--h); }
  .pfm.pfl .pfl-stage__links { position: relative; list-style: none; margin: auto 0 0; padding: 0; border-top: 1px solid color-mix(in srgb, var(--h) 34%, transparent); }
  .pfm.pfl .pfl-stage__links a {
    display: block; padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, var(--h) 18%, transparent);
    font: 400 20px/28px var(--font-sans); color: var(--ink); text-decoration: none;
  }
  .pfm.pfl .pfl-stage__links li:last-child a { border-bottom: 0; }
  .pfm.pfl .pfl-stage__links a:hover { color: var(--h); }
}
@media (max-width: 1000px) {
  .pfm.pfl .pf-sections { border: 0; border-top: 1px solid var(--ink); border-radius: 0; overflow: visible; }
  .pfm.pfl .pf-sections .pf-section { padding: 22px 0; }
  .pfm.pfl .pf-sections .pf-section:hover { background: none; }
}

/* ---- Recently reviewed: one raised sheet, and a flat list beside it ------ */
.pfm.pfl .pf-lead { gap: 72px; align-items: start; }
.pfm.pfl .pf-lead__main {
  padding: 48px; border: 0; background: var(--pfl-sheet); box-shadow: var(--pfl-raised);
  transition: translate .45s var(--pfl-ease);
}
.pfm.pfl .pf-lead__main:hover { background: var(--pfl-sheet); translate: 0 -3px; }
.pfm.pfl .pf-lead__side { grid-auto-rows: auto; border: 0; border-top: 1px solid var(--ink); border-radius: 0; overflow: visible; }
.pfm.pfl .pf-lead__side a { padding: 28px 0; }
.pfm.pfl .pf-lead__side a:hover { background: none; }
.pfm.pfl .pf-lead__side h3 { margin-top: 0; font-size: 24px; line-height: 30px; }
/* the section and type line reads after the title, not above it */
.pfm.pfl .pf-lead__main .pf-kicker { order: 9; margin: 6px 0 0; }
.pfm.pfl .pf-lead__side a > div:last-child { display: flex; flex-direction: column; }
.pfm.pfl .pf-lead__side .pf-kicker { order: 9; margin: 12px 0 0; }

/* ---- News and the reading path: a rail heading and a flat list ------------ */
.pfm.pfl .pf-homenews { border: 0; border-top: 1px solid var(--ink); border-radius: 0; overflow: visible; }
.pfm.pfl .pf-homenews a { grid-template-columns: 190px minmax(0, 1fr); padding: 22px 0; }
.pfm.pfl .pf-homenews a:hover { background: none; }
.pfm.pfl .pf-homenews a:hover .pf-homenews__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pfm.pfl .pf-homenews__title { font-size: 21px; line-height: 29px; letter-spacing: -.008em; }
.pfm.pfl .pf-steps3 { border: 0; border-top: 1px solid var(--ink); border-radius: 0; overflow: visible; }
.pfm.pfl .pf-steps3 .pf-entry { padding: 28px 0; }
.pfm.pfl .pf-steps3 .pf-entry:hover { background: none; }
.pfm.pfl .pf-steps3 .pf-entry__title { font-size: 24px; line-height: 30px; letter-spacing: -.014em; }
@media (min-width: 1001px) {
  .pfm.pfl :is(section[aria-labelledby="news"], section[aria-labelledby="start"]) {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 96px; align-items: start;
  }
  .pfm.pfl :is(section[aria-labelledby="news"], section[aria-labelledby="start"]) .pf-bhead { grid-column: 1; grid-row: 1 / span 3; display: block; margin: 0; }
  .pfm.pfl :is(section[aria-labelledby="news"], section[aria-labelledby="start"]) .pf-bhead .pf-more { display: inline-block; margin-top: 28px; }
  .pfm.pfl section[aria-labelledby="start"] > :not(.pf-bhead) { grid-column: 2; }
  .pfm.pfl .pf-steps3 { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .pfm.pfl .pf-steps3 .pf-entry + .pf-entry { border-left: 0; border-top: 1px solid var(--line); }
  /* a heading in a left rail holds while its list scrolls */
  .pfm.pfl :is(section[aria-labelledby="tools"], section[aria-labelledby="news"], section[aria-labelledby="start"]) .pf-bhead,
  .pfm.pfl .pf-standard > div:first-child { position: sticky; top: var(--pfl-rail-top); }
}

/* ---- Crawlers: a console on paper, with column heads that stay in view ---- */
@media (min-width: 1001px) {
  .pfm.pfl section[aria-labelledby="bots"] {
    margin-inline: -24px; padding: 72px 56px 64px; border-radius: 24px;
    background: var(--pfl-console); box-shadow: var(--pfl-console-lift); clip-path: none;
  }
  .pfm.pfl section[aria-labelledby="bots"]::before { display: none; }
  .pfm.pfl .pfm-bots { align-items: stretch; }
  .pfm.pfl .pfm-bots__col { padding-top: 0; border-top: 0; }
  .pfm.pfl .pfm-bots__col h3 {
    position: sticky; top: var(--header-height); z-index: 1; margin: 0; padding: 18px 0 14px;
    border-top: 3px solid var(--c); background: var(--pfl-console);
  }
  .pfm.pfl .pfm-bots__col.pf-bot--token h3 { border-top-style: dashed; }
  .pfm.pfl .pfm-bots__col a { border-top-color: var(--pfl-console-line); }
}

/* ---- More reading paths and the evidence scale close the page on the desk */
.pfm.pfl .pf-wrap { padding-bottom: 0; }
.pfm.pfl .pf-block:has(> :is(.pf-pcards, .pf-standard)) { position: relative; isolation: isolate; }
.pfm.pfl .pf-block:has(> .pf-pcards) { padding-top: 128px; }
.pfm.pfl .pf-block:has(> .pf-standard) { margin-top: 0; padding-block: var(--pfl-band); }
.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-standard dl { border-bottom-color: color-mix(in srgb, var(--ink) 14%, transparent); }
.pfm.pfl .pf-standard dt, .pfm.pfl .pf-standard dd { border-top-color: color-mix(in srgb, var(--ink) 14%, transparent); }

@media (max-width: 1280px) {
  .pfm.pfl .pf-lead { gap: 40px; }
  .pfm.pfl .pf-lead__main { padding: 36px; }
  .pfm.pfl .pf-findings-home a:first-child { column-gap: 56px; padding: 44px 48px 40px; }
  .pfm.pfl :is(section[aria-labelledby="news"], section[aria-labelledby="start"]) { column-gap: 56px; }
  .pfm.pfl .pf-anatomy__q { font-size: 30px; line-height: 38px; }
  .pfm.pfl .pf-anatomy__ans { font-size: 24px; line-height: 33px; }
  .pfm.pfl .pfl-stage { padding: 44px 44px 36px; }
  .pfm.pfl .pfl-stage > svg { width: 240px; height: 240px; right: -40px; top: -44px; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section { column-gap: 18px; padding: 0 20px 0 18px; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section h3 { font-size: 30px; line-height: 34px; }
  .pfm.pfl section:has(.pfl-stage) .pf-sections .pf-section__count { max-width: 8.5em; text-align: right; }
  .pfm.pfl .pfl-stage__name { font-size: 80px; }
  .pfm.pfl .pfl-stage__desc { font-size: 23px; line-height: 32px; }
}
@media (max-width: 1000px) {
  html.pfl { --pfl-band: 88px; }
  .pfm.pfl section[aria-labelledby="findings"] { padding-top: 72px; }
  .pfm.pfl .pf-findings-home { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pfm.pfl .pf-findings-home a:first-child { grid-template-columns: minmax(0, 1fr); padding: 32px 28px 28px; }
  .pfm.pfl .pf-findings-home a:first-child .pf-findings-home__num { grid-column: 1; grid-row: auto; font-size: clamp(88px, 24vw, 160px); }
  .pfm.pfl .pf-findings-home a:first-child :is(.pfm-share, .pf-findings-home__label, .pf-findings-home__title) { grid-column: 1; }
  .pfm.pfl .pf-findings-home a:first-child .pfm-share { height: 20px; margin: 28px 0 40px; }
  .pfm.pfl .pf-findings-home a:first-child .pf-findings-home__label { font-size: 22px; line-height: 30px; }
  .pfm.pfl .pf-findings-home a { padding: 28px 28px 24px; }
  .pfm.pfl .pf-lead { gap: 40px; }
  .pfm.pfl .pf-lead__main { padding: 28px; }
  .pfm.pfl .pf-block:has(> .pf-pcards) { padding-top: 80px; }
  .pfm.pfl section[aria-labelledby="tools"] .pf-entry { padding: 28px 26px; }
  .pfm.pfl .pf-steps3 .pf-entry + .pf-entry { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .pfm.pfl .pf-homenews a { grid-template-columns: minmax(0, 1fr); padding: 18px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pfm.pfl .pf-findings-home a, .pfm.pfl .pf-lead__main, .pfm.pfl .pfl-stage, .pfm.pfl .pf-sections .pf-section { transition: none; }
  .pfm.pfl .pf-findings-home a:hover, .pfm.pfl .pf-lead__main:hover { translate: none; }
}
