/* -----------------------------------------------------------------------------
EFR company profiles v2: /company/<slug>/

Agreed with Lars on 19 November 2026 (brief: Claude outputs/company-v2/
claude-code-company-profiles-v2-brief.md, mockups in company-v2/mockups/).
Loaded only by custom-post-company.hbs. Plain CSS outside the Vite build, so it
needs no Node: edit, re-zip, upload. Everything is scoped under .cp.

Markup: the header and content sections are the post's own HTML card, written
by Claude outputs/scripts/render_company_profile.py; the podcast card, stories
and last-updated line come from the template. Both use these classes only.

Colours are the mockups' literals, shared with assets/guide.css. Tailwind's
preflight (assets/built/app.css) zeroes margins, removes list bullets and makes
headings inherit size and weight, so every size, weight and margin here is
explicit.
----------------------------------------------------------------------------- */

.cp {
  --cp-ink: #101a2e;
  --cp-ink-mid: #2a3550;
  --cp-ink-soft: #4e5871;
  --cp-rule: #eedfd6;
  --cp-peach: #ffeee6;
  --cp-link: #0c67df;
  --cp-link-hover: #0a4fae;
  --cp-orange: #d9480f;
  --cp-pale: #f7f8fb;
  --cp-pale-rule: #e3e7ef;
  --cp-pay: #6a3fd1;   --cp-pay-bg: #f0ebfb;
  --cp-lend: #127a5a;  --cp-lend-bg: #e7f4ef;
  --cp-bank: #8e1b45;  --cp-bank-bg: #f6e7ed;
  --cp-gutter: clamp(16px, 4vw, 24px);

  color: var(--cp-ink);
  background: #ffffff;
}

.cp a { color: var(--cp-link); text-decoration: none; }
.cp a:hover { color: var(--cp-link-hover); text-decoration: underline; }

/* Shared small label: glance cells, "Powered by", "In practice", groups */
.cp-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cp-ink-soft);
}

/* ---- Header: breadcrumb, logo tile, kind, H1, glance row (1120px) ---- */
.cp-head { border-bottom: 1px solid var(--cp-rule); }
.cp-head-in {
  max-width: 1120px;
  margin-inline: auto;
  padding: 28px var(--cp-gutter) 36px;
}
.cp-crumb { font-size: 14px; color: var(--cp-ink-soft); margin-bottom: 22px; }

.cp-title {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}
.cp-logo {
  flex: 0 0 200px;
  height: 112px;
  border: 1px solid var(--cp-rule);
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-logo img { display: block; max-width: none; }
.cp-title-text { flex: 1 1 420px; min-width: 0; }
.cp-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cp-orange);
}
.cp-h1 {
  margin: 6px 0 0;
  font-size: 44px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--cp-ink);
}

/* Glance row: one bordered box, equal cells. Hairlines are the box's own
   background showing through a 1px gap, so they stay right however the
   cells wrap. */
.cp-glance {
  display: grid;
  gap: 1px;
  background: var(--cp-rule);
  border: 1px solid var(--cp-rule);
  border-radius: 14px;
  overflow: hidden;
}
.cp-glance-1 { grid-template-columns: minmax(0, 1fr); }
.cp-glance-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-glance-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cp-glance-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cp-glance-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cp-cell { background: #ffffff; padding: 16px 20px; min-width: 0; }
.cp-cell-body {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--cp-ink);
  overflow-wrap: anywhere;
}
.cp-note { color: var(--cp-ink-soft); }

/* Product pills */
.cp-pill {
  display: inline-block;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 12px;
}
.cp-pill-payments { color: var(--cp-pay); background: var(--cp-pay-bg); }
.cp-pill-lending { color: var(--cp-lend); background: var(--cp-lend-bg); }
.cp-pill-banking { color: var(--cp-bank); background: var(--cp-bank-bg); }

