/* "Every hand-off, connected" flow map, 31 October 2026. Uses the site tokens in styles.css. */
.cflow {
  --card: var(--surface-2);
  --leak: oklch(0.66 0.19 25);
  --leak-text: oklch(0.78 0.12 25);
  --leak-card: oklch(0.2 0.035 18);
  --violet: var(--brand-purple-light);
}
.cflow .section-intro.wide { margin-bottom: 0; }
.cflow .section-intro p { max-width: 44rem; }
.fm-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* bar: world switch, controls, status */
.fm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 2rem 0 14px; }
.fm-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.fm-switch button { position: relative; z-index: 1; font: 600 14px/1 var(--body); color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 10px 14px; cursor: pointer; transition: color .3s; white-space: nowrap; }
.fm-switch button[aria-pressed="true"], .fm-switch button:hover { color: var(--ink); }
.fm-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 7px; background: var(--surface-2); border: 1px solid var(--steel-deep); transition: transform .5s var(--ease-out), border-color .4s; }
.fm-switch[data-w="crodros"] .fm-thumb { transform: translateX(100%); }
.fm-switch[data-w="typical"] .fm-thumb { border-color: color-mix(in oklch, var(--leak) 55%, transparent); }
.fm-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-ctl button { font: 600 14px/1 var(--body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease-out); }
.fm-ctl button:hover { border-color: var(--steel-deep); }
.fm-ctl .fm-go { background: var(--steel-fill); border-color: var(--steel-fill); color: #fff; }
.fm-ctl .fm-go:hover { background: var(--action-hover); border-color: var(--action-hover); }
.fm-ctl button:active, .fm-approve:active { transform: scale(.97); }
.fm-status { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; font: 500 13.5px/1.25 var(--body); color: var(--muted); }
.fm-status b { color: var(--ink); font-weight: 600; }
.fm-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); flex: none; }
.fm-status.typ i { background: var(--leak); box-shadow: 0 0 8px var(--leak); }

/* the board */
.fm-wrap { position: relative; }
.fm-board { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 oklch(1 0 0 / .03) inset; }
.fm-stage { position: relative; height: 380px; transition: height .55s var(--ease-out); }
.fm-cv { position: absolute; left: 0; top: 0; pointer-events: none; }
.fm-sh { position: absolute; top: 0; height: 44px; padding: 15px 0 0 8px; font: 600 12.5px/1 var(--body); letter-spacing: .01em; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; transition: color .4s; }
.fm-sh::before { content: ""; position: absolute; left: 0; bottom: -4px; width: 1px; height: 7px; background: var(--steel-deep); }
.fm-sh.on { color: var(--ink); }
.is-v .fm-sh { height: 22px; padding: 0; display: flex; align-items: center; gap: 10px; border: 0; }
.is-v .fm-sh::before { display: none; }
.is-v .fm-sh::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.is-v .fm-sh span { background: var(--surface); padding-right: 2px; }

/* live cards */
.cd { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; padding: 10px 11px 9px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left; font: inherit; cursor: pointer;
  transform-origin: 0 0; box-shadow: 0 10px 24px -16px rgb(0 0 0 / .9);
  transition: border-color .35s, opacity .4s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s; }
