/* ==========================================================================
   CogniPulse new site: sections B (work package P4).
   Port of the approved design's page CSS for the card_grid layouts
   (ledger, scan-rows, rows, measures, tiles, steps, rules) and the
   chip_list "when" layout, from design/site/src/pages/home.css,
   performance-execution.css and productivity-scan.css.
   Transform (IMPLEMENTATION-PLAN 1.2): #view-home / #view-performance-execution /
   #view-productivity-scan -> #cp-site; .cp-js #view-x -> .cp-js #cp-site.
   Rules are otherwise verbatim. Components: src/components/next/blocks/
   NextCardGrid.tsx, NextChipList.tsx; figures under src/components/next/figures/.
   Loaded only inside the next chrome (NextSiteShell), after kit.css and
   sections-a.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   LEDGER ("Four solutions, four questions"), from home.css
   -------------------------------------------------------------------------- */
#cp-site .hm-questions { --cp-pb: 96px; }
/* the "Enterprise system" badge on a light row (the kit's badge is drawn for dark grounds) */
#cp-site .hm-questions .cp-badge--enterprise {
  color: var(--fig-warn);
  background: color-mix(in srgb, var(--fig-warn) 8%, transparent);
  border-color: color-mix(in srgb, var(--fig-warn) 30%, transparent);
}
#cp-site .hm-questions .cp-badge--enterprise::before { background: var(--fig-warn); }
#cp-site .hm-questions__lead { margin-top: 20px; }
#cp-site .hm-questions__all { margin-top: 40px; }
@media (max-width: 767px) { #cp-site .hm-questions { --cp-pb: 56px; } }

/* --------------------------------------------------------------------------
   STEPS on a white ground ("How it works" on Home), from home.css
   (on Productivity Scan the steps section is .ps-how, which has no page rule)
   -------------------------------------------------------------------------- */
#cp-site .hm-how { --cp-pb: 112px; }
@media (max-width: 1023px) { #cp-site .hm-how { --cp-pb: 88px; } }
@media (max-width: 767px) { #cp-site .hm-how { --cp-pb: 64px; } }

/* --------------------------------------------------------------------------
   FOR / WHEN: full-width line, then the three situations as three columns
   (chip_list "when"), from performance-execution.css
   -------------------------------------------------------------------------- */
#cp-site .pe-for { --cp-pt: 96px; --cp-pb: 96px; }
#cp-site .pe-for__who {
  font-size: clamp(30px, 3.6vw, 48px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.1; color: var(--cp-ink);
}
#cp-site .pe-for__when {
  margin-top: var(--cp-space-7);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--cp-col-gap);
  font-size: var(--cp-fs-large); font-weight: 300; letter-spacing: -0.015em; line-height: 1.35; color: var(--cp-ink);
}
#cp-site .pe-for__when strong {
  grid-column: 1 / -1; display: block; margin-bottom: var(--cp-space-5);
  font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--cp-ink);
}
#cp-site .pe-for__when span {
  display: block; position: relative;
  padding: 22px 18% 0 0;
  border-top: 1px solid var(--cp-line-strong);
  text-wrap: balance;
}
#cp-site .pe-for__when span::before {   /* a leak mark on the rule */
  content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid #8E8E98; background: var(--cp-tint);
}
@media (max-width: 767px) {
  #cp-site .pe-for { --cp-pt: 64px; --cp-pb: 64px; }
  #cp-site .pe-for__when { grid-template-columns: minmax(0, 1fr); row-gap: 0; margin-top: var(--cp-space-6); }
  #cp-site .pe-for__when strong { margin-bottom: var(--cp-space-4); }
  #cp-site .pe-for__when span { padding: 16px 0 16px 24px; }
  #cp-site .pe-for__when span { text-wrap: wrap; }
  #cp-site .pe-for__when span:last-child { border-bottom: 1px solid var(--cp-line-strong); }
  #cp-site .pe-for__when span::before { top: calc(16px + 0.68em - 4.5px); }
}

/* --------------------------------------------------------------------------
   SCAN ROWS ("Its scans"), from performance-execution.css
   -------------------------------------------------------------------------- */
