/* Cleo, the assistant inside METeam (v_cleo.js). Gemini-style layout (thread, prompt bar with mic, a full-screen listening view,
   suggestion chips) in METeam colours: tokens from tokens.css / calm.css only. */
.cleo-ib .i { width: 20px; height: 20px; }
header.gbar .cleo-ib { order: 3; }

.sheet:has(.cl-thread) .sheet-h { align-items: center; padding-bottom: 8px; }
.sheet:has(.cl-thread) .sheet-h > b { padding-top: 0; }
.cl-ttl { display: inline-flex; align-items: center; gap: 8px; }
.cl-ttl .i { width: 20px; height: 20px; color: var(--pri); }
.sheet:has(.cl-thread) .sheet-b { display: flex; flex-direction: column; padding: 4px 16px 16px; }
.sheet:has(.cl-thread) .sheet-f { flex-wrap: nowrap; justify-content: stretch; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }

.cl-thread { display: flex; flex-direction: column; gap: 14px; margin-top: auto; min-height: 0; }
.cl-hello { text-align: center; padding: 28px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cl-hello h3 { font-size: 20px; font-weight: 620; letter-spacing: -.02em; }
.cl-hello p { max-width: 32ch; }
.cl-orb { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-sunk); border: 1px solid var(--line); color: var(--pri); }
.cl-orb .i { width: 26px; height: 26px; }
.cl-brain { margin-top: 12px; font-size: var(--fs-micro, 12px); color: var(--ink-3); max-width: 38ch; }

.cl-m { display: flex; gap: 8px; max-width: 100%; align-items: flex-start; }
.cl-m.me { justify-content: flex-end; }
.cl-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-sunk); border: 1px solid var(--line); color: var(--pri); }
.cl-av .i { width: 15px; height: 15px; }
.cl-bw { min-width: 0; max-width: calc(100% - 36px); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cl-b { padding: 10px 14px; border-radius: 18px; line-height: 1.45; overflow-wrap: anywhere; font-size: var(--fs-body, 14px); }
.cl-m.me .cl-b { max-width: 85%; background: var(--pri); color: var(--pri-ink); border-bottom-right-radius: 6px; }
.cl-m.cleo .cl-b { background: var(--panel-sunk); color: var(--ink); border: 1px solid var(--line); border-top-left-radius: 6px; }
.cl-m.err .cl-b { color: var(--err); border-color: var(--err); }
.cl-tag { margin-left: 8px; font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; vertical-align: 1px; }
.cl-say { width: 30px; height: 30px; margin: -4px 0 0 2px; color: var(--ink-3); }
.cl-say .i { width: 16px; height: 16px; }

.cl-rows { display: flex; flex-direction: column; width: 100%; border: 1px solid var(--line); border-radius: var(--r-card, 14px); background: var(--panel); overflow: hidden; }
.cl-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; color: var(--ink); text-decoration: none; }
.cl-row + .cl-row { border-top: 1px solid var(--line); }
.cl-row b { font-weight: 560; overflow-wrap: anywhere; }
a.cl-row:hover { background: var(--hover, var(--panel-sunk)); text-decoration: none; }

.cl-conf { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card, 14px); background: var(--panel); }
.cl-conf p { margin-bottom: 10px; overflow-wrap: anywhere; }
.cl-conf.done { display: flex; align-items: center; gap: 8px; color: var(--ink-3); padding: 8px 12px; }
.cl-conf.done .i { width: 16px; height: 16px; }
.cl-acts { margin: 0; }

.cl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-chips.c { justify-content: center; margin-top: 12px; }
.cl-chip { padding: 8px 14px; min-height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; text-align: left; transition: background var(--t-1, .12s), border-color var(--t-1, .12s); }
.cl-chip:hover { background: var(--panel-sunk); border-color: var(--line-2, var(--line)); }
.cl-chip:focus-visible, .cl-in:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }

