/* Colleague: the design system for working with agents on the phone.
   Near-black, one sans, and everything is a sentence. Colour is the agents.
   Dark first; a light theme exists for the members panel and daylight. */

:root {
  --c-ground: #0B0B0C; --c-surface: #151517; --c-surface-2: #1F1F22; --c-surface-3: #2A2A2E;
  --c-line: #232326; --c-line-strong: #3A3A40;
  --c-ink: #ECECEE; --c-ink-2: #A1A1A8; --c-ink-3: #6E6E76;
  --c-me: #3C3C42; --c-them: #1A1A1D;
  --c-raju: #F5A524; --c-nila: #38B2AC; --c-ruhi: #8B6CFF;
  --c-red: #EF5A4E; --c-orange: #F97435; --c-pink: #F25DA8; --c-blue: #4C8DFF; --c-green: #3DBE7A; --c-yellow: #F5C542;
  --c-eye: #16161A;
  --c-attention: #F5C542; --c-blocked: #EF5A4E; --c-ok: #3DBE7A;
  --c-sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --c-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --c-tap: 44px;
}
:root[data-theme="light"], .cl-light {
  --c-ground: #FFFFFF; --c-surface: #F6F6F7; --c-surface-2: #EDEDEF; --c-surface-3: #E2E2E5;
  --c-line: #E6E6E9; --c-line-strong: #C9C9CE;
  --c-ink: #141416; --c-ink-2: #5C5C64; --c-ink-3: #8C8C94;
  --c-me: #141416; --c-them: #F0F0F2;
}

/* ---------- page ---------- */
.cl { background: var(--c-ground); color: var(--c-ink); font: 16px/1.5 var(--c-sans); -webkit-font-smoothing: antialiased; margin: 0; }
.cl *, .cl *::before, .cl *::after { box-sizing: border-box; }
.cl h1, .cl h2, .cl h3 { font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.cl h1 { font-size: clamp(2rem, 6vw, 3rem); }
.cl h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); }
.cl h3 { font-size: 1.05rem; }
.cl p { margin: 0; max-width: 60ch; }
.cl a { color: inherit; }
.cl-wrap { width: min(100% - 2.5rem, 52rem); margin: 0 auto; }
.cl-eyebrow { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink-3); font-weight: 500; }
.cl-muted { color: var(--c-ink-2); }
.cl-dim { color: var(--c-ink-3); }
.cl-small { font-size: .88rem; }
.cl-mono { font-family: var(--c-mono); font-size: .85em; }
.cl-lede { color: var(--c-ink-2); margin: .5rem 0 1.5rem; }
.cl-section { padding: 3rem 0; border-top: 1px solid var(--c-line); }
.cl-hero { padding: 3.5rem 0 2rem; }
.cl-stack { display: grid; gap: 1rem; }
.cl-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.cl-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cl-panel { background: var(--c-surface); border-radius: 18px; padding: 1.25rem; display: grid; gap: .9rem; }
.cl-panel > h4 { margin: 0; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); font-weight: 500; }
.cl-note { font-size: .84rem; color: var(--c-ink-2); }
.cl-toc { display: flex; gap: .4rem .5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.cl-toc a { font-size: .82rem; text-decoration: none; padding: .4rem .7rem; border-radius: 999px; background: var(--c-surface); color: var(--c-ink-2); }
.cl-toc a:hover { color: var(--c-ink); background: var(--c-surface-2); }
.cl-caption { font-size: .84rem; color: var(--c-ink-2); margin-top: .75rem; }

/* ---------- the face ---------- */
/* Colour only; the motion is springs in colleague.js. */
agent-face { display: inline-block; position: relative; width: var(--size, 40px); height: var(--size, 40px); flex: 0 0 auto; vertical-align: middle; --hue: var(--c-blue); }
agent-face[name="raju"] { --hue: var(--c-raju); }
agent-face[name="nila"] { --hue: var(--c-nila); }
agent-face[name="ruhi"] { --hue: var(--c-ruhi); }
agent-face[hue="red"] { --hue: var(--c-red); } agent-face[hue="orange"] { --hue: var(--c-orange); } agent-face[hue="pink"] { --hue: var(--c-pink); }
agent-face[hue="blue"] { --hue: var(--c-blue); } agent-face[hue="green"] { --hue: var(--c-green); } agent-face[hue="yellow"] { --hue: var(--c-yellow); }
agent-face svg { width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 50%; will-change: transform; }
agent-face .fill { fill: var(--hue); transition: fill .4s; }
agent-face .ink { fill: var(--c-eye); }
agent-face .mouth { stroke: var(--c-eye); stroke-linecap: round; opacity: 0; }
agent-face .bang { opacity: 0; }
agent-face .bang .ink { fill: var(--hue); }
agent-face .rings circle { stroke: var(--hue); }
agent-face .dots circle { fill: var(--hue); }
agent-face[state="off"] { --hue: var(--c-surface-3); opacity: .8; }
agent-face[state="off"] .ink { fill: var(--c-ink-3); }

/* people and customers: a letter, never a face */
.cl-av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: .95rem; flex: 0 0 auto; background: var(--c-surface-3); color: var(--c-ink); }
.cl-av.client { background: var(--c-surface-2); color: var(--c-ink-2); }
.cl-av.sm, agent-face.sm { --size: 28px; width: 28px; height: 28px; font-size: .74rem; }
.cl-stackav { display: inline-flex; align-items: center; }
.cl-stackav > * { margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--c-ground); }
.cl-stackav > *:first-child { margin-left: 0; }

