/* The funnel section: the numbered bands, the side notes and the ink drawings.
   Written for the /outliers landing page, which is gone; /titles was built on
   the same markup and is the only page using this now. The form, hero and
   header-hiding rules that belonged to /outliers have been removed.

   Structure, proportions and copy come from the design; the ground, the faces
   and the marks are bonfire's. Sizes are the design's own, scaled down one step
   because the design was drawn on a 1440px light page and this one is dark —
   type on a dark ground reads heavier at the same size. */

/* ── palette ──────────────────────────────────────────────────────────────
   Dark is the default and the decided one: bonfire's ground, with bone as the
   mark. The light variant swaps the two poles — near-black becomes the mark,
   a warm off-white becomes the ground — and darkens the status colours,
   because #7FC8A9 on a light ground is 1.86:1 and unreadable.

   Every value below was measured, not guessed. Ratios are against the ground
   of their own variant.
   ───────────────────────────────────────────────────────────────────────── */

.lp {
  /* Mapped onto the root palette in screen.css — the select bright variant. */
  --lp-ground:        var(--s-paper);
  --lp-ink:           var(--s-ink);
  --lp-muted:         var(--s-ink-muted);
  --lp-mark:          var(--s-ink);
  --lp-on-mark:       var(--s-paper);
  --lp-rule:          var(--s-rule);
  --lp-surface:       var(--s-surface);
  --lp-field:         var(--s-paper);
  --lp-line:          var(--s-line);

  /* The funnel bands are large blocks of flat colour with type on top, so they
     take the system's own values rather than the darkened text ones — a band
     is a graphic, and these are the numbers the video system measured. */
  --lp-band-1:        var(--s-surface-2);
  --lp-band-2:        #C9C9D0;
  --lp-on-band:       var(--s-ink);

  /* Two of each, and the split is the point. A band is a large block of flat
     colour, so it keeps the video system's measured value; a LABEL is small
     type on white, where #31C48D is 2.23:1 and #F0483E is 3.68:1. Measured on
     the live page, which is how they were caught. */
  --lp-negative:        #F0483E;   /* the band's fill                          */
  --lp-negative-text:   var(--s-negative);  /* 4.51:1 — the label above it     */
  --lp-on-negative:     var(--s-paper);     /* 3.68:1 on the band, large only  */
  --lp-negative-wash:   #FDF1F0;

  --lp-positive:        #31C48D;   /* the band's fill                          */
  --lp-positive-text:   var(--s-positive);  /* 4.58:1                          */
  --lp-on-positive:     var(--s-ink);       /* 9.6:1 on the band               */
  --lp-positive-wash:   #EFF6F2;

  --lp-accent:        var(--s-accent);
  --lp-swipe:         var(--s-accent-fill);

  --pad: clamp(1.5rem, 7vw, 6.875rem);   /* the design's 110px gutter */
  font-family: var(--font-argument);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

/* The ember swipe. bonfire's second mark, and the louder one: `colour` is the
   operative phrase in a sentence and is used freely, the swipe is the section's
   one point. It never stacks with the emphasis face — leaning and shouting at
   once is two ways of saying "this bit", which cancels — so the two markers in
   the copy are mutually exclusive by construction.

   Drawn as a background rather than a positioned pseudo-element so it survives
   a phrase wrapping across lines, which the video system never has to handle.
   The insets are the system's own: 12% off the top, 4% off the bottom, and a
   small bleed past the words at each end. */
.lp mark {
  color: inherit;
  background: linear-gradient(var(--lp-swipe), var(--lp-swipe)) no-repeat;
  background-size: 100% 84%;
  background-position: 0 12%;
  padding-inline: 0.24em;
  margin-inline: -0.24em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* The emphasis face, never a whole line — a phrase inside one. */
.lp em, .lp .emph {
  font-family: var(--font-emphasis);
  font-style: italic;
  font-weight: 600;
  font-size: 1.042em;
}

.lp-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lp-muted);
}
.lp-label--cut  { color: var(--lp-negative-text); }
.lp-label--keep { color: var(--lp-positive-text); }

.lp-copy { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem); line-height: 1.58; color: var(--lp-ink); }

/* ---------- funnel ---------- */
.lp-funnel-head {
  padding: clamp(3rem, 5vw, 4.5rem) var(--pad) 0.625rem;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.875rem; text-align: center;
}
.lp-funnel-head h2 { font-size: clamp(1.5rem, 1rem + 2vw, 2.625rem); line-height: 1.14; max-width: 47.5rem; }

.lp-inflow { display: flex; justify-content: center; padding-top: 1.625rem; }
.lp-inflow svg { max-width: 100%; height: auto; }

.lp-rows {
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: 1fr 18.75rem 1fr;
  gap: 0 2.75rem;
  align-items: stretch;
}
.lp-side { display: flex; flex-direction: column; justify-content: center; gap: 0.625rem; padding: 1.75rem 0; }
.lp-side--right { text-align: right; align-items: flex-end; }
.lp-art { display: flex; align-items: center; padding: 1.625rem 0; }
.lp-art--right { justify-content: flex-end; }
.lp-art svg { max-width: 100%; height: auto; }

/* The funnel bands narrow toward the bone that survives. */
.lp-band { position: relative; display: flex; align-items: center; justify-content: center; min-height: 6.25rem; }
.lp-band svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-band span {
  position: relative;
  font-family: var(--font-argument);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.5rem);
  letter-spacing: -0.02em;
}

