/* Data reports (/reports/*). Inherits tokens from styles.css; follows DESIGN.md:
   white canvas, hairlines, one object-card language, black actions, red identity.
   Chart colours are the dataviz reference palette, used only inside figures. */

.rp {
  --rp-slop: #c62828;
  --rp-mixed: #a86400;
  --rp-info: #067a06;
  --rp-third: #1baf7a;    /* aqua: third-party sponsors */
  --rp-promo: #4a3aa7;    /* violet: channel self-promotion */
  --rp-hub: #e34948;      /* HubSpot family */
  --rp-none: #d4d4d8;
  --rp-l0: #cde2fb; --rp-l1: #9ec5f4; --rp-l2: #5598e7; --rp-l3: #256abf; --rp-l4: #104281;
  --rp-grid: #ececea;
  --rp-axis: #c3c2b7;
  --rp-muted: #898781;
  max-width: 1000px;
}
.doc-page main.doc:has(.rp) { max-width: 1080px; }
.doc article.rp { max-width: 1000px; }

.rp .kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); margin: 0 0 14px; }
.rp h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.06; letter-spacing: -0.04em; margin: 0 0 18px; text-wrap: balance; max-width: 17ch; }
.rp h1 em { font-style: normal; color: var(--accent); }
.rp .lede { font-size: 18px; max-width: 64ch; }
.rp p a, .rp li a, .rp .rp-note a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(15,15,15,.3); text-underline-offset: 2px; }
.rp p a:hover, .rp li a:hover { text-decoration-color: currentColor; }
.rp-byline { font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 0; }
.rp-byline a { color: var(--ink-2); }

/* ---- stat band ------------------------------------------------------- */
.rp-stats {
  margin: 34px 0 10px; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface-1); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 20px 44px -30px rgba(0,0,0,.18); overflow: hidden;
}
.rp-stat { padding: 20px 20px 18px; border-left: 1px solid var(--line); min-width: 0; }
.rp-stat:first-child { border-left: 0; }
.rp-stat .v { font-size: clamp(30px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; color: var(--ink); }
.rp-stat .v small { font-size: .5em; font-weight: 650; letter-spacing: -0.01em; color: var(--ink-3); }
.rp-stat .l { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 860px) {
  .rp-stats { grid-template-columns: 1fr 1fr; }
  .rp-stat:nth-child(3) { border-left: 0; }
  .rp-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---- sections -------------------------------------------------------- */
.rp-sec { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 34px; }
.rp-sec > h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 12px; max-width: 30ch; text-wrap: balance; }
.rp-sec > p, .rp-sec .rp-p { color: var(--ink-2); line-height: 1.7; max-width: 68ch; }
.rp-note { font-size: 13px; color: var(--ink-3); line-height: 1.55; max-width: 72ch; }
.rp-note a { color: var(--ink-2); }

/* ---- figure card ----------------------------------------------------- */
.rp-fig {
  margin: 22px 0 8px; padding: 20px 20px 16px; background: var(--surface-1);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 20px 44px -30px rgba(0,0,0,.18);
  position: relative;
}
.rp-fig h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 2px; }
.rp-fig .sub { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.rp-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.rp-fig svg text { font-family: inherit; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 10px 0 0; padding: 0; list-style: none; }
.rp-legend li { display: inline-flex; align-items: center; gap: 7px; }
.rp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.rp-legend i.dot { border-radius: 50%; }
.rp-tip {
  position: fixed; z-index: var(--z-top); pointer-events: none; max-width: 300px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 32px -16px rgba(0,0,0,.28);
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2); opacity: 0; transform: translateY(4px);
  transition: opacity .12s var(--ease-out), transform .12s var(--ease-out);
}
.rp-tip.on { opacity: 1; transform: none; }
.rp-tip strong { color: var(--ink); font-weight: 650; display: block; }
.rp-table-toggle { margin-top: 10px; font-size: 12.5px; }
.rp-table-toggle summary { cursor: pointer; color: var(--ink-3); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.rp-table th, .rp-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rp-table th { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.rp-table td.n, .rp-table th.n { text-align: right; }

/* ---- two-up ---------------------------------------------------------- */
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .rp-two { grid-template-columns: 1fr; } }

/* ---- bar list (phrases, brands) ------------------------------------- */
.rp-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rp-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.rp-bars .t { font-size: 14px; color: var(--ink); line-height: 1.4; }
.rp-bars .n { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-bars .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #f1f1ef; overflow: hidden; }
.rp-bars .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--ink); width: 0; transition: width .9s var(--ease-out); }
.rp-bars.in .fill { width: var(--w); }
@media (prefers-reduced-motion: reduce) { .rp-bars .fill { transition: none; width: var(--w); } }

/* ---- stamps ---------------------------------------------------------- */
.stamp {
  --c: var(--rp-mixed);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  color: var(--c); padding: 6px 8px 5px 10px; border: 2px solid var(--c); border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 3px var(--c);
  transform: rotate(-7deg); white-space: nowrap; background: rgba(255,255,255,.7);
  mix-blend-mode: multiply;
}
.stamp.slop { --c: var(--rp-slop); }
.stamp.mixed { --c: var(--rp-mixed); }
.stamp.informative { --c: var(--rp-info); }
.stamp.big { font-size: 15px; padding: 8px 10px 7px 13px; }