/* ---------- roster ---------- */
.cl-roster { display: grid; gap: .25rem; }
.cl-roster > a, .cl-roster > div { display: grid; grid-template-columns: 56px 1fr auto; gap: .9rem; align-items: center; padding: .6rem .5rem; border-radius: 14px; text-decoration: none; min-height: 72px; }
.cl-roster > a:hover { background: var(--c-surface); }
.cl-roster .name { font-weight: 600; font-size: 1.05rem; }
.cl-roster .last { color: var(--c-ink-2); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.cl-roster .t { color: var(--c-ink-3); font-size: .85rem; align-self: start; padding-top: .35rem; }
.cl-project { display: grid; gap: .35rem; }
.cl-project .head { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 500; padding: .3rem 0 .5rem; }
.cl-project .head i { width: 18px; height: 14px; border: 1.5px solid var(--c-ink-2); border-radius: 3px; border-top-width: 3px; }
.cl-project a { display: block; padding: .45rem 0 .45rem 1.75rem; color: var(--c-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .98rem; }
.cl-project a.more { color: var(--c-ink-3); }

/* ---------- transcript ---------- */
.cl-chat { display: grid; gap: .55rem; }
.cl-time { text-align: center; color: var(--c-ink-3); font-size: .82rem; padding: .25rem 0; }
.cl-bubble { border-radius: 20px; padding: .7rem 1rem; font-size: 1rem; line-height: 1.45; max-width: 88%; width: fit-content; }
.cl-bubble.them { background: var(--c-them); color: var(--c-ink); }
.cl-bubble.me { background: var(--c-me); color: #fff; margin-left: auto; }
.cl-bubble.client { background: var(--c-them); color: var(--c-ink); border: 1px solid var(--c-line); }
.cl-bubble.them + .cl-bubble.them { margin-top: -.25rem; }
.cl-from { font-size: .78rem; color: var(--c-ink-3); padding: .2rem .5rem 0; display: flex; align-items: center; gap: .4rem; }
.cl-event { text-align: center; color: var(--c-ink-3); font-size: .9rem; padding: .35rem 0; display: flex; justify-content: center; align-items: center; gap: .35rem; flex-wrap: wrap; }
.cl-event agent-face, .cl-event .cl-av { --size: 20px; width: 20px; height: 20px; font-size: .6rem; }
.cl-event b { color: var(--c-ink-2); font-weight: 500; }
.cl-event .pill { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem .15rem .35rem; border-radius: 999px; background: color-mix(in srgb, var(--hue, var(--c-ruhi)) 22%, transparent); color: var(--hue, var(--c-ruhi)); font-weight: 500; }
.cl-event .pill.ruhi { --hue: var(--c-ruhi); } .cl-event .pill.raju { --hue: var(--c-raju); } .cl-event .pill.nila { --hue: var(--c-nila); }
.cl-attach { display: inline-flex; align-items: center; gap: .5rem; margin-top: .5rem; padding: .4rem .6rem; border-radius: 12px; background: var(--c-surface-2); font-size: .84rem; color: var(--c-ink-2); }
.cl-attach .frames { display: flex; gap: 3px; }
.cl-attach .frames i { width: 22px; height: 14px; border-radius: 3px; background: var(--c-surface-3); }

/* delegation: a dark pill, a faint border in the colour of whoever is asked,
   and the faces of everyone in it as small discs overlapping its ends */
.cl-ask { display: inline-flex; align-items: center; --hue: var(--c-ruhi); }
.cl-ask.ruhi { --hue: var(--c-ruhi); } .cl-ask.nila { --hue: var(--c-nila); } .cl-ask.raju { --hue: var(--c-raju); }
.cl-ask .pill { display: inline-flex; align-items: center; gap: .6rem; height: 44px; padding: 0 1.1rem 0 1rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--hue) 28%, var(--c-line)); background: var(--c-surface); color: color-mix(in srgb, var(--hue) 70%, #fff); font-size: 1rem; font-weight: 400; white-space: nowrap; position: relative; z-index: 1; }
.cl-ask .dots { display: inline-flex; gap: 5px; }
.cl-ask .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--hue); opacity: .35; animation: cl-dot 1.2s ease-in-out infinite; }
.cl-ask .dots i:nth-child(2) { animation-delay: .2s; } .cl-ask .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes cl-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.cl-ask agent-face { --size: 44px; width: 44px; height: 44px; padding: 9px; border-radius: 50%; background: var(--c-surface-2); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--hue) 45%, var(--c-line-strong)), 0 0 0 4px var(--c-ground); position: relative; z-index: 2; }
.cl-ask agent-face + agent-face { margin-left: -8px; }
.cl-ask .pill + agent-face { margin-left: -12px; }
.cl-ask agent-face + .pill { margin-left: -12px; padding-left: 1.4rem; }
@media (prefers-reduced-motion: reduce) { .cl-ask .dots i { animation: none; opacity: .8; } }

