/* ==========================================================================
   Promptly Found: homepage numbers and news (loaded after home-lead.css)
   - .pf-pulse     the newest news story, at the top of the hero
   - .pf-nums      the numbers band: the most surprising results of our studies,
                   on a dark band (src/components/home/NumbersWall.astro)
   - .pf-newsdesk  the news section: a lead story, the latest list and earlier stories
   "New" marks come from a small script on the page (news from the last 7 days).
   ========================================================================== */

:root {
  --pfp-night: #131315;
  --pfp-card: #1c1c20;
  --pfp-card-hi: #232328;
  --pfp-line: rgb(255 255 255 / .1);
  --pfp-text: #f3f2ee;
  --pfp-muted: rgb(243 242 238 / .62);
  --pfp-hot: #e2566e;           /* claret, lifted for a dark ground */
  --pfp-cool: rgb(243 242 238 / .34);
}

/* ---- The newest story, at the top of the hero ----------------------------- */
.pfm .pf-home-hero { position: relative; }
.pf-pulse {
  position: absolute; top: 34px; left: 0; z-index: 2;
  display: inline-flex; align-items: center; gap: 12px; max-width: min(100%, 860px);
  padding: 7px 18px 7px 8px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink); font: 400 15px/22px var(--font-sans); text-decoration: none;
  transition: background .2s, border-color .2s;
}
.pf-pulse:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.pf-pulse__tag {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  font: 600 12px/18px var(--font-sans); letter-spacing: .06em; text-transform: uppercase;
}
.pf-pulse.is-new .pf-pulse__tag { background: var(--accent); color: #fff; }
.pf-pulse__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pf-pulse.is-new .pf-pulse__dot { animation: pfp-beat 1.8s ease-out infinite; }
.pf-pulse time { flex: none; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pf-pulse__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-pulse__title::after { content: " \2192"; color: var(--ink-3); }
@keyframes pfp-beat {
  0% { box-shadow: 0 0 0 0 rgb(255 255 255 / .7); }
  70% { box-shadow: 0 0 0 8px rgb(255 255 255 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0); }
}

/* ---- The numbers band ------------------------------------------------------ */
.pf-nums {
  position: relative; margin-top: 96px; padding: 104px 0 112px;
  background: var(--pfp-night); color: var(--pfp-text);
  /* full-bleed without horizontal scroll: paint the band with a clipped shadow */
  box-shadow: 0 0 0 100vmax var(--pfp-night); clip-path: inset(0 -100vmax);
}
.pf-nums__head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.pf-nums h2 {
  margin: 0; max-width: 15em; color: var(--pfp-text);
  font: 200 clamp(40px, 5.2vw, 84px)/.98 var(--font-sans); letter-spacing: -.035em; font-variation-settings: "wdth" 88;
}
.pf-nums__sub { margin: 20px 0 0; max-width: 38em; color: var(--pfp-muted); font-size: 18px; line-height: 28px; }
.pf-nums__all {
  flex: none; padding: 10px 18px; border: 1px solid var(--pfp-line); border-radius: 999px;
  color: var(--pfp-text); font: 500 14px/20px var(--font-sans); text-decoration: none; transition: background .2s, border-color .2s;
}
.pf-nums__all:hover { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .3); }

.pf-nums__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pf-num {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 30px 30px 26px; border-radius: 16px; border: 1px solid var(--pfp-line);
  background: var(--pfp-card); color: var(--pfp-text); text-decoration: none;
  transition: translate .3s var(--pfl-ease, ease), background .3s, border-color .3s, box-shadow .3s;
}
.pf-num:hover { translate: 0 -4px; background: var(--pfp-card-hi); border-color: rgb(255 255 255 / .2); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .9); }
.pf-num__kicker { font: 600 12px/16px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--pfp-muted); }
.pf-num__value {
  font: 200 clamp(56px, 5.4vw, 84px)/.9 var(--font-sans); letter-spacing: -.045em; font-variation-settings: "wdth" 86;
  color: var(--pfp-text); font-variant-numeric: tabular-nums;
}
.pf-num__headline { font: 500 20px/27px var(--font-sans); letter-spacing: -.01em; color: var(--pfp-text); }
.pf-num__label { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--pfp-line); color: var(--pfp-muted); font-size: 14px; line-height: 20px; }
.pf-num__report { color: var(--pfp-text); font: 500 14px/20px var(--font-sans); }
.pf-num__report::after { content: " \2192"; color: var(--pfp-hot); transition: margin .2s; }
.pf-num:hover .pf-num__report::after { margin-left: 4px; }

