/* Moved from websites/templates/websites/_page_figures_styles.html (redesign checklist: local CSS out of the
   templates). Loaded only by the pages that include that partial. */

/* A block's lead line inside the report frame: its one figure, beside the
   help note that says how to read the block (DOC_DESIGN_UI_KIT.md §4.15). */
.pf-lead { margin: 0; font-size: 14px; color: var(--color-neutral-700); }
.pf-lead b {
  display: block; font-family: var(--font-heading); font-weight: 800; font-size: 30px;
  line-height: 1.05; letter-spacing: -0.02em; color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.hn-pair > .seo-data-title { margin: 0; }
.pf-counts { margin-top: var(--space-4); }
.pf-snapshot { font-size: 13px; margin: var(--space-3) 0 0; overflow-wrap: anywhere; }

.pf-fig { margin: var(--space-3) 0; }
.pf-fig-title { font-size: 10px; letter-spacing: 0.09em;
  text-transform: uppercase; font-weight: 800; margin: 0 0 var(--space-1);
  color: var(--color-neutral-600); }
.pf-fig-note { font-size: 12px; color: var(--color-neutral-600);
  margin: var(--space-1) 0 0; }

/* Form J — threshold bars. One row per metric, each on ITS OWN scale with
   its own pass tick, because these metrics do not share a unit. */
.pf-track { display: grid; grid-template-columns: minmax(120px, 30%) 1fr 86px;
  gap: var(--space-2); align-items: center; padding: 4px 0; font-size: 13px; }
.pf-track-name { font-weight: 600; }
.pf-track-rail { position: relative; height: 14px;
  background: var(--color-neutral-200); }
.pf-track-rail i { display: block; height: 100%; }
.pf-track-rail i.good { background: var(--mint); }
.pf-track-rail i.warn { background: var(--amber); }
.pf-track-rail i.bad  { background: var(--coral); }
.pf-tick { position: absolute; top: -3px; bottom: -3px; width: 1px;
  background: var(--color-text); opacity: 0.55; }
.pf-tick.fair { opacity: 0.28; }
.pf-track-val { text-align: right; font-weight: 800;
  font-variant-numeric: tabular-nums; }
.pf-track-val small { display: block; font-weight: 500; font-size: 10px;
  color: var(--color-neutral-600); }
/* A track that also wears a quality badge (the Lighthouse panel) gets a
   fourth column for it, so the 86px value column stays a number. */
.pf-track--graded { grid-template-columns: minmax(120px, 30%) 1fr 86px auto; }

/* Form A — the fix list ranked by the time each one saves. */
.pf-opp { display: grid; grid-template-columns: 1fr 1fr 70px;
  gap: var(--space-2); align-items: center; padding: 4px 0; font-size: 13px; }
.pf-opp-name { overflow-wrap: anywhere; }
.pf-opp-bar { height: 12px; background: var(--color-neutral-200); }
.pf-opp-bar i { display: block; height: 100%; background: var(--color-neutral-800); }
.pf-opp:first-of-type .pf-opp-bar i { background: var(--color-text); }
.pf-opp-n { text-align: right; font-weight: 800;
  font-variant-numeric: tabular-nums; }

.pf-legend { display: flex; gap: var(--space-3); flex-wrap: wrap;
  font-size: 11px; color: var(--color-neutral-600); margin-top: var(--space-1); }

@media print {
  .pf-track-rail i, .pf-opp-bar i {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .pf-fig { break-inside: avoid; }
}

/* ——— The other nine sections ——————————————————————————————————— */

/* Content — the heading outline, indented in document order. */
.pf-head-row { display: flex; gap: var(--space-2); align-items: baseline;
  padding: 2px 0; font-size: 12.5px; border-left: 2px solid transparent; }
.pf-head-row.is-skip { border-left-color: var(--coral);
  background: rgba(220,47,24,0.05); }
.pf-head-lvl { font-weight: 800; font-size: 10px; letter-spacing: 0.05em;
  color: var(--color-neutral-500); min-width: 22px; }
.pf-head-txt { overflow-wrap: anywhere; }
.pf-head-flag { font-size: 10.5px; color: var(--coral); white-space: nowrap; }

/* Form C — count histogram. */
.pf-hist { display: flex; align-items: flex-end; gap: var(--space-2);
  height: 84px; border-bottom: 2px solid var(--color-text);
  margin: var(--space-2) 0 0; }
.pf-hist-col { flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; }
.pf-hist-col b { font-size: 12px; font-weight: 800;
  font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.pf-hist-col i { display: block; width: 100%; min-height: 2px;
  background: var(--color-neutral-400); }
.pf-hist-col.accent i { background: var(--mint); }
.pf-hist-key { display: flex; gap: var(--space-2); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-neutral-600); }
.pf-hist-key span { flex: 1; text-align: center; }

/* Form B — 100% stacked. */
.pf-split { display: flex; height: 40px; border: 1px solid var(--color-text);
  margin: var(--space-1) 0 var(--space-2); }
.pf-split div { display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--space-2); min-width: 3px; overflow: hidden; }
.pf-split b { font-size: 14px; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.pf-split span { font-size: 9px; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.pf-split .own    { background: var(--mint); color: var(--white); }
.pf-split .others { background: var(--color-neutral-700); color: var(--white); }
.pf-split .none   { background: var(--color-neutral-200); color: var(--color-text); }

/* Form H — one bar per question, all the same width. */
.pf-multi { display: grid; grid-template-columns: minmax(150px, 46%) 1fr 44px;
  gap: var(--space-2); align-items: center; padding: 3px 0; font-size: 12.5px; }
.pf-multi-name { overflow-wrap: anywhere; }
.pf-multi-bar { display: flex; height: 12px; background: var(--color-neutral-200); }
.pf-multi-bar i { display: block; min-width: 1px; }
.pf-multi-bar i.own,    .pf-legend i.own    { background: var(--mint); }
.pf-multi-bar i.others, .pf-legend i.others { background: var(--color-neutral-700); }
.pf-multi-bar i.none,   .pf-legend i.none   { background: var(--color-neutral-300); }
.pf-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 4px;
  vertical-align: -1px; }

/* Form I — funnel. */
.pf-funnel { display: flex; gap: var(--space-2); margin: var(--space-2) 0; }
.pf-funnel-st { flex: 1; text-align: center; }
.pf-funnel-band { height: 64px; display: flex; align-items: flex-end; }
.pf-funnel-band i { display: block; width: 100%; min-height: 2px;
  background: var(--color-neutral-700); }
.pf-funnel-st b { display: block; font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums; }
.pf-funnel-st span { font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--color-neutral-600); }

/* Form D — overlaid histograms. */
.pf-over { display: flex; align-items: flex-end; gap: var(--space-2);
  height: 96px; border-bottom: 2px solid var(--color-text);
  margin: var(--space-2) 0 0; }
.pf-over-col { flex: 1; position: relative; height: 100%; display: flex;
  align-items: flex-end; }
.pf-over-own { width: 100%; background: var(--color-neutral-700); min-height: 1px; }
.pf-over-other { position: absolute; left: 0; right: 0; bottom: 0;
  border: 2px solid var(--coral); border-bottom: 0; min-height: 2px; }

/* Form G — scatter, one rule, no quadrants. */
.pf-plot { position: relative; height: 200px; margin: var(--space-2) 0;
  border-left: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text); }
.pf-plot-dot { position: absolute; width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--mint); }
.pf-plot-dot.easy { background: var(--coral); }
.pf-plot-hline { position: absolute; left: 0; right: 0; height: 1px;
  background: var(--coral); opacity: 0.6; }

@media print {
  .pf-hist-col i, .pf-split div, .pf-multi-bar i, .pf-funnel-band i,
  .pf-over-own, .pf-plot-dot, .pf-head-row.is-skip {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .pf-hist, .pf-split, .pf-funnel, .pf-over, .pf-plot { break-inside: avoid; }
}
