/* Direction C's workflow ("From site to offer"): five steps on one rail, each step's words beside the
   product doing that step, one set of sites carried through all five (c-flow.js). The finished frame is the
   default look; c-flow.js arms a picture (.is-armed) and holds back what a beat brings (.f-later) until its
   beat (.is-in). C's alone, so it stays out of styles.css, which A shares at its 200 KB line. */
.c-flow { --f-bg: #f4f3f0; --f-line: rgb(22 22 22 / 0.12); --f-row: #ebebe8; --f-edge: #e3e3e0;
  padding: clamp(88px, 10vw, 144px) 0; border-top: 1px solid var(--c-line); }
.c-flow h2 { max-width: 15em; margin: 0 0 clamp(48px, 6vw, 88px); }
.c-path { list-style: none; padding: 0; margin: 0; }
.c-step { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 20px clamp(32px, 6vw, 96px); padding-bottom: clamp(56px, 7vw, 104px); }
.c-step:last-child { padding-bottom: 0; }

/* the rail: a hairline from each step's number to the next, inked once the step has played */
.c-step::before, .c-step::after { content: ""; position: absolute; left: 13px; top: 36px; bottom: 8px; width: 1px; background: var(--f-line); }
.c-step:last-child::before, .c-step:last-child::after { display: none; }
.c-step::after { background: var(--c-ink); transform-origin: top; transition: transform 0.9s ease; }
.c-path.is-live .c-step:not(.is-done)::after { transform: scaleY(0); }
.c-step-text { position: relative; padding-left: 52px; }
.c-node { position: absolute; left: 0; top: 0; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  font: 500 12px/1 var(--mono); background: var(--c-ink); color: #ffffff; box-shadow: 0 0 0 1px var(--c-ink); transition: background-color 0.4s, color 0.4s, box-shadow 0.4s; }
.c-path.is-live .c-step:not(.is-on) .c-node { background: #ffffff; color: var(--c-mute); box-shadow: 0 0 0 1px var(--f-line); }
.dir-c .c-flow h3 { font-family: var(--sans); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; margin: 1px 0 10px; }
.c-step-text p { font-size: 15.5px; line-height: 1.55; color: var(--c-text); max-width: 25em; }

/* each step's picture: a product window on the warm ground, running off its right and lower edges */
.c-vis { position: relative; height: 420px; border-radius: 12px; overflow: hidden; padding: 28px 0 0 28px; background: var(--f-bg); box-shadow: inset 0 0 0 1px rgb(22 22 22 / 0.05);
  font: 400 12.5px/1.45 "Inter", system-ui, sans-serif; color: var(--ink); }
.c-path.is-bare .c-vis { display: none; }
@media (scripting: none) { .c-vis { display: none; } }
.f-win { position: relative; height: calc(100% + 1px); overflow: hidden; background: #ffffff; border: 1px solid var(--f-edge); border-right: 0; border-bottom: 0;
  border-radius: 9px 0 0 0; box-shadow: 0 14px 36px -18px rgb(22 22 22 / 0.28); }
.f-mapbox { position: absolute; inset: 0; }
.f-map { display: block; }
.f-side { position: absolute; z-index: 2; left: 14px; top: 14px; bottom: 14px; width: 324px; display: flex; flex-direction: column; gap: 8px; }
.f-card { background: #ffffff; border-color: var(--f-edge); border-radius: 9px; padding: 12px 14px; gap: 8px; box-shadow: 0 6px 20px -10px rgb(22 22 22 / 0.22); }
.c-vis .muted { color: var(--mid); }
.c-vis p { margin: 0; }

/* what a beat brings, held back until its beat */
.c-vis .f-later { transition: opacity 0.42s cubic-bezier(.2,.8,.2,1), transform 0.42s cubic-bezier(.2,.8,.2,1); }
.c-vis.is-armed .f-later:not(.is-in) { opacity: 0; transform: translateY(5px); }

/* map marks */
.f-labels text, .f-tag { font: 500 10.5px "Inter", system-ui, sans-serif; paint-order: stroke; stroke: #ffffff; stroke-width: 3px; stroke-linejoin: round; }
.f-town { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; fill: #3c3c38; }
.f-village { fill: #6a6a64; }
.f-tag { font-weight: 600; fill: var(--ink); }
.f-num { font: 600 10.5px "Inter", system-ui, sans-serif; fill: #ffffff; }
.f-route { transition: opacity 0.4s; }
.f-route.is-back { opacity: 0.32; }
.f-fly { position: absolute; z-index: 3; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #ffffff; border: 2px solid #8a8a84;
  box-shadow: 0 2px 6px rgb(22 22 22 / 0.25); pointer-events: none; }

/* 1 Identify sites: two ways in, one above the other with an "or" between */
.f-find .f-side { justify-content: flex-start; }
.f-desc .f-sent { min-height: 50px; display: flex; flex-direction: column; justify-content: flex-end; }
.f-desc .msg-user { max-width: 100%; padding: 7px 10px; font-size: 12px; }
.f-desc .composer { margin: 0; min-height: 38px; padding: 7px 8px 7px 10px; align-items: center; }
.f-desc .composer .f-type:empty { display: none; }
.f-desc .composer .f-type:not(:empty) + .f-ph { display: none; }
.f-ph { flex: 1; font-style: normal; }
.f-desc .composer.is-typing .f-type::after { display: inline-block; }
.f-send { display: grid !important; place-items: center; align-self: center !important; color: #ffffff; transition: background-color 0.2s, transform 0.15s; }
.f-send svg { width: 12px; height: 12px; }
.composer.is-sending .f-send { transform: scale(0.88); }
.f-or { display: flex; align-items: center; gap: 10px; color: var(--mid); font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.f-or::before, .f-or::after { content: ""; flex: 1; height: 1px; background: rgb(22 22 22 / 0.14); }
.f-or span { padding: 3px 8px; border-radius: 10px; background: #ffffff; box-shadow: 0 0 0 1px var(--f-edge); }
.f-file { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.f-file svg { width: 15px; height: 15px; color: #1f8a3a; flex: none; }
.f-file .muted { margin-left: auto; font-weight: 400; font-size: 11.5px; }
.f-sheet { display: grid; grid-template-columns: 12px minmax(0, 1fr) max-content max-content; column-gap: 9px; font-size: 11.5px; border-top: 1px solid var(--f-row); }
.f-sheet > span { padding: 5px 0; border-bottom: 1px solid var(--f-row); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.f-sheet .f-th { color: var(--mid); font-size: 10.5px; }
.f-sheet .f-r { text-align: right; }
.f-sheet .f-sn { display: flex; flex-direction: column; color: var(--mid); font-size: 11px; line-height: 1.3; }
.f-sheet .f-sn b { font-weight: 500; font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.f-sheet .f-r { align-self: start; padding-top: 6px; }
.f-mk { display: grid; place-items: center; }
.f-mk i { width: 8px; height: 8px; border-radius: 50%; background: #8a8a84; box-shadow: 0 0 0 1.5px #ffffff, 0 0 0 2.5px #8a8a84; transition: background-color 0.3s; }
.c-vis.is-armed .f-mk i:not(.is-in) { background: #ffffff; }

/* 2 Check the grid at every site: the batch card, each row taking its ranked place as its site is judged */
.f-batch .card-title { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.f-batch .batch-rows { gap: 7px 9px; }
.c-vis[data-frag="check"] { height: 500px; }
.f-check .f-side { width: 440px; }
.f-batch .f-opts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 3px 4px; margin-top: -3px; min-width: 0; }
.f-batch .chip { display: inline-block; max-width: 100%; font-size: 11px; line-height: 16px; }
.f-batch .chip-cap { display: inline; }
.f-batch .chip-cap::before { margin: 0 4px 0 4px; }
.f-batch .chip > span:first-child, .f-check:not(.is-stack) .f-batch .cap-fig { white-space: nowrap; }
.f-batch .batch-rows .verdict { color: #1f8a3a; }
.f-batch .rank { transition: background-color 0.35s; }
.c-vis.is-armed .f-batch li:not(.is-done) .rank { background: #dcdcd8; color: transparent; }
.f-batch .name { transition: color 0.35s, background-color 0.35s; border-radius: 3px; }
.c-vis.is-armed .f-batch li:not(.is-done) .name { color: transparent; background: #efefec; }
.f-batch .cap-fig[data-state="short"] { transition: color 0.6s 0.5s; }
.c-vis.is-armed .f-batch:not(.is-ranked) .cap-fig[data-state="short"] { color: inherit; }

/* 3 Compare the options at a site: the site's head and its option chips over its map */
.f-compare { display: flex; flex-direction: column; }
.f-page-head { flex: none; position: relative; z-index: 2; padding: 13px 16px 11px; border-bottom: 1px solid var(--f-edge); background: #ffffff; display: flex; flex-direction: column; gap: 8px; }
.f-site-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.f-site-name b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.f-site-name .muted { font-size: 12px; }
.f-compare .option-rows { gap: 5px; flex-wrap: nowrap; }
.f-compare .option-rows .chip { flex: none; }
.f-compare .option-rows .chip { padding: 1px 6px 1px 1px; line-height: 18px; gap: 5px; }
.f-compare .f-mapbox { position: relative; flex: 1; min-height: 0; }
.f-compare .option-rows .chip.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.f-asset { pointer-events: none; }
.f-chain { position: absolute; z-index: 3; left: 16px; top: 96px; width: 262px; margin: 0; box-shadow: 0 10px 28px -12px rgb(22 22 22 / 0.3); }
.f-said { position: absolute; z-index: 3; left: 16px; bottom: 16px; max-width: 300px; background: #ffffff; box-shadow: 0 8px 24px -14px rgb(22 22 22 / 0.3); font-size: 12px; }

/* a member's mark (ui/src/theme.css .member-avatar): initials on their own tint */
.c-vis .av { --h: hsl(var(--lab) 70% 50%); flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font: 700 8px/1 "Inter", system-ui, sans-serif; font-style: normal; letter-spacing: 0.02em; color: var(--ink);
  background: color-mix(in srgb, var(--h) 22%, #ffffff); border: 1px solid color-mix(in srgb, var(--h) 45%, #e6e6e3); position: relative; overflow: hidden; }
.c-vis .av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 4 One record of every site: the portfolio, and the depot's page opened beside it */
.f-port { position: absolute; left: 14px; top: 14px; width: calc(50% - 22px); }
.f-rows { display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content max-content; align-items: center; font-size: 12px; }
.f-rows > span { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--f-row); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-rows > span:nth-child(4n) { padding-right: 0; }
.f-rows > .f-th { padding-top: 0; color: var(--mid); font-size: 11px; }
.f-rows .f-nm { font-weight: 500; }
.f-rows .f-me { transition: background-color 0.35s; }
.f-record.is-open .f-rows .f-me { background-color: #f3f6fb; }
.f-rows .f-vd { color: #1f8a3a; font-weight: 500; }
.f-page { overflow: hidden; }
.f-page .f-site-head { justify-content: flex-start; align-items: baseline; }
.f-page .f-site-head .muted { font-size: 12px; }
.f-stages { list-style: none; margin: 2px 0 0; padding: 0 0 8px; display: flex; gap: 10px; border-bottom: 1px solid var(--f-row); font-size: 11px; font-weight: 600; }
.f-stages li { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; white-space: nowrap; }
.f-stages i { display: block; height: 4px; border-radius: 4px; background: var(--f-row); }
.f-stages .is-full i { background: var(--ink); }
.f-stages .is-half i { background: linear-gradient(90deg, var(--ink) 50%, var(--f-row) 50%); }
.f-stages li:not(.is-full):not(.is-half) span { font-weight: 500; color: var(--mid); }
.f-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; }
.f-facts dt, .f-facts dd { margin: 0; padding: 5px 0; border-bottom: 1px solid var(--f-row); }
.f-facts dt { padding-right: 14px; color: var(--mid); }
.f-facts dd { display: flex; align-items: center; gap: 6px; min-width: 0; }
.f-page .option-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; justify-items: start; padding-right: 12px; }
.f-page .option-rows .chip { max-width: 100%; padding: 1px 6px 1px 1px; line-height: 18px; gap: 5px; white-space: nowrap; transition: box-shadow 0.3s; }
.f-page .option-rows .f-ow { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.f-page .option-rows .chip-cap { flex: none; }
.f-page .option-rows .chip.is-chosen { box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px var(--ink); }

/* 5 Coordinate the team: the depot's page, across the window */
.f-team .f-site { left: 14px; top: 14px; }
.f-lead { display: flex; }
.f-stage { display: grid; justify-items: start; }
.f-pill { grid-area: 1 / 1; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; background: #f1f1ef; box-shadow: inset 0 0 0 1px var(--f-edge); transition: opacity 0.35s, transform 0.35s; }
.f-pill.f-now { background: #e8f3ea; box-shadow: inset 0 0 0 1px #b9dcc0; color: #17672c; }
.f-stage .f-now { opacity: 1; }
.f-stage .f-was { opacity: 0; }
.c-vis.is-armed .f-stage:not(.is-moved) .f-now { opacity: 0; transform: translateY(4px); }
.c-vis.is-armed .f-stage:not(.is-moved) .f-was { opacity: 1; }
.f-site { position: absolute; top: 22px; left: 50%; right: -1px; bottom: -1px; border-radius: 9px 0 0 0; border-right: 0; border-bottom: 0; gap: 7px; font-size: 12px; }
.f-site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-bottom: 2px; }
.f-site-head b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.f-lead-line { display: inline-flex; align-items: center; gap: 6px; color: var(--mid); font-size: 11.5px; }
.f-h { font-weight: 600; font-size: 12px; margin-top: 4px !important; }
.f-task { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 11px; border: 1px solid var(--f-edge); border-radius: 9px; }
.f-who { position: relative; height: 20px; }
.f-who .f-av-was, .f-who .f-av-now { position: absolute; inset: 0; transition: opacity 0.25s; }
.f-who .av { transition: box-shadow 0.25s; }
.f-task .f-av-now, .f-task.is-ben .f-av-was { opacity: 0; }
.f-task.is-ben .f-av-now { opacity: 1; }
.f-task.is-pressed .f-av-was .av { box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px var(--ink); }
.f-pop { position: absolute; z-index: 4; top: 26px; left: -6px; display: grid; padding: 4px; min-width: 148px; background: #ffffff; border: 1px solid var(--f-edge); border-radius: 9px;
  box-shadow: 0 10px 28px -10px rgb(22 22 22 / 0.3); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.f-task.is-listing .f-pop { opacity: 1; transform: none; }
.f-pop > span { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; transition: background-color 0.2s; }
.f-task.is-picked .f-ben { background: #f1f1ef; }
.f-comment { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 1px 8px; padding: 6px 0 7px; border-bottom: 1px solid var(--f-row); }
.f-comment > :not(.av) { grid-column: 2; }
.f-when { font-size: 11px; color: var(--mid); line-height: 20px; }
.f-reply { margin-left: 28px; border-bottom: 0; }
.f-react { justify-self: start; margin-top: 3px; padding: 1px 6px; border: 1px solid var(--f-edge); border-radius: 9px; font-size: 11px; }

/* 6 Take the next step with the network: the conversation, and the site's tasks beside it */
.f-convo { position: absolute; left: 0; top: 0; bottom: 0; width: 60%; display: flex; flex-direction: column; border-right: 1px solid var(--f-edge); }
.f-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 10px; font-size: 12px; }
.f-msgs .msg-agent p + p, .f-msgs .msg-agent ul + p { margin-top: 0; }
.f-needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.f-needs li { display: flex; align-items: center; gap: 7px; }
.f-needs li::before { content: ""; flex: none; width: 13px; height: 13px; border-radius: 50%; background: #1f8a3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.8 7.2l2.1 2.1 4.3-4.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.f-convo .composer { margin: 0 14px 14px; min-height: 38px; padding: 7px 8px 7px 10px; align-items: center; }
.f-rec { position: absolute; top: 34px; left: calc(60% + 16px); right: -1px; border-radius: 9px 0 0 9px; border-right: 0; font-size: 12px; }
.f-swap { display: grid; }
.f-swap > * { grid-area: 1 / 1; transition: opacity 0.4s, transform 0.4s; }
.f-task.is-ben { grid-template-columns: 20px minmax(0, 1fr); }
.f-out { color: var(--mid); }
.f-rec .f-now { opacity: 0; transform: translateY(5px); }
.f-rec.is-sent .f-was { opacity: 0; transform: translateY(-5px); }
.f-rec.is-sent .f-now { opacity: 1; transform: none; }

@media (min-width: 1300px) { .c-vis { height: 440px; } }
@media (max-width: 900px) {
  .c-step { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .c-step-text { padding-left: 44px; }
  /* one column: each picture takes the height it needs, so no row is cut, and the rail rests between steps */
  .c-step::before, .c-step::after { display: none; }
  .c-vis, .c-vis[data-frag] { height: auto; padding: 14px 0 0 14px; }
}
/* a narrow picture (c-flow.js .is-stack): the map on top, what goes with it beneath, nothing over the map */
.f-win.is-stack { height: auto; display: flex; flex-direction: column; }
.is-stack .f-mapbox { position: relative; inset: auto; height: 230px; flex: none; }
.is-stack .f-side { position: static; width: auto; padding: 12px 14px 16px 12px; border-top: 1px solid var(--f-edge); background: #fafaf8; }
.is-stack .f-card { box-shadow: none; }
.f-compare.is-stack .f-mapbox { height: 230px; flex: none; }
.f-compare.is-stack .f-chain { position: static; width: auto; margin: 12px 14px 0 12px; box-shadow: none; }
.f-compare.is-stack .f-said { position: static; max-width: none; margin: 10px 14px 16px 12px; box-shadow: none; }
.f-team.is-stack, .f-record.is-stack { padding: 12px 14px 16px 12px; gap: 12px; }
.f-team.is-stack .f-site, .f-record.is-stack .f-port, .f-record.is-stack .f-site { position: static; width: auto; border-radius: 9px; border: 1px solid var(--f-edge); }
.f-record.is-stack .f-stages { overflow: hidden; } /* the line runs off the edge, as the site page scrolls it below 520px */
.f-record.is-stack .f-stages li { flex: none; }
.f-next.is-stack .f-convo { position: static; width: auto; border-right: 0; }
.f-next.is-stack .f-rec { position: static; margin: 0 14px 16px 12px; border-radius: 9px; border: 1px solid var(--f-edge); }
@media (prefers-reduced-motion: reduce) {
  .c-step::after, .c-node, .c-vis * { transition: none !important; }
}