/* the number inside a sentence, and the exact fact under the card */
.pf-num__headline b { font-weight: 600; color: var(--pfp-hot); }
.pf-num__label b { font-weight: 500; color: var(--pfp-text); }
/* "9 in 10" as dots: the share in claret, the rest dim */
.pf-num__dots { display: flex; flex-wrap: wrap; gap: 7px; max-width: 290px; }
.pf-num__dots i { width: 18px; height: 18px; border-radius: 50%; background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.pf-num__dots i.on { background: var(--pfp-hot); box-shadow: 0 0 12px -2px rgb(226 86 110 / .6); }
.pf-num__dots[style*="--n:1"]:not([style*="--n:10"]) { max-width: 320px; }
.pf-num__dots[style*="--n:1"]:not([style*="--n:10"]) i { width: 14px; height: 14px; }

/* one share bar, or two bars that compare */
.pf-num__share, .pf-num__track { position: relative; display: block; height: 10px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; }
.pf-num__share i, .pf-num__track i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--pfp-hot); }
.pf-num__bars { display: grid; gap: 12px; }
.pf-num__group { margin-top: 6px; font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pfp-muted); }
.pf-num__group:first-child { margin-top: 0; }
.pf-num .pf-eng__mark { border-radius: 3px; background: #fff; padding: 1px; margin-right: 6px; vertical-align: -2px; }
.pf-num__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track"; row-gap: 6px; column-gap: 12px; font-size: 14px; line-height: 20px; }
.pf-num__barlabel { grid-area: label; color: var(--pfp-muted); }
.pf-num__bar b { grid-area: value; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--pfp-text); }
.pf-num__bar .pf-num__track { grid-area: track; }
.pf-num__bar:not(.pf-num__bar--key) .pf-num__track i { background: var(--pfp-cool); }
.pf-num__bar--key .pf-num__barlabel { color: var(--pfp-text); }
.pf-num .pf-eng__mark { border-radius: 3px; background: #fff; padding: 1px; }

/* the lead: across the full width, the number on the left, the comparison on the right */
.pf-num--lead {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr auto;
  grid-template-areas: "kicker bars" "value bars" "headline bars" ". label" ". report";
  column-gap: 64px; row-gap: 18px; align-items: start; padding: 48px 52px 44px;
  background: radial-gradient(120% 140% at 0% 0%, #2a1a1e 0%, var(--pfp-card) 55%);
}
.pf-num--lead .pf-num__kicker { grid-area: kicker; color: var(--pfp-hot); }
.pf-num--lead .pf-num__value { grid-area: value; font-size: clamp(96px, 12vw, 200px); line-height: .82; }
.pf-num--lead .pf-num__headline { grid-area: headline; align-self: start; max-width: 18em; font-size: 28px; line-height: 36px; font-weight: 400; }
.pf-num--lead .pf-num__bars { grid-area: bars; align-self: start; gap: 18px; }
.pf-num--lead .pf-num__bar { font-size: 16px; line-height: 22px; }
.pf-num--lead .pf-num__bar b { font-size: 22px; }
.pf-num--lead .pf-num__track { height: 16px; }
.pf-num--lead .pf-num__label { grid-area: label; margin-top: 0; }
.pf-num--lead .pf-num__report { grid-area: report; }


/* ---- The news desk --------------------------------------------------------- */
.pf-newsdesk__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pf-newsdesk__lead {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: 40px 44px; border-radius: 16px; background: var(--paper); color: var(--ink); text-decoration: none;
  box-shadow: var(--pfl-raised, 0 20px 40px -20px rgb(0 0 0 / .25)); border-top: 4px solid var(--ink);
  transition: translate .3s var(--pfl-ease, ease);
}
.pf-newsdesk__lead.is-new { border-top-color: var(--accent); }
.pf-newsdesk__lead:hover { translate: 0 -3px; }
.pf-newsdesk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink-3); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.pf-newtag {
  padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2);
  font: 600 11px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
}
.is-new .pf-newtag { background: var(--accent); color: #fff; }
.pf-newsdesk__title { font: 400 clamp(28px, 2.8vw, 40px)/1.1 var(--font-sans); letter-spacing: -.025em; }
.pf-newsdesk__desc { color: var(--ink-2); font-size: 18px; line-height: 28px; }
.pf-newsdesk__impact { display: block; padding: 16px 18px; border-radius: 10px; background: var(--pfl-desk, #f5f4f0); color: var(--ink); font-size: 16px; line-height: 25px; }
.pf-newsdesk__impact b { display: block; margin-bottom: 4px; color: var(--accent); font: 600 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.pf-newsdesk__read { font-weight: 500; }
.pf-newsdesk__read::after { content: " \2192"; color: var(--accent); }
.pf-newsdesk__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.pf-newsdesk__list li { border-bottom: 1px solid var(--line); }
.pf-newsdesk__list a { display: grid; gap: 6px; padding: 18px 0; color: var(--ink); text-decoration: none; }
.pf-newsdesk__item { font-size: 18px; line-height: 25px; letter-spacing: -.005em; }
.pf-newsdesk__list a:hover .pf-newsdesk__item { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Earlier stories: the next 24 posts in three columns, so that new posts stay on the home page for some days */
.pf-newsdesk__more { margin-top: 56px; }
.pf-newsdesk__morehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.pf-newsdesk__morehead h3 { margin: 0; font: 500 22px/28px var(--font-sans); letter-spacing: -.01em; }
.pf-newsdesk__cols { margin: 0; padding: 0; list-style: none; columns: 3; column-gap: 40px; }
.pf-newsdesk__cols li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.pf-newsdesk__cols a { display: grid; gap: 4px; padding: 14px 0; color: var(--ink); text-decoration: none; }
.pf-newsdesk__cols .pf-newsdesk__meta { font-size: 13px; line-height: 18px; }
.pf-newsdesk__cols a.is-new .pf-newsdesk__meta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pf-newsdesk__cols .pf-newsdesk__item { font-size: 16px; line-height: 22px; }
.pf-newsdesk__cols a:hover .pf-newsdesk__item { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---- Narrow screens -------------------------------------------------------- */
@media (max-width: 1000px) {
  /* one column: the story line flows above the headline, and the dark hero runs straight into the numbers band */
  .pf-pulse { position: relative; top: auto; margin: 0 0 32px; }
  .pf-nums { margin-top: 0; padding: 72px 0 80px; border-top: 1px solid var(--pfp-line); }
  .pf-nums__head { flex-direction: column; align-items: start; }
  .pf-nums__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-num--lead { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "kicker" "value" "headline" "bars" "label" "report"; padding: 36px 32px; row-gap: 20px; }
  .pf-num--lead .pf-num__headline { font-size: 24px; line-height: 32px; }
  .pf-newsdesk__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pf-newsdesk__cols { columns: 2; }
}
@media (max-width: 640px) {
  .pf-pulse { gap: 8px; padding-right: 14px; font-size: 14px; }
  .pf-pulse time { display: none; }
  .pf-nums__grid { grid-template-columns: minmax(0, 1fr); }
  .pf-num { padding: 26px 24px 22px; }
  .pf-num--lead { padding: 30px 24px; }
  .pf-num--lead .pf-num__value { font-size: 104px; }
  .pf-newsdesk__lead { padding: 28px 24px; }
  .pf-newsdesk__more { margin-top: 40px; }
  .pf-newsdesk__cols { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-pulse.is-new .pf-pulse__dot { animation: none; }
  .pf-num, .pf-newsdesk__lead { transition: none; }
  .pf-num:hover, .pf-newsdesk__lead:hover { translate: none; }
}