.business-site .cd:focus-visible { outline-offset: 3px; }
.cd-l { font: 600 13.5px/1.15 var(--body); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cd-s { display: flex; align-items: center; gap: 7px; min-height: 15px; font: 500 12px/1.2 var(--body); color: var(--muted); overflow: hidden; white-space: nowrap; }
.cd-s .t { display: inline-block; overflow: hidden; text-overflow: ellipsis; }
.cd-bar { position: absolute; left: 10px; right: 10px; bottom: -1px; height: 1px; background: var(--steel); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; transition: opacity .4s; }
.cd.run .cd-bar { opacity: 1; }
.cd-ring { position: absolute; inset: -1px; border-radius: 11px; border: 1px solid var(--steel); opacity: 0; pointer-events: none; transform-origin: 50% 50%; }
.cd-ring[data-t="ai"] { border-color: var(--violet); }
.cd-ring[data-t="red"] { border-color: var(--leak); }
.cd-ring[data-t="amber"] { border-color: var(--amber); }
.cd.busy, .cd.on, .cd.lift { border-color: var(--steel); }
.cd.on { box-shadow: 0 0 0 1px color-mix(in oklch, var(--steel) 40%, transparent), 0 12px 26px -16px rgb(0 0 0 / .95); }
.cd.on .cd-s .t, .cd.busy .cd-s .t { color: var(--ink); }
.cd.lift { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgb(0 0 0 / .95), 0 0 0 1px color-mix(in oklch, var(--steel) 25%, transparent); }
.cd.cd-hero { padding: 12px 13px 11px; }
.cd.cd-hero .cd-l { font-size: 15px; }
.cd.wait { border-color: var(--amber); box-shadow: 0 0 0 1px color-mix(in oklch, var(--amber) 45%, transparent), 0 12px 26px -16px rgb(0 0 0 / .95); }
.cd.wait .cd-s .t { color: var(--amber); font-weight: 600; }
.cd.wait .cd-ring { border-color: var(--amber); animation: fm-breathe 1.6s ease-out infinite; }
@keyframes fm-breathe { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06, 1.22); } }
.fm-stage.pre .cd, .fm-stage.pre .fm-sh { opacity: 0; }
.tight .cd-s { white-space: normal; align-items: flex-start; min-height: 29px; overflow: visible; }
.tight .cd-s .t { overflow: visible; }
.tight .cd-s .g { margin-top: 2px; }
.fm-stage.focus .cd:not(.lift):not(.near) { opacity: .34; }
.fm-stage.follow .cd:not(.seen) { opacity: .42; }
.cd.k-leak { border-color: color-mix(in oklch, var(--leak) 60%, transparent); background: var(--leak-card); }
.k-leak .cd-s .t { color: var(--leak-text); }
.cd.k-leak.lift { border-color: var(--leak); }
.cd-q { position: absolute; top: -10px; right: -6px; padding: 4px 7px; border-radius: 6px; background: var(--amber); color: oklch(0.2 0.03 85); font: 600 12px/1 var(--body); white-space: nowrap; box-shadow: 0 4px 12px -4px rgb(0 0 0 / .8); }
.cd-q b { font-weight: 700; }

/* player glyphs */
.cflow .g { display: inline-block; flex: none; width: 10px; height: 10px; position: relative; }
.g-src { border: 2px solid var(--ink); border-radius: 50%; }
.cflow .g-auto { width: 9px; height: 9px; background: var(--steel-fill); border: 1.5px solid var(--steel); border-radius: 2.5px; }
.g-team { background: var(--ink); border-radius: 50%; }
.cd-hero .g-team { width: 12px; height: 12px; }
.g-leak { border: 2px solid var(--leak); border-right-color: transparent; border-radius: 50%; transform: rotate(45deg); }
.cflow .g-ai { width: 16px; height: 16px; margin: -3px -2px; }
.cd.run .g-ai { animation: fm-spin 1.6s linear infinite; }
@keyframes fm-spin { to { transform: rotate(360deg); } }
.cd.ok .g-team { background: var(--live); }
.cd.ok .g-team::after { content: ""; position: absolute; left: 4px; top: 2px; width: 3px; height: 6px; border: solid var(--bg); border-width: 0 1.7px 1.7px 0; transform: rotate(45deg); }