/* Provider chips (glance row and "Powered by") */
.cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--cp-pale-rule);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--cp-ink);
  vertical-align: middle;
}
.cp a.cp-chip { color: var(--cp-ink); }
.cp a.cp-chip:hover { border-color: var(--cp-ink-soft); text-decoration: none; }
.cp-chip-logo-wrap { background: #ffffff; }
.cp-chip-logo-wrap img { display: block; max-width: none; }
.cp-chip-text {
  background: var(--cp-pale);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
}

/* ---- Body: single column, 880px ---- */
.cp-body {
  max-width: 928px;   /* 880 + 2 x 24 gutter */
  margin-inline: auto;
  padding-inline: var(--cp-gutter);
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.cp-body-content { padding-top: 44px; }
.cp-body-tail { padding-top: 48px; padding-bottom: 72px; }

.cp-h2 {
  margin: 0 0 18px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--cp-ink);
}
.cp-p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cp-ink-mid);
}

.cp-p + .cp-p { margin-top: 14px; }   /* a second paragraph (Sage's "What is") */

.cp-grid2, .cp-grid3 { display: grid; gap: 20px; }
.cp-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Stats row (enablers) */
.cp-stats .cp-grid3 { margin-bottom: 8px; }
.cp-stat {
  border: 1px solid var(--cp-rule);
  border-radius: 12px;
  padding: 18px 20px;
  background: #ffffff;
}
.cp-stat-value { font-size: 30px; line-height: 1.2; font-weight: 900; letter-spacing: -0.01em; }
.cp-stat-label { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--cp-ink-soft); }
.cp-footnote { margin: 0; font-size: 13px; color: var(--cp-ink-soft); }

/* Offer cards (enablers) */
.cp-card {
  border: 1px solid var(--cp-rule);
  border-top-width: 4px;
  border-radius: 12px;
  padding: 22px 24px;
  background: #ffffff;
}
.cp-card-payments { border-top-color: var(--cp-pay); }
.cp-card-lending { border-top-color: var(--cp-lend); }
.cp-card-banking { border-top-color: var(--cp-bank); }
.cp-card-title { margin: 0 0 8px; font-size: 19px; line-height: 1.3; font-weight: 700; }
.cp-card-text { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--cp-ink-mid); }
.cp-examples {
  margin: 8px 0 0;
  padding-left: 18px;
  list-style: disc;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cp-ink-mid);
}
.cp-examples li { margin: 0 0 6px; }

/* Customer tiles (enablers) */
.cp-group .cp-tiles { margin: 10px 0 24px; }
.cp-group:last-child .cp-tiles { margin-bottom: 0; }
.cp-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--cp-rule);
  border-radius: 12px;
  padding: 16px 18px;
  background: #ffffff;
  color: var(--cp-ink);
}
.cp a.cp-tile { color: var(--cp-ink); }
.cp a.cp-tile:hover { border-color: var(--cp-ink-soft); text-decoration: none; }
.cp-tile-mark { height: 32px; display: flex; align-items: center; }
.cp-tile-mark img { display: block; max-width: none; }
.cp-tile-name { font-size: 18px; line-height: 1.2; font-weight: 900; color: var(--cp-ink); }
.cp-tile-text { font-size: 14px; line-height: 1.45; color: var(--cp-ink-soft); }

/* Markets (enablers) */
.cp-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cp-flag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--cp-pale);
  border: 1px solid var(--cp-pale-rule);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

/* Stack rows (embedders) */
.cp-rows { display: flex; flex-direction: column; gap: 14px; }
.cp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 24px;
  align-items: start;
  border: 1px solid var(--cp-rule);
  border-left-width: 5px;
  border-radius: 12px;
  padding: 20px 22px;
  background: #ffffff;
}
.cp-row-payments { border-left-color: var(--cp-pay); }
.cp-row-lending { border-left-color: var(--cp-lend); }
.cp-row-banking { border-left-color: var(--cp-bank); }
.cp-row-title { margin: 10px 0 6px; font-size: 18px; line-height: 1.3; font-weight: 700; }
.cp-row-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--cp-ink-mid); }
.cp-row-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cp-since { font-size: 14px; line-height: 1.4; color: var(--cp-ink-soft); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; }   /* two providers on one row (Mews: Stripe and Adyen) */