/* ---- card wall ------------------------------------------------------- */
.rp-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin: 22px 0 16px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chip {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-1);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 6px 12px; cursor: pointer;
  transition: background .15s var(--ease-out), color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.rp-chip:hover { border-color: #bdbdbd; color: var(--ink); }
.rp-chip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.rp-chip .c { font-weight: 500; opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.rp-sort { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.rp-sort select { font: inherit; font-size: 13px; color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 8px; background: #fff; }

.rp-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .rp-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .rp-wall { grid-template-columns: 1fr; } }
.vcard {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 16px 16px 14px; background: var(--surface-1); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 36px -30px rgba(0,0,0,.2);
}
.vcard[hidden] { display: none; }
.vcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.vcard .date { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vcard h3 { font-size: 15px; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; margin: 2px 0 0; }
.vcard h3 a { color: var(--ink); text-decoration: none; }
.vcard h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.vcard .top > div { min-width: 0; }
.vcard .stamp { flex: none; margin-top: 2px; font-size: 10.5px; padding: 5px 6px 4px 8px; letter-spacing: .12em; }
.meter { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); }
.meter .bar { height: 6px; border-radius: 3px; background: #f0f0ee; position: relative; overflow: hidden; }
.meter .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 0 3px 3px 0; background: var(--ink); }
.meter b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.vcard .facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.vcard .facts span { white-space: nowrap; }
.vcard .facts .k { color: var(--ink); }
.vcard .facts .k::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; background: var(--rp-none); }
.vcard .facts .k.hub::before { background: var(--rp-hub); }
.vcard .facts .k.third::before { background: var(--rp-third); }
.vcard .facts .k.self::before { background: var(--rp-promo); }
.vcard .hslink { margin: -2px 0 0; font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.vcard .hslink a { color: var(--critical-ink); }
.rp code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: #f4f4f3; border-radius: 5px; padding: 1px 5px; color: var(--ink); }
.vcard details { font-size: 13px; }
.vcard summary { cursor: pointer; color: var(--ink-3); font-size: 12.5px; list-style: none; }
.vcard summary::-webkit-details-marker { display: none; }
.vcard summary::before { content: "+"; display: inline-block; width: 14px; font-weight: 700; color: var(--ink-2); }
.vcard details[open] summary::before { content: "\2212"; }
.vcard .q { margin: 10px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line-2); color: var(--ink-2); line-height: 1.5; }
.vcard .q .lab { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.vcard .q a { font-variant-numeric: tabular-nums; color: #1f66b8; font-size: 12px; white-space: nowrap; }
.vcard .q.low { border-left-color: var(--rp-slop); }
.vcard .q.high { border-left-color: var(--rp-info); }
.rp-more { display: flex; justify-content: center; margin: 18px 0 0; }
.rp-more button { font: inherit; font-size: 14px; font-weight: 600; background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 18px; cursor: pointer; }
.rp-more button:hover { border-color: #bdbdbd; }

/* stamp slam: cards that scroll in get their stamp pressed on, once */
@media (prefers-reduced-motion: no-preference) {
  .js-stamps .vcard .stamp { opacity: 0; transform: rotate(-7deg) scale(1.7); }
  .js-stamps .vcard.stamped .stamp {
    opacity: 1; transform: rotate(-7deg) scale(1);
    transition: opacity .14s var(--ease-out), transform .26s cubic-bezier(.3, 1.5, .5, 1);
    transition-delay: var(--d, 0ms);
  }
}

/* ---- CTA ------------------------------------------------------------- */
.rp-cta {
  margin-top: 22px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px;
}
@media (max-width: 820px) { .rp-cta { grid-template-columns: 1fr; } }
.rp-cta .box { padding: 22px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface-1);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 20px 44px -30px rgba(0,0,0,.18); }
.rp-cta h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.02em; }
.rp-cta p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.6; font-size: 14.5px; }
.rp-cta .btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; font-weight: 650; font-size: 15px;
  padding: 11px 16px; border-radius: 10px; text-decoration: none; }
.rp-cta .btn:hover { background: #2a2a2a; }
.rp-cta .links { display: grid; gap: 8px; font-size: 14px; }
.rp-cta .links a { color: var(--ink); font-weight: 600; }
.rp-cta .links span { color: var(--ink-3); font-size: 13px; font-weight: 400; }

/* ---- method ---------------------------------------------------------- */
.rp-rubric { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; max-width: 760px; }
.rp-rubric li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rp-rubric li:first-child { border-top: 0; }
.rp-rubric b { font-variant-numeric: tabular-nums; color: var(--ink); }
.rp-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; max-width: 760px; }
.rp-kv div { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.rp-kv b { display: block; font-size: 22px; letter-spacing: -0.03em; color: var(--ink); }
.rp-kv span { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 620px) { .rp-kv { grid-template-columns: 1fr; } }
.rp-disclaimer { margin-top: 34px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; max-width: 76ch; }
