/* ============================================================
   inqelo marketing site — diagrams
   @docs [[docs/Systems/Marketing Website/Patterns/inqelo Marketing Site Design Standard]]
   The parts every diagram is built from: an icon disc on a white
   node, channel chips, the green Inqelo panel, a result card with
   ticks, drawn arrows between stages, and a return line. Markup
   comes from [[website/templates/diagrams/_kit.html]]. The two
   flows on [[website/templates/how.html]] are built from the same
   parts. A diagram in a narrow column adds `dgm--compact`.
   Mobile-first: stages stack with arrows pointing down. From
   1024px a flow runs left to right.
   ============================================================ */

/* ---- Icon font: Material Symbols Rounded (filled), self-hosted
   subset of only the glyphs the diagrams use. It has its own family
   name, so a page's own subset of the same font stays whole. ------ */
@font-face {
  font-family: "Material Symbols Rounded Diagrams";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("assets/material-symbols-rounded-diagrams.woff2") format("woff2");
}
.dgm__sym {
  font-family: "Material Symbols Rounded Diagrams";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  flex: none;
}

.dgm { width: 100%; display: flow-root; }
.dgm__row { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.dgm__stage { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: stretch; }
.dgm__stage > * { width: 100%; }

/* ---- Arrows --------------------------------------------------- */
.dgm__arrow { color: var(--ink-900); display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.dgm__arrow svg { display: block; transform: rotate(90deg); margin: 7px 0; }
.dgm__arrow-caption { font-size: 11px; font-weight: 500; color: var(--text-faint); }

/* ---- Node: an icon disc over a label --------------------------- */
.dgm__node {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 15px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.dgm__disc {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.dgm__disc .dgm__sym { font-size: 32px; }
.dgm__disc--green { background: var(--green-100); color: var(--green-700); }
.dgm__disc--gray { background: var(--gray-100); color: var(--gray-500); }
.dgm__disc--amber { background: #fdf0e1; color: var(--amber-500); }
.dgm__node-label { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text-strong); }
.dgm__node-sub { font-size: 11px; line-height: 1.4; color: var(--text-muted); margin-top: -4px; }

/* ---- Chips: an icon and a label -------------------------------- */
.dgm__chips { display: flex; flex-direction: column; gap: 7px; }
.dgm__head {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2px;
}
.dgm__chip {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-900);
}
.dgm__chip-icon { display: inline-flex; flex: none; }
.dgm__chip-icon .dgm__sym { font-size: 24px; }
.dgm__chip-icon svg { width: 22px; height: 22px; }
.dgm__chip-icon--green { color: var(--green-500); }
.dgm__chip-icon--info { color: var(--info-500); }
.dgm__chip-icon--amber { color: var(--amber-500); }
.dgm__chip-icon--gray { color: var(--gray-400); }
.dgm__chip-icon--danger { color: var(--danger-500); }
/* A chip that carries nothing: the same grey card for every enquiry. */
.dgm__chip--flat { background: var(--gray-100); box-shadow: none; color: var(--gray-500); }
/* A chip that stands for the one good enquiry. */
.dgm__chip--good { border-color: var(--green-200); background: var(--green-50); }

/* ---- The Inqelo panel ------------------------------------------- */
.dgm__engine {
  background: #fff;
  border: 1px solid var(--green-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.dgm__engine-head { padding: 11px 18px; text-align: center; background: var(--green-600); }
.dgm__engine-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.dgm__engine-sub { font-size: 11px; color: rgba(255, 255, 255, .82); margin-top: 2px; }
.dgm__engine-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.dgm__engine--1 .dgm__engine-grid { grid-template-columns: 1fr; }
.dgm__pillar {
  padding: 18px 13px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}
.dgm__engine--2 .dgm__pillar:nth-child(odd), .dgm__engine--4 .dgm__pillar:nth-child(odd) { border-right: 1px solid var(--gray-200); }
.dgm__engine-grid .dgm__pillar:first-child { border-top: 0; }
.dgm__engine--2 .dgm__pillar:nth-child(2), .dgm__engine--4 .dgm__pillar:nth-child(2) { border-top: 0; }
.dgm__pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--green-50);
  color: var(--green-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.dgm__pillar-icon .dgm__sym { font-size: 25px; }
.dgm__pillar-title { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green-700); }
.dgm__pillar-body { font-size: 11px; line-height: 1.5; color: var(--gray-600); margin-top: 7px; }

/* ---- The result card -------------------------------------------- */
.dgm__result {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 16px;
  overflow: hidden;
}
.dgm__result-head { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--text-muted); margin-bottom: 3px; }
.dgm__result-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.dgm__result-amount { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--green-600); }
.dgm__result-pill { background: var(--green-100); color: var(--green-700); font-size: 10px; font-weight: 600; border-radius: var(--radius-pill); padding: 3px 8px; line-height: 1; white-space: nowrap; }
.dgm__result-rule { height: 1px; background: var(--border-subtle); margin: 12px 0 10px; }
.dgm__tick { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.35; color: var(--text-body); padding: 3px 0; }
.dgm__tick-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
}
/* The red band: what this result cannot tell you. */
.dgm__result-warn {
  color: var(--danger-500);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  margin: 10px -16px -16px;
  padding: 11px 12px;
  background: #fcefee;
  border-top: 2px solid var(--danger-500);
}

/* ---- The return line -------------------------------------------- */
.dgm__loop { display: flex; justify-content: center; margin-top: 16px; }
.dgm__loop-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-700);
  text-align: center;
}
.dgm__loop-label svg { color: var(--green-600); flex: none; }

