/* ==========================================================================
   Promptly Found: site surface layer (all pages)
   Load after site-modern.css. Every rule is scoped to html.pfl or to
   html.pfm.pfl, so a page falls back to the current design when the class
   pfl is absent. site-lead.js sets the class.

   This file holds the tokens for the layer, the header and the menus.
   The header is a console that floats over the page. A menu opens out of it
   as one object, and the page behind goes dark. Each menu has the same
   structure: its name is large on the left and its content is on the right.
   The structure rules apply from 1001px. Below that width the current header
   and the current mobile menu stay.
   ========================================================================== */

html.pfl {
  --pfl-night: #131315;
  --pfl-desk: #f5f4f0;
  --pfl-sheet: #ffffff;
  --pfl-console: #1b1b1e;
  --pfl-console-line: #2e2e33;
  --pfl-shade: 24 24 27;
  --pfl-rest: 0 0 0 1px rgb(var(--pfl-shade) / .07), 0 1px 2px rgb(var(--pfl-shade) / .04), 0 10px 20px -12px rgb(var(--pfl-shade) / .14);
  --pfl-raised: 0 0 0 1px rgb(var(--pfl-shade) / .07), 0 2px 4px rgb(var(--pfl-shade) / .05), 0 22px 44px -20px rgb(var(--pfl-shade) / .24), 0 56px 96px -48px rgb(var(--pfl-shade) / .3);
  --pfl-console-lift: inset 0 1px 0 rgb(255 255 255 / .1), 0 0 0 1px rgb(0 0 0 / .5), 0 18px 30px -18px rgb(var(--pfl-shade) / .5), 0 60px 100px -50px rgb(var(--pfl-shade) / .6);
  --pfl-band: 144px;
  --pfl-ease: cubic-bezier(.2, .7, .2, 1);
  --pfl-rail-top: calc(var(--header-height) + 40px);
}

@keyframes pfl-drawer { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pfl-menu-in { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: none; } }

