/* Inline article figure: how a personal agent builds the options you see.
   Uses the Homepage tokens from home.css. Content is visible without JS;
   agent-flow.js adds .armed and reveals each [data-step] in order on scroll. */

.af { container-type: inline-size; margin: 44px 0 48px; padding-top: 14px; border-top: 1px solid var(--hair); }
.af-kicker { font: 500 12px/1.35 var(--mono); letter-spacing: .02em; color: var(--muted); }
.af-intro { max-width: 38em; line-height: 1.65; }
/* neutralise the article's p+p spacing inside the figure, then set our own */
.af.af p + p { margin-top: 0; }
.af.af .af-intro { margin-top: 12px; }
.af.af .af-sub { margin-top: 3px; }
.af.af .af-title + .af-title { margin-top: 6px; }

.af-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 28px;
  grid-template-areas: "ctx" "biz" "a1" "agent" "a2" "set" "a3" "opts" "fh" "fa1" "fset" "fa2" "fout";
}
.af-ctx { grid-area: ctx; } .af-biz { grid-area: biz; } .af-agent { grid-area: agent; }
.af-set { grid-area: set; } .af-opts { grid-area: opts; }
.af-a1 { grid-area: a1; } .af-ab { grid-area: ab; }
.af-grid .af-ab { display: none; } .af-a2 { grid-area: a2; } .af-a3 { grid-area: a3; }
.af-fh { grid-area: fh; } .af-fa1 { grid-area: fa1; } .af-fset { grid-area: fset; } .af-fa2 { grid-area: fa2; } .af-fout { grid-area: fout; }
.af-biz { margin-top: 14px; }
.af-fh { margin-top: 36px; font: 500 12px/1.35 var(--mono); letter-spacing: .02em; color: var(--muted); }

@container (min-width: 560px) {
  .af-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 20px;
    grid-template-areas:
      "ctx   biz"
      "a1    ab"
      "agent agent"
      "a2    fa1"
      "set   fset"
      "a3    fa2"
      "opts  fout";
  }
  .af-biz { margin-top: 0; }
  .af-grid .af-ab { display: flex; }
  .af-grid .af-fh { display: none; }
}

/* cards */
.af-card { background: var(--sheet); border-radius: 10px; box-shadow: var(--lift); padding: 16px 18px 15px; }
.af-title { font-weight: 560; font-size: 16.5px; line-height: 1.3; letter-spacing: -.005em; }
.af-sub { margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.af-list { margin-top: 8px; display: grid; gap: 4px; }
.af-list li { font-size: 15px; line-height: 1.5; }

.af-rows { margin-top: 8px; }
.af-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--hair-2); font-size: 15px; line-height: 1.45; }
.af-rows li:first-child { border-top: 0; }
.af-facts { font: 500 11.5px/1.5 var(--mono); color: var(--muted); }
.af-miss { color: var(--faint); }
.af-miss .af-facts { color: var(--red); }

.af-agent { background: var(--teal); color: #fff; text-align: center; box-shadow: 0 18px 36px -22px rgba(29, 107, 95, .7); }
.af-agent .af-sub { color: rgba(255, 255, 255, .8); }
.af-set { box-shadow: inset 0 0 0 1.5px var(--teal), var(--lift); }
.af-opts { box-shadow: inset 0 0 0 1.5px var(--ink), var(--lift); }

.af-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.af-chip { font-size: 14.5px; line-height: 1.3; padding: 5px 11px 6px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.af-chip-out { color: var(--faint); background: transparent; box-shadow: none; outline: 1px dashed var(--dash); outline-offset: -1px; }

/* the missing-information path */
.af-fail { border: 1.5px dashed var(--dash); border-radius: 10px; padding: 14px 16px; color: var(--muted); }
.af-fail .af-title { color: var(--ink); font-size: 15.5px; }
.af-fail .af-chips { margin: 0 0 8px; }

/* arrows: a line and a chevron, drawn with pseudo-elements */
.af-arrow { --c: rgba(31, 36, 33, .55); position: relative; display: flex; align-items: center; min-height: 54px; }
.af-arrow::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 8px; width: 1.5px; margin-left: -.75px; background: var(--c); transform-origin: 50% 0; }
.af-arrow::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 8px; height: 8px; margin-left: -4.6px; border-right: 1.5px solid var(--c); border-bottom: 1.5px solid var(--c); rotate: 45deg; }
.af-arrow > span { position: relative; margin-left: calc(50% + 14px); max-width: calc(50% - 14px); font: 500 11.5px/1.35 var(--mono); color: var(--muted); }
.af-dashed { --c: var(--faint); }
.af-dashed::before { background: repeating-linear-gradient(to bottom, var(--c) 0 4px, transparent 4px 8px); }
.af-x { color: var(--red); }

/* Animate movement and arrows while keeping all diagram text readable before scrolling. */
.af.armed [data-step]:not(.af-arrow) { translate: 0 10px; }
.af.armed [data-step].on:not(.af-arrow) { translate: 0 0; transition: translate .6s cubic-bezier(.22, 1, .36, 1); }
.af.armed .af-arrow::before { transform: scaleY(0); }
.af.armed .af-arrow::after { opacity: 0; }
.af.armed .af-arrow.on::before { transform: scaleY(1); transition: transform .42s cubic-bezier(.4, 0, .2, 1); }
.af.armed .af-arrow.on::after { opacity: 1; transition: opacity .2s ease .34s; }

.af figcaption { margin-top: 24px; padding-top: 12px; border-top: 1px dashed var(--dash); font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.af-e { display: inline-block; width: 1.5em; font-style: normal; }