/* caption card */
.fm-cap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 12px; padding: 18px 20px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-height: 150px; }
.fm-cap.has-side { grid-template-columns: minmax(0, 1fr) 260px; }
.fm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font: 500 13px/1.2 var(--body); color: var(--muted); }
.fm-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font: 600 13px/1 var(--body); }
.fm-chip .g-live { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.fm-chip .g-red { width: 7px; height: 7px; border-radius: 50%; background: var(--leak); }
.business-site .cflow .fm-title { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.15; letter-spacing: -.025em; margin: 10px 0 6px; text-wrap: wrap; }
.fm-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; }
.fm-title .w > span { display: inline-block; animation: fm-rise .55s var(--ease-out) both; animation-delay: calc(var(--k) * 50ms); }
@keyframes fm-rise { from { transform: translateY(105%); } }
.fm-text { margin: 0; color: var(--muted); max-width: 60ch; animation: fm-fade .6s var(--ease-out) .12s both; }
@keyframes fm-fade { from { opacity: 0; transform: translateY(6px); } }
.fm-gate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.fm-gate[hidden] { display: none; }
.fm-approve { font: 600 15px/1 var(--body); color: #fff; background: var(--steel-fill); border: 0; border-radius: var(--radius); padding: 13px 18px; cursor: pointer; transition: background .2s, transform .2s var(--ease-out); }
.fm-approve:hover { background: var(--action-hover); }
.fm-gate span { font-size: 14px; color: var(--muted); }
.fm-gate .wait { color: var(--amber); font-weight: 600; }
.fm-side { border-left: 1px solid var(--line); padding-left: 22px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.fm-side[hidden] { display: none; }
.fm-clock { margin: 0; font: 600 32px/1 var(--display); letter-spacing: -.025em; color: var(--steel); }
.fm-ticks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.fm-ticks i { height: 4px; border-radius: 2px; background: var(--line); transition: background .4s; }
.fm-ticks i.done { background: var(--steel-deep); }
.fm-ticks i.done.k-ai { background: var(--brand-purple); }
.fm-ticks i.done.k-team { background: var(--muted); }
.fm-ticks i.now { background: var(--steel); }
.fm-ticks i.now.k-ai { background: var(--violet); }
.fm-ticks i.now.k-team { background: var(--amber); }
.fm-sidecap { margin: 0; font: 500 13px/1.3 var(--body); color: var(--muted); }

/* foot: legend and the illustrative line */
.fm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 16px; }
.fm-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font: 500 13.5px/1.2 var(--body); color: var(--muted); }
.fm-legend li { display: flex; align-items: center; gap: 8px; }
.fm-legend li[hidden] { display: none; }
.cf-note { font-size: 13px; color: var(--muted); margin: 0 0 0 auto; }

/* phone: stages run down, the caption card rides along at the bottom */
.is-v .fm-cap { position: sticky; bottom: 10px; z-index: 5; padding: 14px 16px 16px; min-height: 0; box-shadow: 0 -14px 34px -12px rgb(0 0 0 / .85); }
.is-v .fm-cap.has-side { grid-template-columns: minmax(0, 1fr); }
.is-v .fm-side { display: none; }
.business-site .cflow.is-v .fm-title { font-size: 1.35rem; margin: 8px 0 4px; }
.is-v .fm-text { font-size: 15.5px; line-height: 1.5; }
.is-v .cd { padding: 9px 9px 8px; gap: 6px; }
.is-v .cd-l { font-size: 12.5px; }
.is-v .cd.cd-hero .cd-l { font-size: 13.5px; }
.is-v .cd-s { gap: 6px; }
.fm-cap:not(.has-side) #fm-time:empty { display: none; }
.fm-cap.has-side #fm-time { display: none; }
.is-v .fm-cap.has-side #fm-time { display: inline; }
@media (max-width: 860px) {
  .fm-status { margin-left: 0; width: 100%; }
  .cf-note { margin-left: 0; }
}
@media (max-width: 480px) {
  .fm-bar { gap: 10px; }
  .fm-switch { width: 100%; }
  .fm-switch button { padding: 11px 6px; font-size: 13.5px; }
  .fm-ctl { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .fm-ctl .fm-go { grid-column: 1 / -1; }
  .fm-ctl button { padding: 12px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cd, .fm-thumb, .fm-stage, .fm-sh, .fm-ticks i, .cd-bar { transition: none; }
  .cd.wait .cd-ring, .cd.run .g-ai, .fm-title .w > span, .fm-text { animation: none; }
  .cd.wait .cd-ring { opacity: .9; }
}