/* ---- From 1024px a flow runs left to right ----------------------- */
@media (min-width: 1024px) {
  .dgm__row { flex-direction: row; align-items: center; justify-content: center; gap: 8px; }
  .dgm__stage { width: auto; max-width: none; flex: 1 1 0; min-width: 0; }
  .dgm__stage--wide { flex: 2.3 1 0; }
  .dgm__arrow svg { transform: none; margin: 0; }
  .dgm__chip-icon .dgm__sym { font-size: 32px; }
  .dgm__engine--4 .dgm__engine-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dgm__engine--4 .dgm__pillar { border-top: 0; border-right: 1px solid var(--gray-200); }
  .dgm__engine--4 .dgm__pillar:last-child { border-right: 0; }
  .dgm__stage:not(.dgm__stage--wide) .dgm__engine--4 .dgm__engine-grid { grid-template-columns: repeat(2, 1fr); }
  .dgm__stage:not(.dgm__stage--wide) .dgm__engine--4 .dgm__pillar:nth-child(n+3) { border-top: 1px solid var(--gray-200); }
  .dgm__stage:not(.dgm__stage--wide) .dgm__engine--4 .dgm__pillar:nth-child(even) { border-right: 0; }

  /* The return line is drawn: down from the last stage, along, and up
     into the first, with its label on the line. */
  .dgm__loop {
    position: relative;
    height: 34px;
    margin: 6px 7% 12px;
    border: 2px solid var(--green-500);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    align-items: flex-end;
  }
  .dgm__loop::before {
    content: "";
    position: absolute;
    left: -7px;
    top: -3px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 9px solid var(--green-500);
  }
  .dgm__loop-label { background: var(--dgm-surface, #fff); padding: 0 12px; transform: translateY(50%); }
}

/* ---- Hatching: faint red diagonal lines over a red tint so light
   that the page shows through. It marks the part of a line that is
   too late, or out of the reader's hands. */
.dgm-hatch {
  background-color: rgba(212, 69, 58, .045);
  background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(212, 69, 58, .16) 10px 11.5px);
}

/* ---- Measure: the path from ad click to sale, as one line, and
   the three places a number is taken on it. The agency's work runs
   from the ad click to the enquiry. Everything after the enquiry is
   hatched: it is the client's sales team's. Each number is a flag on
   a pole that stands on the line where the number is taken: Inqelo
   and the lead count at the enquiry, the sales report at the sale.
   On a narrow screen the line runs down the page. */
.dgm-measure__path { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0; }
.dgm-measure__path > * { position: relative; z-index: 1; }
.dgm-measure__chip { display: inline-flex; align-items: center; gap: 8px; background: var(--ink-700); color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1; border-radius: var(--radius-pill); padding: 10px 16px 10px 12px; white-space: nowrap; }
.dgm-measure__zone b, .dgm-measure__axis li > span:not(.dgm-measure__chip) { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-900); }
.dgm-measure__zone--us b { color: var(--green-700); }
.dgm-measure__zone span { display: block; font-size: 15px; line-height: 1.5; color: var(--ink-700); margin-top: 5px; }
.dgm-measure__flag b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--text-strong); }
.dgm-measure__flag--us b { color: var(--green-700); }
.dgm-measure__flag span { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink-700); margin-top: 5px; }
/* Text that stands on the hatching has a plain pad under it. */
.dgm-measure__zone--them, .dgm-measure__flag--sales > div { background: var(--dgm-surface, #fff); border-radius: 10px; padding: 10px 14px 12px; }
.dgm-measure__so { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--border-subtle); font-size: 16.5px; line-height: 1.55; color: var(--ink-700); max-width: 760px; }
.dgm-measure__so b { color: var(--ink-900); }

@media (max-width: 1023px) {
  .dgm-measure__path { row-gap: 16px; }
  .dgm-measure__path::before { content: ""; position: absolute; left: 8px; top: 24px; bottom: 12px; border-left: 3px solid var(--ink-700); }
  .dgm-measure__path::after { content: ""; position: absolute; left: .5px; bottom: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid var(--ink-700); }
  .dgm-measure__axis, .dgm-measure__axis li { display: contents; }
  .dgm-measure__axis li > span { position: relative; z-index: 2; grid-column: 2; }
  .dgm-measure__axis li:nth-child(1) > span { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .dgm-measure__zone--us { grid-column: 2; grid-row: 2; }
  .dgm-measure__axis li:nth-child(2) > span { grid-row: 3; margin-top: 6px; }
  .dgm-measure__flag--us { grid-column: 2; grid-row: 4; }
  .dgm-measure__flag--count { grid-column: 2; grid-row: 5; margin-bottom: 14px; }
  .dgm-measure__shade { grid-column: 1 / -1; grid-row: 6 / 9; z-index: 0; border-radius: 16px; }
  .dgm-measure__zone--them { grid-column: 2; grid-row: 6; margin: 16px 14px 0 0; justify-self: start; }
  .dgm-measure__axis li:nth-child(3) > span { grid-row: 7; }
  .dgm-measure__flag--sales { grid-column: 2; grid-row: 8; margin: 0 14px 30px 0; }
  /* A dot marks the enquiry and the sale on the line. */
  .dgm-measure__axis li:nth-child(n+2) > span::before { content: ""; position: absolute; left: -30px; top: -3px; width: 19px; height: 19px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 4px var(--dgm-surface, #fff); }
  .dgm-measure__axis li:nth-child(3) > span::before { background: var(--amber-500); }
}

@media (min-width: 1024px) {
  .dgm-measure__path { grid-template-columns: 1.1fr 0.9fr; grid-template-rows: auto 36px auto; }
  .dgm-measure__shade { grid-column: 2; grid-row: 1 / 4; z-index: 0; border-radius: 0 18px 18px 0; }
  /* The line: the ad click at its start, the enquiry where the two halves
     meet, the sale near its end, and an arrowhead pointing the way time runs. */
  .dgm-measure__axis { grid-column: 1 / -1; grid-row: 2; box-sizing: border-box; height: 36px; display: grid; grid-template-columns: 1.1fr 0.9fr; list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink-700); z-index: 2; }
  .dgm-measure__axis::after { content: ""; position: absolute; right: -12px; top: -10.5px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid var(--ink-700); }
  .dgm-measure__axis li { position: relative; grid-row: 1; }
  .dgm-measure__axis li:nth-child(1) { grid-column: 1; justify-self: start; margin-top: -21px; }
  .dgm-measure__axis li:nth-child(2) { grid-column: 1; justify-self: end; padding: 9px 16px 0 0; }
  .dgm-measure__axis li:nth-child(3) { grid-column: 2; justify-self: end; margin-right: 44px; padding: 9px 16px 0 0; }
  .dgm-measure__axis li:nth-child(n+2)::after { content: ""; position: absolute; right: -9.5px; top: -11px; width: 19px; height: 19px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 4px var(--dgm-surface, #fff); }
  .dgm-measure__axis li:nth-child(3)::after { background: var(--amber-500); }

  .dgm-measure__zone--us { grid-column: 1; grid-row: 1; justify-self: start; align-self: start; max-width: 250px; padding-bottom: 30px; }
  .dgm-measure__zone--them { grid-column: 2; grid-row: 1; justify-self: start; align-self: start; max-width: 330px; margin: 22px 20px 30px 26px; }
  /* A flag's pole is its edge, and the pole stands on the line. */
  .dgm-measure__flag { text-align: right; }
  .dgm-measure__flag--us { grid-column: 1; grid-row: 1; justify-self: end; align-self: end; max-width: 300px; margin-right: -1.5px; padding: 0 18px 22px 0; border-right: 3px solid var(--green-600); }
  .dgm-measure__flag--count { grid-column: 1; grid-row: 3; justify-self: end; align-self: start; max-width: 430px; margin: -33px -1.5px 0 0; padding: 62px 18px 4px 0; border-right: 3px solid var(--gray-500); }
  .dgm-measure__flag--sales { grid-column: 2; grid-row: 3; justify-self: end; align-self: start; max-width: 380px; margin: -33px 42.5px 26px 26px; padding: 62px 14px 0 0; border-right: 3px solid var(--amber-500); }
}

/* ---- Lead card: one card, as in the pictures, with numbered marks on
   it, beside the numbered list the marks point to. The card stands on
   two more cards, and its price tag hangs from its top corner. */
.dgm-card { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.dgm-card__art { position: relative; width: 100%; max-width: 460px; justify-self: center; padding: 22px 34px 30px 36px; box-sizing: border-box; }
.dgm-card__behind { position: absolute; inset: 22px 34px 30px 36px; background: #fff; border: 1px solid var(--gray-200); border-radius: 18px; box-shadow: var(--shadow-sm); transform: translate(11px, 11px) rotate(2deg); }
.dgm-card__behind--far { transform: translate(21px, 21px) rotate(4deg); }
.dgm-card__card { position: relative; background: #fff; border: 1px solid var(--gray-200); border-radius: 18px; box-shadow: var(--shadow-md); padding: 4px 22px 6px; }
.dgm-card__row { position: relative; display: grid; gap: 3px; padding: 14px 0; border-top: 1px solid var(--border-subtle); }
.dgm-card__row--head { display: flex; align-items: center; gap: 11px; border-top: 0; padding: 16px 0 14px; }
.dgm-card__row--facts { grid-template-columns: 1fr 1fr; gap: 12px; }
.dgm-card__row--facts > span { display: grid; gap: 3px; }
.dgm-card__phone { width: 44px; height: 44px; border-radius: 50%; background: var(--green-50); color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dgm-card__kind { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-strong); }
.dgm-card__pill { display: inline-flex; align-items: center; gap: 5px; background: var(--green-100); color: var(--green-700); font-size: 12px; font-weight: 700; line-height: 1; border-radius: var(--radius-pill); padding: 5px 6px 5px 10px; }
.dgm-card__label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-500); }
.dgm-card__text { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink-900); }
.dgm-card__text + .dgm-card__label { margin-top: 8px; }
.dgm-card__text--value { color: var(--green-600); font-weight: 700; }
.dgm-card__lines { display: grid; gap: 6px; margin-top: 3px; }
.dgm-card__lines i { height: 7px; border-radius: 4px; background: var(--gray-100); }
.dgm-card__lines i:nth-child(2) { width: 90%; }
.dgm-card__lines i:nth-child(3) { width: 62%; }
.dgm-card__ticks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; }
.dgm-card__ticks span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--green-700); }
/* The price tag hangs from the card's top corner, on a short string. */
.dgm-card__tag { position: absolute; right: -26px; top: -18px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; background: #f3e9d2; color: var(--green-800); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; border-radius: 4px 8px 8px 4px; padding: 9px 9px 9px 24px; box-shadow: var(--shadow-sm); transform: rotate(6deg); }
.dgm-card__tag::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #c9b98f; }
/* A numbered mark: on the card it stands on the part its item is about. */
.dgm-card__mark { width: 24px; height: 24px; border-radius: 50%; background: var(--green-700); color: #fff; font-size: 12.5px; font-style: normal; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dgm-card__card > .dgm-card__mark, .dgm-card__row > .dgm-card__mark { position: absolute; left: -35px; top: 13px; box-shadow: 0 0 0 3px var(--dgm-surface, #fff); }
.dgm-card__card > .dgm-card__mark--1 { left: auto; right: -34px; top: auto; bottom: -30px; }
.dgm-card__tag .dgm-card__mark, .dgm-card__pill .dgm-card__mark { width: 20px; height: 20px; font-size: 11px; }
.dgm-card__list { list-style: none; margin: 0; padding: 0; }
.dgm-card__list li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0 17px; border-top: 1px solid var(--rule, var(--border-subtle)); }
.dgm-card__list li:first-child { border-top: 0; padding-top: 0; }
.dgm-card__list .dgm-card__mark { margin-top: 1px; }
.dgm-card__list h3 { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--text-strong); }
.dgm-card__list p { font-size: 15px; line-height: 1.55; color: var(--ink-700); margin-top: 5px; max-width: 560px; }
/* Below 360px the card's facts stack and its margins narrow, so the card
   fits a 320px screen. */
@media (max-width: 359px) {
  .dgm-card__row--facts { grid-template-columns: 1fr; }
  .dgm-card__art { padding-left: 22px; padding-right: 23px; }
  .dgm-card__behind { inset: 22px 23px 30px 22px; }
  .dgm-card__card { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 1024px) {
  .dgm-card { grid-template-columns: minmax(0, 470px) 1fr; gap: 72px; }
  .dgm-card__art { max-width: 470px; }
}

/* ---- Better, not more: two campaigns, each laid out as its pile of
   lead cards. A real lead is a white card with a cream price tag. An
   enquiry that was not a lead is a faint dashed card with its reason.
   The count stands over each pile in the same quiet type. The worth
   stands under it: small and grey for the pile of little value, large
   and green for the other. */
.dgm-pile { display: grid; grid-template-columns: 1fr; gap: 40px 56px; }
.dgm-pile__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule, var(--border-subtle)); }
.dgm-pile__name { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-900); }
.dgm-pile__count { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--ink-900); }
.dgm-pile__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; margin-top: 18px; }
.dgm-pile__card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; height: 94px; box-sizing: border-box; padding: 10px 6px 12px; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-sm); color: var(--green-700); }
.dgm-pile__card b { background: #f3e9d2; color: var(--green-800); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; border-radius: 3px 6px 6px 3px; padding: 5px 7px 5px 13px; position: relative; transform: rotate(-3deg); }
.dgm-pile__card b::before { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #c9b98f; }
.dgm-pile__card--junk { background: none; border: 1.5px dashed var(--gray-300); box-shadow: none; color: var(--gray-400); }
.dgm-pile__card em { font-size: 11.5px; font-style: normal; font-weight: 600; line-height: 1.2; text-align: center; color: var(--gray-500); }
.dgm-pile__sum { display: flex; align-items: baseline; gap: 12px; margin-top: 20px; }
.dgm-pile__sum span { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-500); }
.dgm-pile__sum b { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--gray-500); }
.dgm-pile__col--b .dgm-pile__sum b { font-size: 60px; color: var(--green-600); }
.dgm-pile__so { margin: 0; padding-top: 20px; border-top: 1px solid var(--rule, var(--border-subtle)); font-size: 16.5px; line-height: 1.55; color: var(--ink-700); }
.dgm-pile__so b { color: var(--ink-900); }
.dgm-pile__so span { font-size: 13px; color: var(--text-muted); margin-left: 6px; }
@media (min-width: 1024px) {
  .dgm-pile { grid-template-columns: 1fr 1fr; align-items: start; }
  .dgm-pile__col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
  /* Five cards to a row, so the two piles can be counted against each other. */
  .dgm-pile__cards { grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; }
  .dgm-pile__sum { align-self: end; min-height: 60px; align-items: flex-end; }
  .dgm-pile__so { grid-column: 1 / -1; }
  .dgm-pile__col--b .dgm-pile__sum b { font-size: 72px; }
}