/* The raw voice: a feeling, never the argument. */
.lp-delivery {
  padding: 1.625rem var(--pad) 5.5rem;
  display: flex; justify-content: center; text-align: center;
}
.lp-delivery span {
  /* Permanent Marker was bonfire's hand voice. Select has ONE face and says so:
     a face only gets a slot if it has a job no other face can do, and the
     selection mark carries the identity here. Figtree's heaviest weight does
     this job. */
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2.125rem);
  color: var(--lp-positive-text);
  transform: rotate(-1.5deg);
}

/* ---------- statements ---------- */
.lp-statements {
  padding: clamp(3.5rem, 6vw, 5.375rem) var(--pad);
  display: flex; flex-direction: column; align-items: center; gap: 3.25rem; text-align: center;
}
.lp-statements .lp-statement { font-size: clamp(1.25rem, 0.9rem + 1.5vw, 2.125rem); line-height: 1.35; max-width: 56rem; color: var(--lp-muted); font-weight: 400; }
.lp-statements .lp-lead { color: var(--lp-ink); font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem); line-height: 1.12; max-width: 56rem; }

/* ---------- closer ---------- */
.lp-closer {
  background: var(--lp-surface);
  padding: clamp(3rem, 5vw, 5rem) var(--pad);
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.lp-closer .lp-statement { font-size: clamp(1.4rem, 1rem + 2vw, 2.625rem); line-height: 1.22; max-width: 53.75rem; text-align: center; }
.lp-colophon { font-size: 0.8rem; color: var(--lp-muted); }
/* The footer links are the only links on these pages, and they are the ones a
   regulator looks for. Underlined, so they read as links. */
.lp-colophon a { color: var(--lp-ink); text-decoration: underline; text-decoration-color: var(--lp-line); text-underline-offset: 3px; }
.lp-colophon a:hover { text-decoration-color: currentColor; }

/* ── narrow screens ───────────────────────────────────────────────────────
   The form stacks, and the funnel becomes a rail.

   Full width, the funnel stops working: each band tapers by a few percent of a
   390px screen, so the narrowing is invisible, and consecutive bands merge into
   one black shape with the copy stranded somewhere after it. Standing the
   funnel in a narrow column on the left restores both — the taper is obvious
   at 5rem wide, and each stage's copy sits beside its own band instead of
   below an unrelated one.
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 60rem) {
  .lp-rows {
    /* The rail is a variable because the figure's size is derived from it below.
       They used to be two independent clamps on different curves, which is how
       the numbers came to overflow: both bottomed out at their own minimum, and
       nothing checked that pairing against the narrowest band.

       Wider on a tablet, where there is room, without ever getting so wide that
       the copy column is squeezed. The 6.5rem floor is what makes the last band
       hold three digits on a 390px screen. */
    --rail: clamp(6.5rem, 13vw, 8rem);
    grid-template-columns: var(--rail) 1fr;
    column-gap: clamp(1.25rem, 3vw, 2rem);
    row-gap: 0;
    align-items: stretch;
  }

  .lp-side, .lp-side--right {
    text-align: left;
    align-items: flex-start;
    padding: 1.25rem 0;
  }

  /* Both are decoration rather than argument. The scattered cards read as
     input pouring into the funnel's mouth only while the funnel is centred
     under them; against a rail on the left they are a floating cluster
     attached to nothing. */
  .lp-art,
  .lp-inflow { display: none; }

  /* The bands stack into one continuous rail; the copy runs alongside. Rows are
     placed explicitly because the desktop order alternates sides, and one band
     answers to two blocks of copy. */
  .lp-band { min-height: 0; }
  .lp-rows > :nth-child(2)  { grid-area: 1 / 1; }   /* processed  */
  .lp-rows > :nth-child(1)  { grid-area: 1 / 2; }
  .lp-rows > :nth-child(5)  { grid-area: 2 / 1; }   /* outliers   */
  .lp-rows > :nth-child(6)  { grid-area: 2 / 2; }
  .lp-rows > :nth-child(8)  { grid-area: 3 / 1; }   /* filtered   */
  .lp-rows > :nth-child(7)  { grid-area: 3 / 2; }
  .lp-rows > :nth-child(11) { grid-area: 4 / 1; }   /* kept       */
  .lp-rows > :nth-child(10) { grid-area: 4 / 2; }
  .lp-rows > :nth-child(14) { grid-area: 5 / 1; }   /* the neck   */
  .lp-rows > :nth-child(12) { grid-area: 5 / 2; }
  .lp-rows > :nth-child(13),
  .lp-rows > :nth-child(15) { display: none; }      /* desktop spacers */

  /* The figure has to fit the rail, so it gives up the display size it has on
     desktop. The shape carries the drama here; the copy carries the detail.

     Sized FROM the rail rather than from the viewport, so the fit holds at every
     width instead of only the one it was eyeballed at. A band is a fixed
     fraction of the rail, so a fixed fraction of the rail is the only size that
     cannot drift out of it.

     0.14 comes from the narrowest band, not the longest number: the neck is 30%
     of the rail at mid-height and has to hold "773", which needs 1.8em. That is
     tighter than "781,011" in the mouth, and it leaves every figure 1.2x more
     room than it uses. */
  .lp-band span {
    font-size: calc(var(--rail) * 0.14);
    letter-spacing: -0.01em;
  }

}