/* work previews: what an agent is doing, without leaving the conversation */
.cl-preview { background: var(--c-surface); border-radius: 18px; min-height: 150px; display: grid; place-items: center; padding: 1rem; overflow: hidden; position: relative; }
.cl-preview .typing { display: inline-flex; gap: 6px; padding: .8rem 1.1rem; border-radius: 999px; background: var(--c-surface-2); }
.cl-preview .typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink); opacity: .35; animation: cl-dot 1.2s ease-in-out infinite; }
.cl-preview .typing i:nth-child(2) { animation-delay: .2s; } .cl-preview .typing i:nth-child(3) { animation-delay: .4s; }
.cl-preview .doing { display: flex; align-items: center; gap: .6rem; color: var(--c-ink); font-size: 1.05rem; }
.cl-preview .doing i { width: 18px; height: 18px; border: 2px solid var(--c-ink-2); border-radius: 50%; position: relative; }
.cl-preview .doing i::after { content: ""; position: absolute; width: 2px; height: 8px; background: var(--c-ink-2); right: -5px; bottom: -6px; transform: rotate(-45deg); }
.cl-preview .doing .sub { color: var(--c-ink-3); }
.cl-preview .log { display: grid; gap: .55rem; font-size: 1rem; width: 100%; justify-items: start; mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.cl-preview .log div { color: var(--c-ink); white-space: nowrap; }
.cl-preview .log span { color: var(--c-ink-3); }
.cl-preview .log .add { color: var(--c-ok); } .cl-preview .log .del { color: var(--c-blocked); }

/* routines: sentences with the variables lit */
.cl-routines { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); align-items: start; }
.cl-routine-group { background: var(--c-surface); border-radius: 16px; padding: .5rem .9rem; display: grid; }
.cl-routine { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; font-size: 1rem; color: var(--c-ink); min-height: var(--c-tap); }
.cl-routine .ico { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--c-ink-2); position: relative; }
.cl-routine .ico.clock::after { content: ""; position: absolute; left: 7px; top: 3px; width: 1.5px; height: 6px; background: var(--c-ink-2); box-shadow: 1px 5px 0 -0.5px var(--c-ink-2); }
.cl-routine .ico.ticket { border-radius: 4px; }
.cl-routine .ico.git { border-style: dashed; }
.cl-routine .ico.rollout { border-radius: 3px 3px 9px 9px; }
.cl-routine .ico.chat { border-radius: 9px 9px 9px 2px; }
.cl-routine .ico.hook { border-radius: 2px; transform: rotate(45deg); width: 14px; height: 14px; margin: 0 2px; }
.cl-routine span { color: var(--c-ink-3); }
.cl-routine .on { color: var(--c-ink-3); font-size: .78rem; margin-left: auto; }
.cl-routine .on.dry { color: var(--c-attention); }

/* members: the light panel */
.cl-members { background: var(--c-ground); color: var(--c-ink); border-radius: 16px; padding: 1.25rem 1.25rem 1rem; display: grid; gap: .25rem; border: 1px solid var(--c-line); }
.cl-members h5 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 500; color: var(--c-ink-2); }
.cl-members > div { display: flex; align-items: center; gap: .9rem; padding: .45rem .4rem; border-radius: 12px; font-size: 1.05rem; min-height: 52px; }
.cl-members > div:hover { background: var(--c-surface); }
.cl-members .add { color: var(--c-ink-3); }
.cl-members .add i { width: 40px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 300; font-style: normal; }