#cp-site .pe-scans__list { list-style: none; margin: 0; padding: 0; }
#cp-site .pe-scan {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--cp-col-gap);
  align-items: center;
  padding-block: var(--cp-space-8);
  border-top: 1px solid var(--cp-line);
}
#cp-site .pe-scan:first-child { border-top: 0; padding-top: 0; }
#cp-site .pe-scan:last-child { padding-bottom: 0; }
#cp-site .pe-scan__copy { grid-column: 1 / span 5; grid-row: 1; }
#cp-site .pe-scan__pic { grid-column: 7 / span 6; grid-row: 1; }
#cp-site .pe-scan--flip .pe-scan__copy { grid-column: 8 / span 5; }
#cp-site .pe-scan--flip .pe-scan__pic { grid-column: 1 / span 6; }

#cp-site .pe-pos { display: flex; align-items: center; width: 76px; height: 10px; position: relative; margin-bottom: var(--cp-space-5); }
#cp-site .pe-pos::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: var(--cp-gradient); opacity: 0.35;
  clip-path: polygon(0 0, 100% 30%, 100% 70%, 0 100%);
}
#cp-site .pe-pos i { position: relative; flex: 1; display: flex; justify-content: center; }
#cp-site .pe-pos i::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cp-white); border: 1px solid #A1A1AA; }
#cp-site .pe-pos i.is-on::before { width: 9px; height: 9px; border: 0; background: var(--cp-indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18); }

#cp-site .pe-scan__name {
  font-size: clamp(26px, 2.5vw, 34px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.12; color: var(--cp-ink);
  text-wrap: balance;
}
#cp-site .pe-scan__name a { color: inherit; text-decoration: none; transition: color var(--cp-dur) var(--cp-ease); }
#cp-site .pe-scan__name a:hover { color: var(--cp-navy); }
#cp-site .pe-scan__text {
  margin-top: var(--cp-space-4);
  font-size: var(--cp-fs-lead); font-weight: 300; line-height: 1.55; color: var(--cp-muted);
  max-width: 30em;
}
#cp-site .pe-scan .cp-link { margin-top: var(--cp-space-6); }

