/* Figures on stops: the work rebuilt with made-up people and numbers. The map's stop cards and the project pages
   both show them. Each one inks in once its box gets the class "in"; until then the moving parts wait unseen. */
.fig { display: grid; gap: 10px; color: var(--ink); font-family: var(--f-body); }
.fig ul, .fig ol { margin: 0; padding: 0; list-style: none; }
.fig p { margin: 0; }
.fig .key { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 12px/1.3 var(--f-mono); color: var(--ink-2); }
.fig .key li { display: inline-flex; align-items: center; gap: 7px; }
.fig .key i { flex: none; }
@keyframes figIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes figFade { from { opacity: 0; } to { opacity: 1; } }

/* availability: a dot per engineer. The ones the schedule called free light up, then most go back to busy */
.f-avail .dots { display: grid; grid-template-columns: repeat(18, 1fr); gap: 5px; max-width: 380px; }
.f-avail .dots i, .f-avail .key i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--rule); }
.f-avail .key i { width: 11px; }
.f-avail .key i.l { border: 1.5px dashed color-mix(in srgb, var(--c) 45%, transparent); }
.f-avail .key i.r { background: var(--c); border-color: var(--c); }
.f-avail .key .k1, .f-avail .key .k2 { opacity: 0; }
.f-avail.in .key .k1 { animation: figFade .5s .9s both; }
.f-avail.in .key .k2 { animation: figFade .5s 2.2s both; }
.f-avail.in .dots i.l { animation: avL 2.6s var(--soft) calc(.3s + var(--i) * 45ms) both; }
.f-avail.in .dots i.r { animation: avR 2.6s var(--soft) calc(.3s + var(--i) * 45ms) both; }
@keyframes avL {
  0% { border-color: var(--rule); }
  22%, 55% { border-color: var(--c); border-style: dashed; }
  100% { border-color: color-mix(in srgb, var(--c) 45%, transparent); border-style: dashed; }
}
@keyframes avR {
  0% { border-color: var(--rule); }
  22%, 55% { border-color: var(--c); border-style: dashed; background: transparent; }
  100% { border-color: var(--c); border-style: solid; background: var(--c); }
}