/* buttons, chips, compose */
.cl-btn { font: 500 .95rem/1 var(--c-sans); min-height: var(--c-tap); padding: 0 1.1rem; border-radius: 999px; border: 0; background: var(--c-surface-2); color: var(--c-ink); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.cl-btn.primary { background: var(--c-ink); color: var(--c-ground); }
.cl-btn.quiet { background: transparent; color: var(--c-ink-2); }
.cl-btn.sm { min-height: 36px; padding: 0 .85rem; font-size: .88rem; }
.cl-btn:focus-visible { outline: 2px solid var(--c-attention); outline-offset: 2px; }
.cl-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; padding: .3rem .7rem; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-2); white-space: nowrap; }
.cl-chip.on { background: var(--c-ink); color: var(--c-ground); }
.cl-key { font-family: var(--c-mono); font-size: .82em; color: var(--c-ink-2); }
.cl-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--c-attention); color: #111; font: 600 .7rem/1 var(--c-sans); }
.cl-compose { display: flex; align-items: center; gap: .6rem; background: var(--c-surface); border-radius: 999px; padding: .4rem .5rem .4rem 1.1rem; min-height: 52px; font-size: 1rem; }
.cl-compose .ph { color: var(--c-ink-3); }
.cl-compose .send { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: var(--c-ink); color: var(--c-ground); display: grid; place-items: center; font-weight: 600; flex: 0 0 auto; }
.cl-compose .send.off { background: var(--c-surface-3); color: var(--c-ink-3); }
.cl-mention { color: var(--hue, var(--c-ruhi)); font-weight: 500; }
.cl-mention.ruhi { --hue: var(--c-ruhi); } .cl-mention.raju { --hue: var(--c-raju); } .cl-mention.nila { --hue: var(--c-nila); }
.cl-card { background: var(--c-surface); border-radius: 18px; padding: .9rem 1rem; display: grid; gap: .6rem; font-size: .96rem; width: fit-content; max-width: 88%; }
.cl-card b { font-weight: 600; }
.cl-card .cl-note { font-size: .92rem; }

/* the phone */
.cl-phones { display: flex; gap: 1.25rem; overflow-x: auto; padding: .25rem .25rem 1rem; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.cl-phone { flex: 0 0 320px; scroll-snap-align: start; background: var(--c-ground); border: 1px solid var(--c-line-strong); border-radius: 30px; overflow: hidden; display: flex; flex-direction: column; height: 660px; }
.cl-phone .bar { padding: 1.1rem 1.1rem .7rem; display: flex; align-items: center; gap: .6rem; }
.cl-phone .bar h4 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.cl-phone .body { flex: 1; overflow: hidden; padding: .5rem 1rem; display: grid; gap: .5rem; align-content: start; }
.cl-phone .body.bottom { align-content: end; }
.cl-phone .tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: .6rem .5rem calc(.6rem + 10px); font-size: .7rem; text-align: center; color: var(--c-ink-3); border-top: 1px solid var(--c-line); }
.cl-phone .tabs > div { display: grid; gap: .25rem; justify-items: center; position: relative; }
.cl-phone .tabs .ico { width: 22px; height: 22px; border-radius: 7px; background: var(--c-surface-3); }
.cl-phone .tabs .on { color: var(--c-ink); }
.cl-phone .tabs .on .ico { background: var(--c-ink); }
.cl-phone .tabs .cl-badge { position: absolute; top: -6px; left: calc(50% + 6px); }
.cl-phone .cl-roster > a, .cl-phone .cl-roster > div { grid-template-columns: 48px 1fr auto; min-height: 64px; padding: .4rem .25rem; }
.cl-phone .cl-roster .last { max-width: 160px; }

/* tokens and tables */
.cl-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .75rem; }
.cl-sw { display: grid; gap: .3rem; font-size: .8rem; }
.cl-sw i { display: block; height: 44px; border-radius: 12px; }
.cl-sw span { font-family: var(--c-mono); font-size: .7rem; color: var(--c-ink-3); }
.cl table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cl th, .cl td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.cl th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); font-weight: 500; }
.cl-tbl { overflow-x: auto; }
.cl-states { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 1.25rem .5rem; }
.cl-states > div { display: grid; justify-items: center; gap: .5rem; text-align: center; }
.cl-states b { font-size: .88rem; font-weight: 500; }
.cl-states span { font-size: .78rem; color: var(--c-ink-3); line-height: 1.35; }
.cl-footer { padding: 3rem 0 4rem; border-top: 1px solid var(--c-line); color: var(--c-ink-3); font-size: .84rem; }
@media (max-width: 480px) { .cl-roster .last { max-width: 48vw; } }