/* the four instrument panels: one frame, one height */
#cp-site .pe-panel { margin: 0; }
/* page-only figure tones (no kit token for these): light by default, dark inside a dark surface */
#cp-site { --pe-fig-influence: #A21CAF; --pe-fig-hub-ring: rgba(79, 70, 229, 0.10); --pe-fig-hub-halo: rgba(162, 28, 175, 0.45); }
#cp-site .cp-band--dark, #cp-site .cp-on-dark, #cp-site .cp-core, #cp-site .cp-dark-surface, #cp-site .cp-fig-dark { --pe-fig-influence: #E9A8FF; --pe-fig-hub-ring: rgba(165, 180, 252, 0.18); --pe-fig-hub-halo: rgba(242, 27, 254, 0.35); }
#cp-site .pe-inst {
  --pe-body-h: 272px;
  padding: 22px 26px 24px;
}
#cp-site .pe-inst__head { margin-bottom: 20px; align-items: center; }
#cp-site .pe-inst__body { position: relative; height: var(--pe-body-h); display: flex; flex-direction: column; justify-content: center; }
#cp-site .pe-svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Decision Scan scatter: Home's chart, compact */
#cp-site .pe-plot { --s: 0.62; position: relative; height: 100%; padding: 2px 4px 40px 46px; }
#cp-site .pe-plot__area {
  position: relative; height: 100%;
  border-left: 1px solid var(--fig-line-strong);
  border-bottom: 1px solid var(--fig-line-strong);
}
#cp-site .pe-plot__grid { position: absolute; background: var(--fig-line); }
#cp-site .pe-plot__grid--x { top: 0; bottom: 0; width: 1px; left: calc(var(--p) * 100%); }
#cp-site .pe-plot__grid--y { left: 0; right: 0; height: 1px; bottom: calc(var(--p) * 100%); }
#cp-site .pe-plot__thr { position: absolute; z-index: 1; }
#cp-site .pe-plot__thr--x { top: 0; bottom: 0; width: 0; left: calc(var(--p) * 100%); border-left: 1px dashed var(--fig-line-strong); }
#cp-site .pe-plot__thr--y { left: 0; right: 0; height: 0; bottom: calc(var(--p) * 100%); border-top: 1px dashed var(--fig-line-strong); }
#cp-site .pe-plot__zone { position: absolute; }
#cp-site .pe-plot__zone--hidden { left: 0; width: 40%; top: 0; height: 30%; background: var(--fig-zone-sky); }
#cp-site .pe-plot__zone--anchor { left: 70%; right: 0; top: 0; height: 30%; background: var(--fig-zone-emerald); }
#cp-site .pe-plot__zone--risk { left: 70%; right: 0; top: 60%; bottom: 0; background: var(--fig-zone-rose); }
#cp-site .pe-plot__pts { position: absolute; inset: 0; z-index: 2; }
#cp-site .pe-plot__pts i {
  position: absolute; left: calc(var(--x) * 100%); bottom: calc(var(--y) * 100%);
  width: calc(var(--d) * var(--s) * 1px); height: calc(var(--d) * var(--s) * 1px);
  transform: translate(-50%, 50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--fig-point) 72%, transparent);
  box-shadow: 0 0 0 1px var(--fig-bg);
}
#cp-site .pe-plot__yticks, #cp-site .pe-plot__xticks {
  position: absolute; font-family: var(--cp-mono); font-size: 11px; line-height: 1; color: var(--fig-muted);
  font-variant-numeric: tabular-nums;
}
#cp-site .pe-plot__yticks { right: calc(100% + 8px); top: 0; bottom: 0; }
#cp-site .pe-plot__yticks span { position: absolute; right: 0; bottom: calc(var(--p) * 100%); transform: translateY(50%); }
#cp-site .pe-plot__xticks { left: 0; right: 0; top: calc(100% + 9px); }
#cp-site .pe-plot__xticks span { position: absolute; left: calc(var(--p) * 100%); transform: translateX(-50%); }
#cp-site .pe-plot__xticks span:first-child { transform: none; }
#cp-site .pe-plot__xticks span:last-child { transform: translateX(-100%); }
#cp-site .pe-plot__xtitle {
  position: absolute; left: 46px; right: 4px; bottom: 0; text-align: center;
  font-size: 13px; line-height: 1; color: var(--fig-muted);
}
#cp-site .pe-plot__ytitle {
  position: absolute; left: 0; top: 2px; bottom: 40px;
  writing-mode: vertical-rl; transform: rotate(180deg); text-align: center;
  font-size: 13px; line-height: 1; color: var(--fig-muted);
}

/* network */
#cp-site .pe-ln { stroke: var(--fig-line-strong); stroke-width: 1; stroke-linecap: round; }
#cp-site .pe-ln--c { stroke-opacity: 0.85; }
#cp-site .pe-ln--a { stroke: var(--fig-accent); stroke-dasharray: 4 3; stroke-opacity: 0.9; }
#cp-site .pe-ln--i { stroke: var(--pe-fig-influence); stroke-dasharray: 1 3; stroke-width: 1.5; }
#cp-site .pe-ln--far { stroke-opacity: 0.5; }
#cp-site .pe-node { fill: var(--fig-point); stroke: var(--fig-bg); stroke-width: 1.5; }
#cp-site .pe-node--far { fill: var(--fig-line-strong); }
#cp-site .pe-hub { fill: var(--fig-text); }
#cp-site .pe-hub-ring { fill: var(--pe-fig-hub-ring); stroke: var(--fig-accent); stroke-width: 1; }
#cp-site .pe-hub-halo { fill: none; stroke: var(--pe-fig-hub-halo); stroke-width: 1.2; stroke-dasharray: 2 3; }
#cp-site .pe-net-wrap { flex: 1 1 auto; min-height: 0; }
#cp-site .pe-legend {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--fig-line);
  font-family: var(--cp-mono); font-size: 12px; line-height: 1.5; color: var(--fig-muted);
}
#cp-site .pe-legend > span { display: inline-flex; align-items: center; gap: 7px; }
#cp-site .pe-legend > span::before { content: ""; width: 16px; height: 0; border-top: 1.5px solid var(--fig-line-strong); }
#cp-site .pe-legend > .pe-legend--a::before { border-top: 1.5px dashed var(--fig-accent); }
#cp-site .pe-legend > .pe-legend--i::before { border-top: 2px dotted var(--pe-fig-influence); }

