/* ===== ab-beliefs: five beliefs on one gold thread. Every picture starts from the same small gold square (a person)
   in its own warm light, and shows what agents carry out from it in azure: reach, work meeting a gate, a loop that
   tightens, a trace, an export home. The thread runs down the list through each square, so the five read as one picture.
   Pictures are drawn in SVG (qa/ab-beliefs/gen.cjs). Headings and text stay ink. ===== */
.ab-beliefs { padding-block: var(--section-gap-s); --fig-w: 720px; --fig-h: 160px; --mark-x: 28px; --mark-y: 80px; --row-pad: var(--space-lg); }
.ab-beliefs h2 { margin-bottom: var(--space-2xl); }
.ab-beliefs__defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ab-beliefs__list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--color-rule); }
.ab-beliefs__item { position: relative; display: grid; grid-template-columns: var(--fig-w) minmax(0, 1fr); column-gap: var(--space-2xl); align-items: center; padding-block: var(--row-pad); border-top: 1px solid var(--color-rule); }

/* the thread: from this belief's gold square down to the next one's */
.ab-beliefs__item:not(:last-child)::after { content: ""; position: absolute; z-index: -1; left: calc(var(--mark-x) - 1px); top: calc(var(--row-pad) + var(--mark-y)); bottom: calc(-1 * (var(--row-pad) + var(--mark-y))); width: 2px; background: var(--color-gold-rule); pointer-events: none; }
.ab-beliefs__list { position: relative; z-index: 0; }

.ab-beliefs__fig { width: var(--fig-w); height: var(--fig-h); overflow: visible; }
.ab-beliefs__fig .ab-beliefs__pool { opacity: 0.8; transition: opacity var(--dur-long) var(--ease-out); }
.ab-beliefs__item:hover .ab-beliefs__pool { opacity: 1; }

.ab-beliefs__text { display: grid; row-gap: var(--space-sm); align-content: center; }
.ab-beliefs__title { font-size: var(--text-title); max-width: 28ch; }
.ab-beliefs__body { font-size: var(--text-md); line-height: 1.6; color: var(--color-ink-2); max-width: 52ch; }

/* the picture's materials, in the site's two lights */
.ab-beliefs__stop-gold { stop-color: var(--color-gold); stop-opacity: 0.34; }
.ab-beliefs__stop-az { stop-color: var(--color-accent); stop-opacity: 0.16; }
.ab-beliefs__stop--out { stop-opacity: 0; }
.ab-beliefs__me { fill: var(--color-gold); }
.ab-beliefs__line { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linecap: round; opacity: 0.85; }
.ab-beliefs__line--strong { opacity: 1; stroke-width: 2.5; }
.ab-beliefs__faint { fill: none; stroke: var(--color-accent-2); stroke-width: 1.5; }
.ab-beliefs__tile { fill: var(--color-accent); }
.ab-beliefs__card { fill: var(--color-paper-3); }
.ab-beliefs__shade { fill: var(--color-accent-ink); opacity: 0.7; }
.ab-beliefs__edge-az { fill: var(--color-accent); }
.ab-beliefs__edge-gold { fill: var(--color-gold); }
.ab-beliefs__text-line { fill: var(--color-rule-2); }
.ab-beliefs__file { fill: var(--color-accent-2); }
.ab-beliefs__file--lit { fill: var(--color-accent); }
.ab-beliefs__reach { stroke: var(--color-gold-rule); stroke-width: 2; stroke-dasharray: 4 6; }
.ab-beliefs__gate { fill: none; stroke: var(--color-gold); stroke-width: 4; stroke-linecap: square; }
.ab-beliefs__leaf { fill: var(--color-gold-2); opacity: 0.5; }
.ab-beliefs__out { fill: none; stroke: var(--color-gold); stroke-width: 2.5; }
.ab-beliefs__sign { fill: var(--color-gold-wash); stroke: var(--color-gold); stroke-width: 2; }
.ab-beliefs__tick { fill: none; stroke: var(--color-gold); stroke-width: 4; stroke-linecap: square; }
.ab-beliefs__slot { fill: none; stroke: var(--color-rule-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.ab-beliefs__route { fill: none; stroke: var(--color-accent-2); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.ab-beliefs__box { fill: none; stroke: var(--color-rule-2); stroke-width: 3; }
.ab-beliefs__own { fill: var(--color-gold-wash); stroke: var(--color-gold); stroke-width: 2.5; }
.ab-beliefs__code { fill: var(--color-gold-2); }

@media (max-width: 75rem) {
  .ab-beliefs { --fig-w: 480px; --fig-h: 106.67px; --mark-x: 18.67px; --mark-y: 53.33px; }
  .ab-beliefs__item { column-gap: var(--space-xl); }
}

/* phones and narrow tablets: the picture above its words, the thread on the left as a rail, the words beside it */
@media (max-width: 60rem) {
  .ab-beliefs__list { container-type: inline-size; }
  .ab-beliefs { --row-pad: var(--space-lg); --fig-w: min(100%, 720px); --rail: calc(min(100cqw, 720px) * 28 / 720); }
  .ab-beliefs__item { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-md); }
  .ab-beliefs__fig { height: auto; aspect-ratio: 720 / 160; }
  .ab-beliefs__text { padding-left: calc(var(--rail) * 2 + var(--space-sm)); row-gap: var(--space-xs); }
  .ab-beliefs__item:not(:last-child)::after { left: calc(var(--rail) - 1px); top: calc(var(--row-pad) + var(--rail) * 80 / 28); bottom: calc(-1 * (var(--row-pad) + var(--rail) * 80 / 28)); }
}