/* ranking: the request in plain words, the search Claude fills from it, the formula's list with its evidence */
.f-rank .ask { font-family: var(--f-serif); font-style: italic; font-size: 17px; line-height: 1.35; }
.f-rank .lab { font: 11.5px/1.2 var(--f-mono); color: var(--ink-3); margin-top: 2px; }
.f-rank .fields { display: flex; flex-wrap: wrap; gap: 6px; }
.f-rank .fields span { font: 500 12px/1 var(--f-mono); padding: 6px 9px; border-radius: 999px; border: 1px solid var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 7%, var(--card)); }
.f-rank .rows { display: grid; border-top: 1px solid var(--rule); }
.f-rank .rows li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.f-rank .n { font: 500 18px/1.1 var(--f-serif); color: var(--c); }
.f-rank .per { display: grid; gap: 4px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.f-rank .per b { color: var(--ink); font-weight: 600; font-size: 14px; }
.f-rank .per em { display: block; height: 4px; width: var(--w); border-radius: 2px; background: var(--c); transform-origin: left; }
.f-rank .per small { font: 11.5px/1.3 var(--f-mono); color: var(--ink-2); }
.f-rank .free { text-align: right; font: 11.5px/1.25 var(--f-mono); color: var(--ink-3); }
.f-rank .free b { display: block; font: 500 17px/1.1 var(--f-serif); color: var(--ink); }
.f-rank .ask, .f-rank .lab, .f-rank .fields span, .f-rank .rows li { opacity: 0; }
.f-rank.in .ask { animation: figIn .5s var(--soft) .15s both; }
.f-rank.in .lab:nth-of-type(1) { animation: figIn .5s var(--soft) .55s both; }
.f-rank.in .fields span { animation: figIn .45s var(--soft) calc(.75s + var(--i) * .12s) both; }
.f-rank.in .lab:nth-of-type(2) { animation: figIn .5s var(--soft) 1.35s both; }
.f-rank.in .rows li { animation: figIn .5s var(--soft) calc(1.55s + var(--i) * .16s) both; }
.f-rank.in .per em { animation: grow .8s var(--soft) calc(1.75s + var(--i) * .16s) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }

/* the checklist: every step by phase, the automated ones inking in one after another */
.f-steps { gap: 12px; }
.f-steps .phase { display: grid; gap: 6px; }
.f-steps .phase > span { font: 12px/1.2 var(--f-mono); color: var(--ink-2); }
.f-steps .cells { display: flex; flex-wrap: wrap; gap: 4px; }
.f-steps .cells i, .f-steps .key i { width: 16px; height: 16px; border-radius: 3px; }
.f-steps .key i { width: 13px; height: 13px; }
.f-steps i.a { border: 1.5px solid var(--c); }
.f-steps .key i.a { background: var(--c); }
.f-steps i.h { border: 1.5px solid var(--ink-3); }
.f-steps i.s { border: 1px solid var(--rule); background: repeating-linear-gradient(135deg, var(--rule) 0 2px, transparent 2px 5px); }
.f-steps .cells i { opacity: 0; }
.f-steps.in .cells i { animation: figFade .3s calc(.1s + var(--i) * 18ms) both; }
.f-steps.in .cells i.a { animation: figFade .3s calc(.1s + var(--i) * 18ms) both, stFill .5s var(--soft) calc(.8s + var(--i) * 40ms) both; }
@keyframes stFill { from { background: transparent; transform: scale(.7); } to { background: var(--c); transform: none; } }

/* before and after: copies emailed in and typed again, slowly; then phones feeding one list, at once */
.f-ba { container-type: inline-size; }
.ba-w { display: grid; gap: 16px; }
.ba-h { display: grid; gap: 8px; align-content: start; }
.ba-l { font: 12px/1.3 var(--f-mono); color: var(--ink-2); }
.ba-a .ba-l { color: var(--c); }
.f-ba svg { display: block; width: 100%; max-width: 400px; height: auto; overflow: visible; }
.f-ba .pg { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.2; }
.f-ba .hd { fill: var(--rule); }
.f-ba .hd2, .f-ba .dt { fill: var(--c); }
.f-ba .gl { fill: none; stroke: var(--rule); stroke-width: 1; }
.f-ba .nm { fill: var(--rule); }
.f-ba .w { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 4 4; }
.f-ba .wb { fill: none; stroke: color-mix(in srgb, var(--c) 30%, var(--rule)); stroke-width: 1.4; }
.f-ba .wp { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 8 200; stroke-dashoffset: 8; opacity: 0; }
.f-ba .env rect, .f-ba .env path { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.f-ba .k, .f-ba .sc { fill: var(--c); opacity: 0; }
.f-ba .s, .f-ba .w, .f-ba .env, .f-ba .m, .f-ba .fn, .f-ba .wb, .f-ba .ls { opacity: 0; }
.f-ba.in .s { animation: figIn .45s var(--soft) calc(.1s + var(--i) * .14s) both; }
.f-ba.in .w { animation: figFade .4s calc(.6s + var(--i) * .1s) both, crawl 1.1s linear infinite; }
.f-ba.in .env { animation: figFade .4s .8s both; }
.f-ba.in .m { animation: figIn .45s var(--soft) 1.1s both; }
.f-ba.in .k { animation: key .2s calc(1.6s + var(--i) * .45s) both; }
.f-ba.in .fn { animation: figIn .45s var(--soft) calc(.5s + var(--i) * .1s) both; }
.f-ba.in .wb { animation: figFade .4s .9s both; }
.f-ba.in .ls { animation: figIn .45s var(--soft) 1s both; }
.f-ba.in .wp { animation: pulse 1.5s cubic-bezier(.45, 0, .55, 1) calc(1.3s + var(--i) * .22s) infinite; }
.f-ba.in .sc { animation: key .25s calc(2s + var(--i) * .1s) both; }
@keyframes crawl { to { stroke-dashoffset: -16; } }
@keyframes key { from { opacity: 0; } to { opacity: .85; } }
@keyframes pulse { 0% { stroke-dashoffset: 8; opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: -100; opacity: 0; } }
@container (min-width: 600px) { .ba-w { grid-template-columns: 1fr 1fr; gap: 28px; } }

/* the app, rebuilt: one phone stepping through its three screens on a 12-second loop */
.f-app { container-type: inline-size; }
.ap-w { display: grid; justify-items: center; gap: 16px; }
.ap-ph { width: 200px; height: 356px; border: 6px solid var(--ink); border-radius: 28px; background: var(--card); overflow: hidden; box-shadow: 0 18px 34px -22px rgba(27, 26, 23, .45); }
.ap-tr { display: flex; width: 300%; height: 100%; }
.ap-s { flex: none; width: 33.3334%; display: flex; flex-direction: column; font-size: 10px; line-height: 1.3; color: var(--ink); }
.ap-hd { flex: none; padding: 14px 10px 9px; background: var(--ink-2); color: var(--card); font: 500 12.5px/1.2 var(--f-body); text-align: center; }
.ap-pr { flex: none; height: 4px; background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.ap-pr i { display: block; height: 100%; background: var(--c); }
.ap-bd { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 0; }
.ap-q { padding: 5px 7px; border-radius: 4px; background: var(--paper); color: var(--ink-3); }
.ap-mt { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 9.5px; }
.ap-ls, .ap-bn, .ap-sm { border: 1px solid var(--rule); border-radius: 5px; }
.ap-ls li, .ap-bn li, .ap-sm li { border-bottom: 1px solid var(--rule); }
.ap-ls li:last-child, .ap-bn li:last-child, .ap-sm li:last-child { border-bottom: 0; }
.ap-ls li { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 7px; }
.ap-ls li > span { display: grid; gap: 3px; }
.ap-ls b, .ap-sm span { font-weight: 600; font-size: 10px; }
.ap-mk { display: flex; gap: 2px; }
.ap-mk i { width: 6px; height: 6px; border: 1px solid var(--ink-3); border-radius: 1px; }
.ap-mk i.on { background: var(--c); border-color: var(--c); }
.ap-ls em, .ap-sm em { font-style: normal; font-size: 9px; color: var(--ink-3); white-space: nowrap; }
.ap-bn li { padding: 5px 7px; }
.ap-rd { text-align: center; font-size: 10px; color: var(--c); opacity: 0; }
.ap-rd b { font: 500 15px/1 var(--f-serif); }
.ap-sl { position: relative; height: 16px; margin: 0 8px; }
.ap-sl::before, .ap-fl { content: ""; position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; }
.ap-sl::before { right: 0; background: var(--rule); }
.ap-fl { width: 0; background: var(--c); }
.ap-th { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--card); }
.ap-sm li { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; align-items: center; padding: 5px 7px; }
.ap-sm b { grid-row: span 2; font: 500 13px/1 var(--f-serif); color: var(--c); }
.ap-ft { flex: none; display: flex; gap: 7px; padding: 10px 9px 12px; }
.ap-ft span { flex: 1; padding: 7px 0; border: 1px solid var(--ink-3); border-radius: 999px; text-align: center; font-size: 10.5px; color: var(--ink-2); }
.ap-ft span.on { background: var(--ink-2); border-color: var(--ink-2); color: var(--card); }
.ap-st { display: grid; gap: 7px; font: 12px/1.3 var(--f-mono); color: var(--ink-3); }
.ap-st li { display: flex; align-items: center; gap: 9px; }
.ap-st b { flex: none; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 500; font-size: 11px; }
@container (min-width: 480px) { .ap-w { grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 36px; } .ap-st { gap: 14px; font-size: 13px; } }
.f-app.in .ap-tr { animation: apTr 12s var(--soft) infinite; }
.f-app.in .ap-tap { animation: apTap 12s infinite; }
.f-app.in .ap-th { animation: apTh 12s infinite; }
.f-app.in .ap-fl { animation: apFl 12s infinite; }
.f-app.in .ap-bn li.ap-hit { animation: apHit 12s infinite; }
.f-app.in .ap-rd { animation: apRd 12s infinite; }
.f-app.in .ap-sm li { animation: apRow 12s calc(var(--i) * .15s) infinite both; }
.f-app.in .ap-st li { animation: apSt 12s infinite both; }
@keyframes apTr { 0%, 30% { transform: none; } 34%, 63% { transform: translateX(-33.3333%); } 67%, 95% { transform: translateX(-66.6667%); } 99%, 100% { transform: none; } }
@keyframes apTap { 0%, 13% { background: transparent; } 16%, 31% { background: color-mix(in srgb, var(--c) 14%, transparent); } 34%, 100% { background: transparent; } }
@keyframes apTh { 0%, 38% { left: 0; animation-timing-function: steps(17, end); } 53%, 100% { left: var(--to); } }
@keyframes apFl { 0%, 38% { width: 0; animation-timing-function: steps(17, end); } 53%, 100% { width: var(--to); } }
@keyframes apHit { 0%, 53% { background: transparent; color: inherit; } 56%, 100% { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); } }
@keyframes apRd { 0%, 53% { opacity: 0; } 56%, 100% { opacity: 1; } }
@keyframes apRow { 0%, 66% { opacity: 0; } 69%, 100% { opacity: 1; } }
@keyframes apSt { 0%, 30% { color: var(--ink); } 33%, 100% { color: var(--ink-3); } }

@media (prefers-reduced-motion: reduce) {
  .fig.in *, .fig.in .key li { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .f-ba.in .w, .f-ba.in .wp, .f-app.in * { animation: none !important; }
  .f-ba.in .w { opacity: 1; }
}