/* meters: the same reading as on the Productivity Scan page (zone colors, ticks at 0.4 and 0.7) */
#cp-site .pe-meters { --cp-meter-label: 156px; gap: 20px; }
#cp-site .pe-meters .cp-meter-scale { margin-top: 0; }

/* epistemic health: statement bars */
#cp-site .pe-stmts { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
#cp-site .pe-stmt { display: grid; grid-template-columns: minmax(0, 1fr) 84px; align-items: center; gap: var(--cp-space-5); }
#cp-site .pe-stmt__bar { position: relative; height: 22px; }
#cp-site .pe-stmt__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 100%); border-radius: 5px; transform-origin: left center; }
#cp-site .pe-stmt--checked .pe-stmt__bar i {
  background: linear-gradient(90deg, color-mix(in srgb, var(--fig-ok) 32%, transparent), color-mix(in srgb, var(--fig-ok) 14%, transparent));
  border-left: 2px solid var(--fig-ok);
}
#cp-site .pe-stmt--assumed .pe-stmt__bar i {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--fig-warn) 20%, transparent) 0 5px, transparent 5px 10px);
  border: 1px dashed color-mix(in srgb, var(--fig-warn) 70%, transparent);
}
#cp-site .pe-stmt__tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--cp-mono); font-size: 12px; line-height: 1; }
#cp-site .pe-stmt--checked .pe-stmt__tag { color: var(--fig-ok); }
#cp-site .pe-stmt--assumed .pe-stmt__tag { color: var(--fig-warn); }
#cp-site .pe-stmt__tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
#cp-site .pe-stmt--checked .pe-stmt__tag::before { background: currentColor; }
#cp-site .pe-stmt--assumed .pe-stmt__tag::before { border: 1px dashed currentColor; }

/* SCROLL-IN: each panel plays one short entrance (figures only; text never moves) */
/* Decision Scan: points appear from left to right, thresholds draw */
.cp-js #cp-site .pe-plot__pts i { opacity: 0; scale: 0.2; transition: opacity 260ms var(--cp-ease-out), scale 500ms cubic-bezier(0.34, 1.4, 0.5, 1); transition-delay: calc(200ms + var(--x) * 700ms); }
.cp-js #cp-site .is-inview .pe-plot__pts i { opacity: 1; scale: 1; }
.cp-js #cp-site .pe-plot__thr--x { transform: scaleY(0); transform-origin: bottom; transition: transform 700ms var(--cp-ease-out) 100ms; }
.cp-js #cp-site .pe-plot__thr--y { transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--cp-ease-out) 100ms; }
.cp-js #cp-site .is-inview .pe-plot__thr { transform: none; }
/* ONA: the hub appears, then its links and people, nearest first */
.cp-js #cp-site .pe-net .pe-hubg { opacity: 0; transform: scale(0.5); transform-box: fill-box; transform-origin: center; transition: opacity 300ms var(--cp-ease-out) 150ms, transform 600ms cubic-bezier(0.34, 1.4, 0.5, 1) 150ms; }
.cp-js #cp-site .pe-net line { opacity: 0; transition: opacity 400ms var(--cp-ease-out) calc(350ms + var(--k) * 650ms); }
.cp-js #cp-site .pe-net .pe-node { opacity: 0; transition: opacity 300ms var(--cp-ease-out) calc(400ms + var(--k) * 650ms); }
.cp-js #cp-site .is-inview .pe-net .pe-hubg { opacity: 1; transform: none; }
.cp-js #cp-site .is-inview .pe-net line, .cp-js #cp-site .is-inview .pe-net .pe-node { opacity: 1; }
/* Productivity Scan: the kit's meter fill runs when the panel is in view (data-inview) */
/* Epistemic Health: the statement bars grow, one after another */
.cp-js #cp-site .pe-stmt__bar i { transform: scaleX(0); transition: transform 700ms var(--cp-ease-out) calc(150ms + var(--i) * 90ms); }
.cp-js #cp-site .is-inview .pe-stmt__bar i { transform: none; }
.cp-js #cp-site .pe-stmt__tag { opacity: 0; transition: opacity 300ms var(--cp-ease-out) calc(550ms + var(--i) * 90ms); }
.cp-js #cp-site .is-inview .pe-stmt__tag { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cp-js #cp-site .pe-plot__pts i, .cp-js #cp-site .pe-net line, .cp-js #cp-site .pe-net .pe-node, .cp-js #cp-site .pe-net .pe-hubg,
  .cp-js #cp-site .pe-stmt__tag { opacity: 1; scale: 1; }
  .cp-js #cp-site .pe-plot__thr, .cp-js #cp-site .pe-net .pe-hubg, .cp-js #cp-site .pe-stmt__bar i { transform: none; }
}