/* ---- Value, not volume: two campaigns side by side -------------- */
.dgm-worth { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.dgm-worth__col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.dgm-worth__leads { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dgm-worth__lead {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  color: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dgm-worth__count { font-size: 12.5px; font-weight: 600; color: var(--text-strong); text-align: center; }
.dgm-worth__track { height: 14px; border-radius: var(--radius-pill); background: var(--gray-100); overflow: hidden; }
.dgm-worth__bar { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--green-500); }
.dgm-worth__bar--low { background: var(--gray-400); }
.dgm-worth__value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--green-600); text-align: center; }
.dgm-worth__value--low { color: var(--text-muted); }
.dgm-worth__rows {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-strong);
}
.dgm-worth__rows span:last-child { color: var(--green-700); }
.dgm-worth__note { grid-column: 1 / -1; font-size: 11px; color: var(--text-faint); text-align: center; }

/* ---- Value timing: one enquiry, two answers on one time line ----
   Distance along the line is time. The first lane's card sits at the
   start of the line and the second lane's card at its far end. */
.dgm-time { display: flex; flex-direction: column; gap: 18px; }
.dgm-time__lane { display: flex; flex-direction: column; gap: 8px; }
.dgm-time__lane .dgm__head { text-align: left; }
.dgm-time__track { display: flex; align-items: center; }
.dgm-time__start {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  background: var(--green-600);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 10px;
  line-height: 1;
}
.dgm-time__line { flex: 0 0 34px; height: 3px; background: var(--green-500); position: relative; }
.dgm-time__card { flex: 0 0 210px; }
.dgm-time__lane--late .dgm-time__start { background: var(--gray-500); }
/* On a narrow screen the wait keeps its length and the late card wraps under it, at the far end. */
.dgm-time__lane--late .dgm-time__track { flex-wrap: wrap; row-gap: 18px; }
.dgm-time__lane--late .dgm-time__card { margin-left: auto; }
.dgm-time__lane--late .dgm-time__line {
  min-width: 190px;
  flex: 1 1 auto;
  height: 0;
  background: none;
  border-top: 3px dashed var(--amber-500);
}
.dgm-time__wait {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fbe9d6;
  color: var(--amber-600);
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  line-height: 1;
  white-space: nowrap;
}
.dgm-time .dgm__result-rule { display: none; }
/* Below 360px the result card may shrink, so the lane fits a 320px screen. */
@media (max-width: 359px) {
  .dgm-time__card { flex-shrink: 1; min-width: 0; }
}
.dgm-time__lane--late .dgm-time__card { flex-basis: 168px; }
.dgm-time__lane--late .dgm__result-amount { color: var(--text-muted); }
.dgm-time__lane--late .dgm__result-pill { background: #fbe9d6; color: var(--amber-600); }
.dgm-time__axis {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-top: 2px solid var(--gray-300);
  padding-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dgm-time__axis i { width: 2px; height: 8px; margin-top: -10px; background: var(--gray-300); }
.dgm-time__axis span:first-child { color: var(--green-700); }
.dgm-time__axis span:last-child { color: var(--amber-600); }

/* ---- Ports: connections joined to the Inqelo hub ----------------
   It follows the call tracking flow on [[website/templates/features.html]]:
   white boxes, a white hub with the Inqelo mark, and thin lines with
   rounded corners. Lines that run in are grey and end in one arrowhead
   at the hub. Lines that run out are green and end in an arrowhead at
   each box. On a wide screen the rows share one height, so each line
   leaves the middle of its row and all meet at the middle of the hub. */
.dgm-ports { display: grid; grid-template-columns: 1fr; gap: 14px; --line: var(--gray-300); --tip: var(--gray-400); }
.dgm-ports--out { --line: var(--green-400); --tip: var(--green-500); }
.dgm-ports__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dgm-ports__row { display: flex; align-items: stretch; }
.dgm-ports__port {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}
a.dgm-ports__port { transition: box-shadow .18s ease, border-color .18s ease; }
a.dgm-ports__port:hover { box-shadow: var(--shadow-md); border-color: var(--green-200); }
.dgm-ports__port .dgm__disc { width: 44px; height: 44px; background: var(--green-50); }
.dgm-ports__port .dgm__disc .dgm__sym { font-size: 25px; }
.dgm-ports__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.dgm-ports__tag { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-700); }
.dgm-ports__name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--text-strong); }
.dgm-ports__line { font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.dgm-ports__conn, .dgm-ports__link { display: none; }
.dgm-ports__hub {
  justify-self: center;
  width: 118px;
  background: #fff;
  border: 1px solid var(--green-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.dgm-ports__mark { width: 40px; height: 40px; border-radius: 11px; background: var(--green-100); display: inline-flex; align-items: center; justify-content: center; }
.dgm-ports__mark img { width: 24px; height: 24px; object-fit: contain; display: block; }
.dgm-ports__hub-name { font-size: 14px; font-weight: 700; color: var(--text-strong); margin-top: 6px; }
.dgm-ports__hub-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.dgm-ports__art { width: 100%; max-width: 420px; justify-self: center; }
.dgm-ports__art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 22px rgba(21, 36, 43, .12)); }
.dgm-ports--out .dgm-ports__hub { order: -2; }
/* On a narrow screen the boxes stack, and one short line joins the stack to the hub. */
@media (max-width: 1023px) {
  .dgm-ports__link { display: block; justify-self: center; width: 0; height: 22px; border-left: 1.5px solid var(--line); }
  .dgm-ports--out .dgm-ports__link { order: -1; }
}
@media (min-width: 1024px) {
  .dgm-ports { grid-template-columns: 1fr 30px 118px; gap: 0; align-items: center; }
  .dgm-ports--out { grid-template-columns: 118px 30px 1fr; }
  .dgm-ports--out .dgm-ports__link { order: -1; }
  .dgm-ports__list { grid-auto-rows: 1fr; gap: 0; align-self: stretch; }
  .dgm-ports__port { margin: 6px 0; }
  .dgm-ports--out .dgm-ports__row { flex-direction: row-reverse; }

  /* A row's line: a stub from its box, a rounded turn toward the hub, and the
     trunk that passes rows nearer the edge. */
  .dgm-ports__conn { display: block; flex: 0 0 30px; position: relative; }
  .dgm-ports__conn::before, .dgm-ports__conn::after { content: ""; position: absolute; left: 0; right: 0; }
  .dgm-ports__row--up .dgm-ports__conn::before { top: 50%; bottom: 0; border-top: 1.5px solid var(--line); border-right: 1.5px solid var(--line); border-top-right-radius: 9px; }
  .dgm-ports__row--down .dgm-ports__conn::before { top: 0; bottom: 50%; border-bottom: 1.5px solid var(--line); border-right: 1.5px solid var(--line); border-bottom-right-radius: 9px; }
  .dgm-ports__row--mid .dgm-ports__conn::before { top: 50%; border-top: 1.5px solid var(--line); }
  .dgm-ports__row--up:not(:first-child) .dgm-ports__conn::after { top: -1px; height: calc(50% + 1px); border-right: 1.5px solid var(--line); }
  .dgm-ports__row--down:not(:last-child) .dgm-ports__conn::after { bottom: -1px; height: calc(50% + 1px); border-right: 1.5px solid var(--line); }
  .dgm-ports__row--mid .dgm-ports__conn::after { top: 0; bottom: 0; border-right: 1.5px solid var(--line); }
  .dgm-ports--out .dgm-ports__row--up .dgm-ports__conn::before { border-right: 0; border-left: 1.5px solid var(--line); border-top-right-radius: 0; border-top-left-radius: 9px; }
  .dgm-ports--out .dgm-ports__row--down .dgm-ports__conn::before { border-right: 0; border-left: 1.5px solid var(--line); border-bottom-right-radius: 0; border-bottom-left-radius: 9px; }
  .dgm-ports--out .dgm-ports__conn::after { border-right: 0 !important; border-left: 1.5px solid var(--line); }
  .dgm-ports--out .dgm-ports__row--up:first-child .dgm-ports__conn::after,
  .dgm-ports--out .dgm-ports__row--down:last-child .dgm-ports__conn::after { border-left: 0; }

  /* The arrowhead at a box on the way out, and at the hub on the way in. */
  .dgm-ports--out .dgm-ports__tip { position: absolute; right: -1px; top: 50%; transform: translateY(-50%); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; border-left: 8.5px solid var(--tip); z-index: 1; }
  .dgm-ports__link { display: block; height: 0; border-top: 1.5px solid var(--line); position: relative; }
  .dgm-ports--in .dgm-ports__link::after { content: ""; position: absolute; right: -1px; top: -5.25px; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; border-left: 8.5px solid var(--tip); }

  /* With an illustration beside the flow, the illustration rises beside the heading above the rows. */
  .dgm-ports--art { grid-template-columns: 1fr 30px 118px minmax(0, 610px); }
  .dgm-ports--art .dgm-ports__art { max-width: 610px; margin-top: -230px; padding-left: 44px; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .dgm-ports--art { grid-template-columns: 1fr 30px 118px minmax(0, 360px); }
  .dgm-ports--art .dgm-ports__art { margin-top: -150px; }
}

/* ---- Consent gate: one lead forks three ways --------------------
   It is drawn with the ports parts: the lead stands where the hub
   does, and each outcome is a box at the end of its own line. */
.dgm-gate .dgm-ports__name { font-size: 15px; }
.dgm-gate .dgm-ports__line { font-size: 13px; }
.dgm-gate__mark { color: var(--green-700); }
.dgm-gate__mark .dgm__sym { font-size: 24px; }
.dgm-gate .dgm-ports__port .dgm__disc--gray { background: var(--gray-100); color: var(--gray-500); }
.dgm-gate__row--off .dgm-ports__port { background: var(--gray-50); border-style: dashed; border-color: var(--gray-300); box-shadow: none; }
.dgm-gate__row--off .dgm-ports__tag { color: var(--gray-500); }
.dgm-gate__row--off .dgm-ports__name { color: var(--text-muted); }
@media (min-width: 1024px) {
  .dgm-gate .dgm-gate__row--off .dgm-ports__conn::before { border-top: 1.5px dashed var(--gray-400); }
  .dgm-gate .dgm-gate__row--off .dgm-ports__tip { border-left-color: var(--gray-400); }
}

/* In a narrow column every part is one step smaller. */
.dgm--compact .dgm__node { gap: 9px; }
.dgm--compact .dgm__disc { width: 46px; height: 46px; }
.dgm--compact .dgm__disc .dgm__sym { font-size: 28px; }
.dgm--compact .dgm__chip { font-size: 12px; padding: 8px 10px; gap: 8px; }
.dgm--compact .dgm__chip-icon .dgm__sym { font-size: 22px; }
.dgm--compact .dgm__engine-head { padding: 10px 16px; }
.dgm--compact .dgm__engine-name { font-size: 16px; }
.dgm--compact .dgm__pillar { padding: 14px 6px 15px; }
.dgm--compact .dgm__pillar-icon { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 8px; }
.dgm--compact .dgm__pillar-icon .dgm__sym { font-size: 22px; }
.dgm--compact .dgm__pillar-title { font-size: 10.5px; letter-spacing: .03em; }
.dgm--compact .dgm__pillar-body { line-height: 1.45; margin-top: 5px; }
.dgm--compact .dgm__result { padding: 14px 15px; }
.dgm--compact .dgm__result-head { margin-bottom: 6px; }
.dgm--compact .dgm__result-rule { margin: 11px 0 8px; }
.dgm--compact .dgm__result-amount { font-size: 24px; }
.dgm--compact .dgm__result-warn { margin: 10px -15px -14px; }