/* ---- Template parts ---- */

/* Podcast card (embedders) */
.cp-pod-sec .cp-h2 { margin-bottom: 16px; }
.cp-pods { display: flex; flex-direction: column; gap: 12px; }   /* up to three episodes */
.cp a.cp-pod {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--cp-peach);
  border-radius: 14px;
  padding: 22px 24px;
  color: var(--cp-ink);
}
.cp a.cp-pod:hover { text-decoration: none; }
.cp a.cp-pod:hover .cp-pod-title { text-decoration: underline; }
.cp-pod-icon {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--cp-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-pod-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-pod-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cp-orange);
}
.cp-pod-title { font-size: 19px; line-height: 1.35; font-weight: 700; }
.cp-pod-guest { font-size: 15px; line-height: 1.45; color: var(--cp-ink-soft); }
.cp-pod-listen { margin-left: auto; font-weight: 700; color: var(--cp-link); white-space: nowrap; }

/* Most read (six or more stories) */
.cp-popular .cp-grid3 { margin: 10px 0 28px; }
.cp a.cp-pop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--cp-rule);
  border-radius: 12px;
  padding: 18px 20px;
  background: #ffffff;
  color: var(--cp-ink);
}
.cp a.cp-pop:hover { border-color: var(--cp-ink-soft); text-decoration: none; }
.cp-pop-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cp-ink-soft);
}
.cp-pop-title { font-size: 17px; line-height: 1.35; font-weight: 700; }

/* All stories, grouped by year (partials/efr/company-years.hbs adds
   .cp-story-first / .cp-story-cont) */
.cp a.cp-story {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 76px;   /* 70 + 16 gap | title | 12 gap + 64 */
  padding: 4px 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--cp-ink);
}
.cp a.cp-story:hover { text-decoration: none; }
.cp a.cp-story:hover .cp-story-title { text-decoration: underline; }
.cp-story-year { font-weight: 900; color: var(--cp-ink-soft); }
.cp-story-date { font-size: 14px; color: var(--cp-ink-soft); text-align: right; }
.cp a.cp-story-first { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--cp-rule); }
.cp a.cp-story-first:first-child { margin-top: 0; }
.cp-story-cont .cp-story-year { visibility: hidden; }

.cp-updated {
  margin: -8px 0 0;   /* 40px under the stories, as in the mockups */
  padding-top: 18px;
  border-top: 1px solid var(--cp-rule);
  font-size: 14px;
  line-height: 1.5;
  color: var(--cp-ink-soft);
}

/* ---- Narrower screens ---- */
@media (max-width: 1000px) {
  .cp-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* Glance cells two per row; an odd last cell takes the full row */
  .cp-glance-2, .cp-glance-3, .cp-glance-4, .cp-glance-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cp-head-in { padding-top: 20px; padding-bottom: 28px; }
  .cp-crumb { margin-bottom: 16px; }
  .cp-title { gap: 18px; margin-bottom: 22px; }
  .cp-logo { flex-basis: 160px; height: 90px; }
  .cp-logo img { max-width: 132px; height: auto; }
  .cp-title-text { flex-basis: 100%; }
  .cp-h1 { font-size: 32px; }
  .cp-cell { padding: 14px 16px; }
  .cp-body { gap: 40px; }
  .cp-body-content { padding-top: 32px; }
  .cp-body-tail { padding-top: 40px; padding-bottom: 56px; }
  .cp-h2 { font-size: 22px; }
  .cp-p { font-size: 16px; }
  .cp-grid2, .cp-grid3 { grid-template-columns: minmax(0, 1fr); }
  .cp-row { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; }
  .cp-card { padding: 20px; }
  .cp a.cp-pod { flex-wrap: wrap; gap: 14px 16px; padding: 20px; }
  .cp-pod-icon { flex-basis: 48px; height: 48px; }
  .cp-pod-text { flex: 1 1 200px; }
  .cp-pod-listen { margin-left: 64px; }
  .cp a.cp-story { grid-template-columns: 52px minmax(0, 1fr) 60px; }
}