#cp-site .pe-scans { --cp-pb: var(--cp-space-9); }
@media (max-width: 767px) { #cp-site .pe-scans { --cp-pb: var(--cp-space-8); } }

@media (max-width: 899px) {
  #cp-site .pe-scan { row-gap: var(--cp-space-6); }
  #cp-site .pe-scan__copy,
  #cp-site .pe-scan--flip .pe-scan__copy { grid-column: 1 / -1; grid-row: 1; }
  #cp-site .pe-scan__pic,
  #cp-site .pe-scan--flip .pe-scan__pic { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: 600px; }
}
@media (max-width: 767px) {
  #cp-site .pe-scan { padding-block: var(--cp-space-7); }
  #cp-site .pe-inst { --pe-body-h: 248px; padding: 18px 16px 20px; }
  #cp-site .pe-inst--meters { --pe-body-h: auto; }
  #cp-site .pe-inst--meters .pe-inst__body { min-height: 248px; }
  #cp-site .pe-meters { gap: 14px; }
  #cp-site .pe-stmt { grid-template-columns: minmax(0, 1fr) 74px; gap: var(--cp-space-4); }
  #cp-site .pe-plot { padding-left: 44px; }
  #cp-site .pe-plot__xtitle { left: 44px; }
}

/* --------------------------------------------------------------------------
   ROWS ("Who it's for"): three situations as large ruled rows,
   from productivity-scan.css
   -------------------------------------------------------------------------- */
#cp-site .ps-who__rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--cp-line); }
#cp-site .ps-who__row {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--cp-col-gap); align-items: baseline;
  padding: 40px 0 42px; border-top: 1px solid var(--cp-line);
}
#cp-site .ps-who__row::before {          /* a short ink rule where each situation starts */
  content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 1px; background: var(--cp-ink);
}
#cp-site .ps-who__title {
  font-size: clamp(26px, 2.9vw, 40px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--cp-ink); text-wrap: balance; max-width: 18em;
}
#cp-site .ps-who__text { font-size: 18px; font-weight: 300; line-height: 1.6; color: var(--cp-muted); max-width: 36ch; }

/* --------------------------------------------------------------------------
   MEASURES ("What it measures"), from productivity-scan.css
   -------------------------------------------------------------------------- */
#cp-site .ps-dims { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--cp-line); }
#cp-site .ps-dim {
  display: grid; align-items: center;
  grid-template-columns: 40px minmax(0, 240px) minmax(0, 1fr) minmax(0, 420px);
  grid-template-areas: "num name text meter";
  column-gap: var(--cp-col-gap); padding: 30px 0;
  border-top: 1px solid var(--cp-line);
}
#cp-site .ps-dim__num {
  grid-area: num; align-self: center;
  font-family: var(--cp-mono); font-size: 13px; color: var(--cp-muted);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--cp-line-strong); background: var(--cp-white);
}
#cp-site .ps-dim__name {
  grid-area: name; font-size: clamp(20px, 1.7vw, 24px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.25; color: var(--cp-ink);
}
#cp-site .ps-dim__text { grid-area: text; font-size: 16px; font-weight: 300; line-height: 1.6; color: var(--cp-muted); max-width: 40ch; }
#cp-site .ps-dim__meter { grid-area: meter; --cp-meter-label: 50px; }
#cp-site .ps-dim__tag { font-family: var(--cp-mono); font-size: 11px; color: var(--cp-muted); letter-spacing: 0.02em; }