.cl-dots { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px !important; }
.cl-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); opacity: .45; }
:root:not([data-motion="low"]) .cl-dots span { animation: cl-dot 1.1s ease-in-out infinite; }
.cl-dots span:nth-child(2) { animation-delay: .15s; } .cl-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes cl-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* prompt bar */
.cl-bar { flex: 1; display: flex; align-items: flex-end; gap: 4px; padding: 4px 4px 4px 14px; border: 1px solid var(--line); border-radius: 26px; background: var(--panel); }
.cl-bar:focus-within { border-color: var(--pri); }
.cl-in { flex: 1; min-width: 0; resize: none; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; font: inherit; font-size: 16px; line-height: 1.4; padding: 9px 0; max-height: 120px; color: var(--ink); }
.cl-bar .ibtn { width: 40px; height: 40px; border-radius: 50%; }
.cl-go { background: var(--pri); color: var(--pri-ink) !important; }
.cl-go:hover { background: var(--pri-hover, var(--pri)); color: var(--pri-ink) !important; }
.cl-mic.on { background: var(--err-soft); color: var(--err); }

/* full-screen listening view */
.cl-listen { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); text-align: center; background: var(--panel-solid, var(--bg)); border-radius: inherit; }
.cl-listen h3 { font-size: 20px; font-weight: 620; letter-spacing: -.02em; }
.cl-hint { max-width: 30ch; }
.cl-live { min-height: 3.2em; max-width: 34ch; font-size: 18px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.cl-ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin-bottom: 8px; }
.cl-ring > span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--pri); opacity: .25; }
.cl-ring > i { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--pri); color: var(--pri-ink); }
.cl-ring > i .i { width: 34px; height: 34px; }
:root:not([data-motion="low"]) .cl-ring > span { animation: cl-ring 2.4s ease-out infinite; }
.cl-ring > span:nth-child(2) { animation-delay: .8s; } .cl-ring > span:nth-child(3) { animation-delay: 1.6s; }
@keyframes cl-ring { 0% { transform: scale(.64); opacity: .45; } 100% { transform: scale(1.25); opacity: 0; } }
.cl-listen .btnrow { margin-top: 10px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .cl-ring > span, .cl-dots span { animation: none !important; } }

@media (min-width: 641px) { .sheet:has(.cl-thread) { width: min(480px, calc(100vw - 20px)); } }

/* wave 6 (2026-11-23): live status strip and the "Siapkan Cleo" checklist; tokens only, motion with var(--ease) */
.cl-strip:empty { display: none; }
.cl-strip { margin: 0 -16px 8px; }
.cl-strip-in { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.cl-strip-in::-webkit-scrollbar { display: none; }
.cl-st { flex: 0 0 auto; max-width: 220px; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: var(--r-card, 14px); background: var(--panel); color: var(--ink); text-decoration: none;
  transition: background var(--t-1, .12s) var(--ease), border-color var(--t-1, .12s) var(--ease); }
a.cl-st:hover { background: var(--panel-sunk); }
.cl-st:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }
.cl-st .sub { font-size: var(--fs-micro, 12px); color: var(--ink-3); white-space: nowrap; }
.cl-st b { font-size: 13px; font-weight: 560; line-height: 1.3; overflow-wrap: anywhere; } /* wraps, never cut (ui-check "cut" rule) */
.cl-thread:has(.cl-setup) { margin-top: 0; }
.cl-setup { display: flex; flex-direction: column; gap: 10px; }
.cl-setup h3 { font-size: 18px; font-weight: 620; letter-spacing: -.02em; }
.cl-setup h4 { font-size: 14px; font-weight: 600; margin-top: 6px; }
.cl-setup > .btnrow { justify-content: flex-start; }
.cl-row.cl-set { flex-direction: row; align-items: center; gap: 10px; }
.cl-set-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-set-t .sub { color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.cl-set .pill, .cl-set .btn { flex: none; }
@media (max-width: 420px) { .cl-row.cl-set { flex-wrap: wrap; } .cl-set-t { flex-basis: 100%; } }