@media (min-width: 1001px) {
  /* the bar is 60px high and 12px from the top. 76px keeps sticky headings clear of it */
  html.pfl { --header-height: 76px; }

  /* ---- Header: a floating console. Logo left, menu in the centre, search right */
  .pfm.pfl .pf-header {
    --pfl-bar-inset: max(16px, calc((100vw - var(--width-page)) / 2 + 24px));
    top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px;
    height: 60px; margin: 12px var(--pfl-bar-inset) 0; padding: 0 10px 0 24px;
    border: 0; border-radius: 18px; background: var(--pfl-console);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 0 0 1px rgb(0 0 0 / .45), 0 18px 34px -20px rgb(0 0 0 / .7), 0 0 0 100vmax rgb(9 9 10 / 0);
    transition: box-shadow .3s, border-radius .2s;
  }
  /* while a menu is open the bar and the menu are one object, and the wide
     shadow makes the page behind them dark */
  .pfm.pfl .pf-header:has(.pf-nav > [aria-expanded="true"]) {
    border-radius: 18px 18px 0 0;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 0 0 1px rgb(0 0 0 / .45), 0 0 0 0 rgb(0 0 0 / 0), 0 0 0 100vmax rgb(9 9 10 / .6);
  }
  .pfm.pfl .pf-header::after { inset: auto 20px 0; border-radius: 2px; }
  .pfm.pfl .pf-logo { justify-self: start; }
  .pfm.pfl .pf-nav { justify-self: center; gap: 2px; margin: 0; }
  .pfm.pfl .pf-nav > a,
  .pfm.pfl .pf-nav > button { padding: 9px 14px; border-radius: 10px; transition: background-color .2s, color .15s, box-shadow .2s; }
  .pfm.pfl .pf-nav > a:hover,
  .pfm.pfl .pf-nav > button:hover { background: rgb(255 255 255 / .07); }
  .pfm.pfl .pf-nav > button[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
  .pfm.pfl .pf-nav > button[aria-expanded="true"] .pf-icon { color: var(--paper); }
  .pfm.pfl .pf-nav > [aria-current="page"] {
    box-shadow: none; background: linear-gradient(var(--accent), var(--accent)) 50% calc(100% - 3px) / calc(100% - 28px) 2px no-repeat;
  }
  .pfm.pfl .pf-header__search {
    justify-self: end; min-width: 232px; padding: 9px 14px; border-color: transparent; border-radius: 12px;
    background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1);
    transition: background-color .2s, box-shadow .2s, color .15s;
  }
  .pfm.pfl .pf-header__search:hover { border-color: transparent; background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
  /* the top band of a page continues up behind the floating bar */
  .pfm.pfl .pfm-band--top { clip-path: inset(calc((var(--header-height) + 16px) * -1) -100vmax 0); }

  /* ---- Menus: the lower part of the same console ---------------------------- */
  .pfm.pfl .pf-mega {
    top: 100%; left: 0; right: 0; border: 0; border-top: 1px solid var(--pfl-console-line); border-radius: 0 0 18px 18px;
    background: var(--pfl-console); box-shadow: 0 0 0 1px rgb(0 0 0 / .45), 0 50px 80px -36px rgb(0 0 0 / .9);
  }
  .pfm.pfl .pf-mega:not([hidden]) { animation: pfl-drawer .32s var(--pfl-ease); }
  .pfm.pfl .pf-mega:not([hidden]) .pf-mega__in > * { animation: pfl-menu-in .42s var(--pfl-ease) .04s both; }
}
/* ---- Sticky parts under the floating bar ----------------------------------
   The bar ends 72px from the top, and --header-height is 76px. A part that
   sticks at 76px has a 4px gap above it where the page shows through, so each
   one carries an 8px strip of its own colour upward. The strip is short enough
   that it never reaches the top band when the part is in its normal place. */
@media (min-width: 1001px) {
  .pfm.pfl .pf-az--sticky { box-shadow: 0 -8px 0 var(--paper); }
  /* the news filters stuck at 0, under the bar */
  .pfm.pfl .pf-nl-tools { top: var(--header-height); box-shadow: 0 -8px 0 var(--paper); }
  .pfm.pfl .pfm-bots__col h3 { box-shadow: 0 -8px 0 var(--pfl-console); }
  /* the live totals stuck 16px from the top of the window, under the bar */
  .pfm.pfl .pf-live__sec--totals { top: calc(var(--header-height) + 16px); }
}

@media (min-width: 1001px) and (max-width: 1280px) {
  .pfm.pfl .pf-header__search { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pfm.pfl .pf-header, .pfm.pfl .pf-nav > a, .pfm.pfl .pf-nav > button, .pfm.pfl .pf-header__search { transition: none; }
  .pfm.pfl .pf-mega:not([hidden]), .pfm.pfl .pf-mega:not([hidden]) .pf-mega__in > * { animation: none; }
}

/* ---- Megamenus (Learn, Research, Platforms, News, Tools) -------------------
   Each menu wrapper has the class pfx. Layout: a white feature sheet on the
   left, a flat list in the middle, a raised dark panel on the right and a row
   of links at the bottom. The markup is built in Header.astro. */
.pf-mega.pfx::before,.pf-mega.pfx::after,.pf-mega.pfx .pf-mega__in::before,.pf-mega.pfx .pf-mega__in::after{content:none!important;display:none!important}
.pf-mega.pfx > .pf-mega__in{display:block!important;grid-template-columns:none!important;padding:0!important;max-width:none!important;width:100%!important}
.pfx .pfl{max-width:1360px;width:100%;margin:0 auto;padding:28px 40px 0;box-sizing:border-box;font-family:Archivo,"Helvetica Neue",Arial,sans-serif;color:#edebe6}
.pfx .pfl a{color:inherit;text-decoration:none;transition:color .15s,background-color .15s}
.pfx .pfl a:focus-visible,.pfx .pfl button:focus-visible,.pfx .pfl input:focus-visible{outline:2px solid #8eb0ff;outline-offset:2px}
.pfx .pfl-row{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;gap:40px;align-items:stretch}
.pfx .pfl-h{margin:0 0 12px;font-size:15px;line-height:22px;font-weight:500;color:#918f8a}
.pfx .pfl-n{font-size:13.5px;line-height:20px;font-weight:400;color:#918f8a;white-space:nowrap}
.pfx .pfl-list{list-style:none;margin:0;padding:0}
.pfx .pfl-list li{margin:0;padding:0}

/* Flat list in the middle */
.pfx .pfl-mid{padding-top:4px}
.pfx .pfl-mid .pfl-list li + li{border-top:1px solid #2b2b2f}
.pfx .pfl-mid .pfl-2 li + li{border-top:0}
.pfx .pfl-mid .pfl-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}
.pfx .pfl-mid .pfl-2 li{border-bottom:1px solid #2b2b2f}
.pf-mega.pfx .pfl a.pfl-r{display:block;margin:0 -12px;padding:11px 12px;border-radius:6px}
.pf-mega.pfx .pfl a.pfl-r:hover{background:#232327}
.pfx .pfl-r:hover .pfl-t{color:#e58a9a}
.pfx .pfl-t{display:block;font-size:16px;line-height:23px;font-weight:500;color:#edebe6;transition:color .15s}
.pfx .pfl-d{display:block;margin-top:2px;font-size:13.5px;line-height:20px;color:#b5b3ad}
.pfx .pfl-tt{display:flex;align-items:center;gap:10px}
.pfx .pfl-tt .pfl-n{margin-left:auto}
.pfx .pfl-key{width:10px;height:10px;border-radius:3px;flex-shrink:0}
.pfx .pfl-kick{display:block;font-size:13px;line-height:18px;font-weight:600;color:#918f8a;margin-bottom:3px}
.pf-mega.pfx .pfl a.pfl-co{display:flex!important;flex-direction:row!important;gap:12px;align-items:flex-start}
.pfx .pfl-logo{width:30px;height:30px;border-radius:6px;background:#edebe6;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
.pfx .pfl-logo img{width:18px;height:18px;object-fit:contain}

/* Raised dark panel on the right */
.pfx .pfl-panel{background:#232327;border:1px solid #2e2e33;border-radius:8px;padding:20px 20px 14px;box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 10px 30px rgba(0,0,0,.35)}
.pfx .pfl-panel .pfl-list li + li{border-top:1px solid #303035}
.pf-mega.pfx .pfl .pfl-panel a.pfl-p{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;margin:0 -10px;padding:0 10px;border-radius:6px;font-size:15px;font-weight:500;color:#edebe6}
.pf-mega.pfx .pfl .pfl-panel a.pfl-p:hover{background:#2e2e33;color:#e58a9a}
.pfx .pfl-panel .pfl-fact{display:block;margin:0 -10px;padding:11px 10px;border-radius:6px;font-size:14.5px;line-height:21px;color:#b5b3ad}
.pfx .pfl-panel .pfl-fact b{display:block;font-size:26px;line-height:32px;font-weight:300;letter-spacing:-.02em;color:#edebe6;margin-bottom:2px}
.pfx .pfl-panel a.pfl-fact:hover{background:#2e2e33}
.pfx .pfl-panel a.pfl-fact:hover b{color:#e58a9a}
.pfx .pfl-panel .pfl-r{margin:0 -10px;padding:10px}
.pf-mega.pfx .pfl .pfl-panel a.pfl-r:hover{background:#2e2e33}

/* White feature sheet on the left */
.pfx .pfl-sheet{background:#fff;color:#18181b;border-radius:8px;padding:24px 24px 22px;box-sizing:border-box;display:flex;flex-direction:column;box-shadow:0 1px 2px rgba(0,0,0,.5),0 16px 40px rgba(0,0,0,.45)}
.pfx .pfl-sheet .pfl-sk{font-size:13px;line-height:18px;font-weight:600;color:#6b6b73;margin:0 0 10px}
.pfx .pfl-sheet h2{margin:0 0 8px;font-size:24px;line-height:30px;font-weight:400;letter-spacing:-.02em;color:#18181b}
.pfx .pfl-sheet p{margin:0 0 16px;font-size:14.5px;line-height:22px;color:#4f4f57}
.pfx .pfl-sheet .pfl-num{font-size:52px;line-height:54px;font-weight:300;letter-spacing:-.035em;color:#18181b;margin:2px 0 6px}
.pfx .pfl-sheet .pfl-end{margin-top:auto;padding-top:14px;border-top:1px solid #e5e4df;display:flex;gap:20px;flex-wrap:wrap}
.pfx .pfl .pfl-sheet a.pfl-a{font-size:15px;font-weight:500;color:#18181b;text-decoration:underline;text-decoration-color:#8a1c2f;text-underline-offset:4px;text-decoration-thickness:1px}
.pfx .pfl .pfl-sheet a.pfl-a:hover{color:#8a1c2f}
.pf-mega.pfx .pfl .pfl-sheet a.pfl-btn{display:flex;align-items:center;justify-content:center;height:44px;border-radius:6px;background:#18181b;color:#fff;font-size:15px;font-weight:500}
.pf-mega.pfx .pfl .pfl-sheet a.pfl-btn:hover{background:#8a1c2f;color:#fff}
.pfx .pfl-steps{list-style:none;margin:0 0 18px;padding:0}
.pfx .pfl-steps li{display:flex;gap:10px;align-items:baseline;padding:7px 0;border-top:1px solid #e5e4df;font-size:14.5px;line-height:21px;color:#18181b}
.pfx .pfl-steps li::before{content:"";width:6px;height:6px;border-radius:999px;background:#18181b;flex-shrink:0;transform:translateY(-2px)}
.pfx .pfl-steps li:last-child::before{background:transparent;border:1px solid #18181b;box-sizing:border-box}
.pfx .pfl-track{display:flex;gap:3px;margin:0 0 14px}
.pfx .pfl-track span{flex:1;height:4px;border-radius:2px;background:#e5e4df}
.pfx .pfl-track span:nth-child(-n+3){background:#18181b}
.pfx .pfl-bars{margin:0 0 16px;display:flex;flex-direction:column;gap:12px}
.pfx .pfl-bar-l{display:flex;justify-content:space-between;gap:12px;font-size:13.5px;line-height:19px;color:#4f4f57;margin-bottom:5px}
.pfx .pfl-bar-l b{font-weight:600;color:#18181b}
.pfx .pfl-bar{height:8px;border-radius:4px;background:#f0efeb;overflow:hidden}
.pfx .pfl-bar i{display:block;height:100%;border-radius:4px;background:#18181b}
.pfx .pfl-bar i.pfl-hot{background:#8a1c2f}
.pfx .pfl-form{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.pfx .pfl-form label{font-size:14px;font-weight:500;color:#18181b}
.pfx .pfl-form input{height:46px;box-sizing:border-box;border:1px solid #6b6b73;border-radius:6px;padding:0 12px;font:inherit;font-size:15px;color:#18181b;background:#fff}
.pfx .pfl-form button{height:46px;border:0;border-radius:6px;background:#18181b;color:#fff;font:inherit;font-size:15px;font-weight:500;cursor:pointer;text-align:center;transition:background-color .15s}
.pfx .pfl-form button:hover{background:#8a1c2f}
.pfx .pfl-sheet .pfl-note{font-size:13px;line-height:19px;color:#6b6b73;margin:0}
.pfx .pfl-lead-t{display:block;font-size:24px;line-height:31px;font-weight:400;letter-spacing:-.02em;color:#18181b}
.pf-mega.pfx .pfl a.pfl-lead{display:flex;flex-direction:column;flex:1;color:#18181b}
.pfx a.pfl-lead:hover .pfl-lead-t{color:#8a1c2f}

/* Bottom bar */
.pfx .pfl-foot{margin-top:24px;padding:14px 0 18px;border-top:1px solid #2b2b2f;display:flex;flex-wrap:wrap;align-items:center;gap:28px;font-size:14.5px;font-weight:500}
.pfx .pfl .pfl-foot > a{color:#edebe6;text-decoration:underline;text-decoration-color:#e58a9a;text-underline-offset:4px;text-decoration-thickness:1px}
.pfx .pfl .pfl-foot > a:hover{color:#e58a9a}
.pfx .pfl-grades{margin-left:auto;display:flex;align-items:center;gap:16px;font-size:13.5px;font-weight:400;color:#b5b3ad}
.pfx .pfl-grades span{display:inline-flex;align-items:center;gap:6px}
.pfx .pfl-mark{width:12px;height:12px;border-radius:999px;border:1.5px solid #edebe6;box-sizing:border-box;display:inline-block}
.pfx .pfl-m100{background:#edebe6}
.pfx .pfl-m75{background:conic-gradient(#edebe6 0 75%,transparent 75% 100%)}
.pfx .pfl-m50{background:conic-gradient(#edebe6 0 50%,transparent 50% 100%)}
.pfx .pfl .pfl-grades a{color:#edebe6;text-decoration:underline;text-decoration-color:#e58a9a;text-underline-offset:4px}

.pfx .pfl-panel{align-self:start}
.pf-mega.pfx .pfl .pfl-sheet > a.pfl-btn{margin-top:auto}
.pfx .pfl-sheet .pfl-form + .pfl-note{margin-top:auto}
.pfx .pfl-form button{display:flex!important;align-items:center;justify-content:center;text-align:center!important;width:100%}
.pf-mega.pfx .pfl a.pfl-lead{align-items:stretch!important;text-align:left!important}
.pfx a.pfl-lead .pfl-go{margin-top:auto;display:flex;align-items:center;justify-content:center;height:44px;border-radius:6px;background:#18181b;color:#fff;font-size:15px;font-weight:500;transition:background-color .15s}
.pfx a.pfl-lead:hover .pfl-go{background:#8a1c2f}
@media (max-width:1180px){.pfx .pfl-row{grid-template-columns:minmax(0,1fr) 300px}.pfx .pfl-sheet{grid-column:1 / -1}}
@media (max-width:760px){.pfx .pfl{padding:20px 20px 0}.pfx .pfl-row{grid-template-columns:minmax(0,1fr)}.pfx .pfl-mid .pfl-2{grid-template-columns:minmax(0,1fr)}.pfx .pfl-grades{margin-left:0;flex-wrap:wrap}}
@media (prefers-reduced-motion:reduce){.pfx .pfl a,.pfx .pfl-form button{transition:none}}
/* A menu taller than the window (the stacked layout under 1180px) scrolls inside itself, because the header is sticky
   and the page cannot scroll it into view. */
.pf-mega.pfx{max-height:calc(100vh - 88px);max-height:calc(100dvh - 88px);overflow-y:auto;overscroll-behavior:contain}