/* --------------------------------------------------------------------------
   TILES ("What you get"), from productivity-scan.css
   -------------------------------------------------------------------------- */
#cp-site .ps-tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px;
}
#cp-site .ps-tile {
  grid-column: span 4;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; align-content: start;
  padding: 28px 28px 30px; border: 1px solid var(--cp-line); border-radius: var(--cp-r-lg);
  background: var(--cp-ground);
}
#cp-site .ps-tile__icon {
  grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cp-white); border: 1px solid var(--cp-line); color: var(--cp-navy);
}
#cp-site .ps-tile__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#cp-site .ps-tile__title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; color: var(--cp-ink); padding-top: 2px; }
#cp-site .ps-tile__text { margin-top: 8px; font-size: 15px; font-weight: 300; line-height: 1.6; color: var(--cp-muted); }

#cp-site .ps-tile--wide {
  grid-template-columns: minmax(0, 1fr); align-content: space-between; min-height: 280px; padding: 36px 40px 40px;
  background: var(--cp-white);
}
#cp-site .ps-tile--a { grid-column: span 7; }
#cp-site .ps-tile--b { grid-column: span 5; }
#cp-site .ps-tile--wide .ps-tile__icon { grid-row: auto; width: 56px; height: 56px; border-radius: 14px; background: var(--cp-ground); margin-bottom: 56px; }
#cp-site .ps-tile--wide .ps-tile__icon svg { width: 30px; height: 30px; }
#cp-site .ps-tile--wide .ps-tile__title { font-size: clamp(24px, 2.1vw, 30px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.15; }
#cp-site .ps-tile--wide .ps-tile__text { margin-top: 12px; font-size: 17px; max-width: 36ch; }
#cp-site .ps-tile--a {
  background:
    linear-gradient(var(--cp-white), var(--cp-white)) padding-box,
    linear-gradient(135deg, var(--cp-line-strong), var(--cp-line)) border-box;
}

/* ---------- Responsive (rows, measures, tiles) ---------- */
@media (max-width: 1199px) {
  #cp-site .ps-dim {
    grid-template-columns: 48px minmax(0, 1fr) minmax(0, 340px);
    grid-template-areas: "num name meter" "num text meter";
    row-gap: 6px;
  }
  #cp-site .ps-dim__num { align-self: start; }
}
@media (max-width: 1023px) {
  #cp-site .ps-tile--a, #cp-site .ps-tile--b { grid-column: span 6; }
  #cp-site .ps-tile { grid-column: span 6; }
  #cp-site .ps-tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  #cp-site .ps-who__row { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding: 32px 0 34px; }
  #cp-site .ps-dim {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas: "num name" "num text" "num meter";
    row-gap: 10px;
  }
  #cp-site .ps-dim__meter { margin-top: 10px; }
}
@media (max-width: 767px) {
  #cp-site .ps-tile, #cp-site .ps-tile--a, #cp-site .ps-tile--b,
  #cp-site .ps-tile:last-child { grid-column: 1 / -1; }
  #cp-site .ps-tile--wide { min-height: 0; padding: 28px; }
  #cp-site .ps-tile--wide .ps-tile__icon { margin-bottom: 28px; }
}
@media (max-width: 559px) {
  #cp-site .ps-dim { grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
  #cp-site .ps-dim__meter { --cp-meter-label: 0px; }
}

/* ==========================================================================
   ROUND 2: shared additions for the 13 pages (layout options, no page look)
   ========================================================================== */
