/* Customer stories: the title with two story summaries, the BrokerTrust and Fingera stories (figures, static charts,
 * operating model) and the closing call to action.
 * Grids use equal rows (minmax(0, 1fr)), so stacked phone rows share the tallest height. */

/* ---------- title and story summaries ---------- */
.stories-intro__inner { display: flex; flex-direction: column; gap: 40px; }
.stories-intro__inner > .btn { align-self: flex-start; }
.stories-intro__copy { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 960px; }

.story-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 24px; }
.story-card { display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 4px; background: var(--ink); color: var(--white); overflow: clip; }
.story-card > .logo, .story-card > .btn { align-self: flex-start; }
.story-card__title { min-height: 58px; }
.story-card__figures { display: flex; gap: 24px; padding-top: 24px; box-shadow: inset 0 1px 0 var(--white); }
.story-card__figure { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.logo { display: block; flex: none; height: 32px; width: auto; max-width: 100%; object-fit: cover; }
.logo--fingera { aspect-ratio: 520 / 92; }

/* ---------- the two stories ---------- */
.story__inner { display: flex; flex-direction: column; gap: 40px; }
.story__action { align-self: flex-start; }
.story__head { display: flex; align-items: flex-start; gap: 40px; }
.story__headline { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
/* this page's large headings wrap "pretty" (base.css .t-h2 balances) */
.story__title, .stories-cta__title { text-wrap: pretty; }
.story__brand { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 240px; min-height: 96px;
  padding: 24px; border-radius: 4px; background: var(--ink); overflow: clip; }
.story__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 40px; }
.story__block { display: flex; flex-direction: column; gap: 24px; }

/* figures box: three columns (BrokerTrust) or three stretched rows beside the chart (Fingera) */
.glance { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 24px; padding: 24px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--ink); overflow: clip; }
.glance--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.glance--stack { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 28px; }
.glance__item { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* operating model: numbered steps; the text wraps greedily and keeps its spaces */
.steps { position: relative; }
.steps li { list-style: ""; counter-increment: list-item; padding-left: 2ch; font-size: 17px; line-height: 1.6em; letter-spacing: -0.01em; }
.steps li::before { content: counter(list-item) "."; position: absolute; left: 0; font-variant-numeric: tabular-nums; }
.steps p { white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.steps strong { font-family: "Inter", sans-serif; font-weight: 700; }

/* ---------- charts (static SVG; chart text in the browser's sans-serif, without OpenType features) ---------- */
.chart-pair { display: grid; grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.35fr); gap: 16px; }
.chart-pair--even { grid-template-columns: 1fr 1fr; }
.chart-pair > * { min-width: 0; height: 100%; }
.chart-card { display: flex; flex-direction: column; gap: 24px; padding: 24px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--ink); overflow: clip; }

.chart { color: var(--ink); font-family: sans-serif; font-size: 12px; font-weight: 400; line-height: normal; letter-spacing: normal; font-feature-settings: normal; }
.pie { display: flex; flex-direction: column; align-items: flex-start; gap: 36px; }
.pie svg { flex: none; width: min(240px, 100%); height: auto; }
.legend { display: grid; gap: 12px; width: 100%; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: baseline; font-size: 15px; line-height: 1.3; }
.legend__swatch { display: block; width: 14px; height: 14px; border-radius: 2px; }
.legend__swatch--ink { background: #181818; }
.legend__swatch--grey-4a { background: #4a4a4a; }
.legend__swatch--grey-5e { background: #5e5e5e; }
.legend__swatch--grey-6e { background: #6e6e6e; }
.legend__swatch--grey-9a { background: #9a9a9a; }
.legend__swatch--light { background: #d4d4d4; box-shadow: inset 0 0 0 1px #181818; }
.legend__value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-chart svg { width: 100%; height: auto; }
.key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.key li { display: flex; align-items: center; gap: 8px; }
.key__line { display: block; width: 18px; height: 2px; }
.key__line--code { background: #181818; }
.key__line--docs { background: #5e5e5e; }
.key__line--total { height: 0; border-top: 2px dashed #181818; }

/* ---------- closing call to action ---------- */
.stories-cta__copy { display: flex; flex-direction: column; gap: 24px; max-width: 880px; }
.stories-cta__copy > .btn { align-self: flex-start; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1199px) {
  .steps li { font-size: 16px; }
}
@media (max-width: 1199.98px) {
  .story-card { padding: 24px; }
  /* on tablet and phone this card ends with an empty note: one more 24px gap */
  .chart-card--growth { padding-bottom: 48px; }
}
@media (max-width: 980px) {
  .chart-pair, .chart-pair--even { grid-template-columns: 1fr; }
}
@media (max-width: 809px) {
  .steps li { line-height: 1.55em; }
}
@media (max-width: 809.98px) {
  .story-index, .story__pair, .glance--three { grid-template-columns: minmax(0, 1fr); }
  .story-card__figures { flex-direction: column; }
  .story-card__figure { flex: none; }
  .story__head { flex-direction: column; align-items: stretch; gap: 24px; }
  .story__headline { flex: none; }
  .story__brand { width: auto; }
  .chart-card--release { padding-bottom: 48px; }
}