/* card_grid `highlight` as a quiet note under the cards */
#cp-site .cg-note { margin-top: var(--cp-space-7); }
#cp-site .pe-scans .cg-note { margin-top: var(--cp-space-8); }
/* "measures" without sample meters: name and text use the meter's column */
#cp-site .ps-dims--plain .ps-dim {
  grid-template-columns: 40px minmax(0, 320px) minmax(0, 1fr);
  grid-template-areas: "num name text";
}
#cp-site .ps-dims--plain .ps-dim__text { max-width: 60ch; }
#cp-site .ps-dims--nonum .ps-dim {
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  grid-template-areas: "name text";
}
/* "tiles" with a count other than five: equal tiles */
#cp-site .ps-tiles--n2 .ps-tile, #cp-site .ps-tiles--n4 .ps-tile { grid-column: span 6; }
#cp-site .ps-tiles--n3 .ps-tile, #cp-site .ps-tiles--n6 .ps-tile { grid-column: span 4; }
/* the "Enterprise system" badge in a light hero (the kit's badge is drawn for dark grounds) */
#cp-site .cp-hero-badge { margin: 0 0 var(--cp-space-4); }
#cp-site .cp-hero-badge .cp-badge--enterprise {
  color: var(--fig-warn);
  background: color-mix(in srgb, var(--fig-warn) 8%, transparent);
  border-color: color-mix(in srgb, var(--fig-warn) 30%, transparent);
}
#cp-site .cp-hero-badge .cp-badge--enterprise::before { background: var(--fig-warn); }
/* hero caption of a round-2 scan figure: title line, then the values */
#cp-site .cp-figcaption__line { display: block; }
#cp-site .cp-figcaption__line + .cp-figcaption__line { margin-top: 4px; }
#cp-site .ps-tile:not(:has(> .ps-tile__icon)) { grid-template-columns: minmax(0, 1fr); }

/* ==========================================================================
   ROUND 2: DECISION SCAN (worked example; figures in figures/decision-scan.tsx)
   ========================================================================== */
/* hero: the PE scatter, larger, with the zone shares */
#cp-site .ds-hero-fig { margin: 0; }
#cp-site .ds-inst {
  --pe-body-h: 340px;
  padding: 28px 32px 26px;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04), 0 32px 64px -40px rgba(24, 24, 27, 0.22);
}
#cp-site .ds-inst .cp-instrument__title { font-size: 16px; }
#cp-site .ds-inst .pe-plot { --s: 0.8; }
#cp-site .ds-zones {
  list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--fig-line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
#cp-site .ds-zone { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; border-left: 3px solid var(--fig-line); }
#cp-site .ds-zone--anchor { border-left-color: var(--fig-ok); }
#cp-site .ds-zone--hidden { border-left-color: var(--fig-info); }
#cp-site .ds-zone--risk { border-left-color: var(--fig-risk); }
#cp-site .ds-zone__name { font-size: 12px; line-height: 1.3; color: var(--fig-muted); }
#cp-site .ds-zone__share { font-family: var(--cp-mono); font-size: 18px; color: var(--fig-text); font-variant-numeric: tabular-nums; }
#cp-site .ds-hero-fig__cap { margin-top: var(--cp-space-4); font-size: 12px; line-height: 1.6; max-width: 64ch; color: var(--cp-muted); }

/* "The problem": decisions concentrate (schematic; the ps-gap panel) */
#cp-site .ds-conc { margin: 0; padding: 36px 32px 28px; background: var(--cp-ground); border: 1px solid var(--cp-line); border-radius: var(--cp-r-lg); }
#cp-site .ds-conc__plot { position: relative; aspect-ratio: 10 / 7; }
#cp-site .ds-conc__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#cp-site .ds-conc__svg path, #cp-site .ds-conc__svg rect { vector-effect: non-scaling-stroke; fill: none; }
#cp-site .ds-conc__flow { stroke: var(--cp-line-strong); stroke-width: 1.25; }
#cp-site .ds-conc__out { stroke: var(--cp-navy); stroke-width: 2.5; stroke-linecap: round; }
#cp-site .ds-conc__back { stroke: var(--cp-indigo); stroke-width: 1.5; stroke-dasharray: 5 6; }
#cp-site .ds-conc__arrow { stroke: var(--cp-indigo); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#cp-site .ds-conc__fence { stroke: var(--cp-line-strong); stroke-width: 1; stroke-dasharray: 3 5; }
#cp-site .ds-conc__dot { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; }
#cp-site .ds-conc__dot--src { background: var(--cp-white); border: 1.5px solid var(--cp-line-strong); }
#cp-site .ds-conc__dot--hub { width: 22px; height: 22px; margin: -11px 0 0 -11px; background: var(--cp-white); border: 2px solid var(--cp-indigo); box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.14); }
#cp-site .ds-conc__dot--end { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--cp-navy); box-shadow: 0 0 0 4px var(--cp-ground); }
#cp-site .ds-conc__dot--out { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--cp-white); border: 2px solid var(--fig-ok); }
#cp-site .ds-conc__lbl { position: absolute; line-height: 1.3; width: max-content; }
#cp-site .ds-conc__lbl--conc { left: 50%; top: 61%; max-width: 30%; font-size: 15px; color: var(--cp-ink); }
#cp-site .ds-conc__lbl--back { left: 63%; top: 12%; max-width: 30%; font-size: 15px; color: var(--cp-indigo-text); }
#cp-site .ds-conc__lbl--out { left: 59%; top: 90%; max-width: 40%; font-size: 13px; color: var(--cp-muted); }
.cp-js #cp-site .ds-conc__flow, .cp-js #cp-site .ds-conc__out, .cp-js #cp-site .ds-conc__back { stroke-dashoffset: 1; }
.cp-js #cp-site .ds-conc__flow, .cp-js #cp-site .ds-conc__out { stroke-dasharray: 1; transition: stroke-dashoffset 900ms var(--cp-ease-out) calc(var(--i, 8) * 60ms); }
.cp-js #cp-site .ds-conc__back, .cp-js #cp-site .ds-conc__arrow { opacity: 0; transition: opacity 600ms var(--cp-ease) 1100ms; }
.cp-js #cp-site .ds-conc.is-inview .ds-conc__flow, .cp-js #cp-site .ds-conc.is-inview .ds-conc__out { stroke-dashoffset: 0; }
.cp-js #cp-site .ds-conc.is-inview .ds-conc__back, .cp-js #cp-site .ds-conc.is-inview .ds-conc__arrow { opacity: 1; }
@media (max-width: 767px) {
  #cp-site .ds-inst { --pe-body-h: 260px; padding: 20px 18px 20px; }
  #cp-site .ds-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  #cp-site .ds-conc { padding: 24px 14px 18px; }
  #cp-site .ds-conc__plot { aspect-ratio: 10 / 9; }
  #cp-site .ds-conc__lbl--conc, #cp-site .ds-conc__lbl--back { font-size: 12.5px; }
  #cp-site .ds-conc__lbl--conc { left: 2%; top: 84%; max-width: 46%; }
  #cp-site .ds-conc__lbl--back { left: 54%; top: 0; max-width: 46%; }
  #cp-site .ds-conc__lbl--out { left: 54%; top: 92%; max-width: 46%; font-size: 12px; }
}

@media (max-width: 1199px) {
  #cp-site .ps-dims--plain .ps-dim {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas: "num name" "num text";
  }
  #cp-site .ps-dims--nonum .ps-dim {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "name" "text";
  }
}
@media (max-width: 1023px) {
  #cp-site .ps-tiles--n3 .ps-tile, #cp-site .ps-tiles--n6 .ps-tile { grid-column: span 6; }
  #cp-site .ps-tiles--n3 .ps-tile:last-child { grid-column: 1 / -1; }
  #cp-site .ps-tiles--n6 .ps-tile:last-child { grid-column: span 6; }
}
@media (max-width: 767px) {
  #cp-site .ps-tiles[class*="ps-tiles--n"] .ps-tile { grid-column: 1 / -1; }
}
@media (max-width: 559px) {
  #cp-site .ps-dims--plain .ps-dim { grid-template-columns: 40px minmax(0, 1fr); }
  #cp-site .ps-dims--nonum .ps-dim { grid-template-columns: minmax(0, 1fr); }
}
