/* The AI operator's cursor overlay. Neutral: every colour and size is a variable with a fallback to the page theme. */
.op-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9000; opacity: 0; transition: opacity .2s; }
.op-layer.op-on { opacity: 1; }
.op-cursor, .op-ripple, .op-chip, .op-tip { position: fixed; left: 0; top: 0; }
.op-cursor { color: var(--op-color, var(--accent, #0a6cff)); transition: transform var(--op-move, 420ms) cubic-bezier(.2, .7, .2, 1); margin: -2px 0 0 -2px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.op-ripple { width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 2px solid var(--op-color, var(--accent, #0a6cff)); opacity: 0; }
.op-ripple.op-go { animation: op-ripple 520ms ease-out; }
@keyframes op-ripple { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }
.op-chip { padding: 2px 8px; border-radius: 6px; font: 600 13px/1.4 ui-monospace, monospace; background: var(--op-chip-bg, var(--bg-raised, #fff)); color: var(--op-chip-fg, var(--fg, #111)); border: 1px solid var(--op-color, var(--accent, #0a6cff)); }
.op-tip { max-width: 320px; padding: 8px 10px; border-radius: 8px; font: 13px/1.4 system-ui, sans-serif; background: var(--op-tip-bg, var(--bg-raised, #fff)); color: var(--op-tip-fg, var(--fg, #111)); border: 1px solid var(--op-tip-border, var(--border, #bbb)); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.op-who { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.op-act { font-weight: 700; margin-right: 6px; }
.op-meta { display: block; font-size: 12px; opacity: .75; }
.op-meta:empty { display: none; }
.op-flagged .op-tip { border-color: var(--op-warn, #c77700); }
.op-ask .op-tip { border-color: var(--op-ask, #b3261e); }
.op-badge { position: fixed; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; font: 600 12px system-ui, sans-serif; background: var(--op-warn, #c77700); color: #fff; }
.op-badge[hidden], .op-chip[hidden] { display: none; }
.op-layer[data-reduced="1"] .op-cursor, .op-layer[data-reduced="1"] .op-ripple { transition: none; animation: none; }
.op-layer[data-reduced="1"] .op-ripple.op-go { opacity: .9; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .op-cursor { transition: none; }
  .op-ripple.op-go { animation: none; opacity: .9; }
}

/* pick 1C: the living blob. The shape morphs by animating the corner radii; the core breathes. Nothing here needs WebGL. */
.op-blob { width: 26px; height: 26px; margin: -13px 0 0 -13px; filter: none; }
.op-blob-body { position: absolute; inset: 0; background: color-mix(in srgb, var(--op-color, var(--accent, #0a6cff)) 55%, transparent); border: 2px solid var(--op-color, var(--accent, #0a6cff)); border-radius: 58% 42% 46% 54% / 52% 58% 42% 48%; animation: op-morph 4.2s ease-in-out infinite; }
.op-blob-core { position: absolute; left: 9px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--op-color, var(--accent, #0a6cff)); animation: op-breathe 2.6s ease-in-out infinite; }
.op-layer[data-action="click"] .op-blob-body, .op-layer[data-action="compute"] .op-blob-body { animation-duration: 1.2s; }
@keyframes op-morph {
  0%, 100% { border-radius: 58% 42% 46% 54% / 52% 58% 42% 48%; transform: rotate(0deg); }
  33% { border-radius: 44% 56% 58% 42% / 60% 44% 56% 40%; transform: rotate(40deg); }
  66% { border-radius: 52% 48% 40% 60% / 42% 56% 44% 58%; transform: rotate(-30deg); }
}
@keyframes op-breathe { 0%, 100% { transform: scale(.8); } 50% { transform: scale(1.25); } }
.op-layer[data-reduced="1"] .op-blob-body, .op-layer[data-reduced="1"] .op-blob-core { animation: none; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .op-blob-body, .op-blob-core { animation: none; border-radius: 50%; } }

/* live controls: pause, undo, take over, speed (shared by the simple and the pro view) */
.lv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lv-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--jf1-t2, var(--fg, #444)); }
.lv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--jf1-t3, #888); }
.lv-bar[data-state="work"] .lv-dot { background: var(--jf1-ok, #3fb950); }
.lv-bar[data-state="paused"] .lv-dot, .lv-bar[data-state="taken"] .lv-dot { background: var(--jf1-warn, #e3b341); }
.lv-btn, .lv-seg button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; min-height: 36px; border-radius: 8px; border: 1px solid var(--jf1-border-2, #888); background: var(--jf1-raised, #fff); color: var(--jf1-t1, #111); cursor: pointer; }
.lv-btn:disabled { opacity: .45; cursor: not-allowed; }
.lv-seg { display: inline-flex; gap: 0; }
.lv-seg button { border-radius: 0; margin-left: -1px; }
.lv-seg button:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.lv-seg button:last-child { border-radius: 0 8px 8px 0; }
.lv-seg button[aria-pressed="true"] { background: var(--jf1-accent, #0a6cff); border-color: var(--jf1-accent, #0a6cff); color: var(--jf1-accent-ink, #fff); }
.lv-btn:focus-visible, .lv-seg button:focus-visible { outline: 3px solid var(--jf1-accent, #0a6cff); outline-offset: 2px; }
.lv-err { color: var(--jf1-bad, #f85149); font-size: 13px; margin: 6px 0 0; }
.lv-note { color: var(--jf1-t2, var(--fg, #444)); font-size: 13px; margin: 6px 0 0; min-height: 1em; }

/* AMOEBA reads a page: the pseudopod, the cup round the box, the moment card and the drop that goes to the field. */
.op-arm, .op-drop { position: fixed; left: 0; top: 0; pointer-events: none; }
.op-arm { height: 8px; margin-top: -4px; transform-origin: 0 50%; opacity: 0; border-radius: 6px 999px 999px 6px / 50%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--op-color, var(--accent, #0a6cff)) 70%, transparent), var(--op-color, var(--accent, #0a6cff)));
  transition: transform 260ms cubic-bezier(.2, .7, .2, 1), opacity 120ms; }
.op-arm.op-arm-on { opacity: .9; }
.op-drop { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; opacity: 0;
  background: var(--op-color, var(--accent, #0a6cff)); transition: transform 480ms cubic-bezier(.2, .7, .2, 1), opacity 120ms; }
.op-drop.op-drop-on { opacity: .95; }
.op-cup { position: absolute; box-sizing: border-box; pointer-events: none; border: 3px solid var(--op-color, var(--accent, #0a6cff));
  border-radius: 38%; background: color-mix(in srgb, var(--op-color, var(--accent, #0a6cff)) 16%, transparent);
  opacity: 0; transform: scale(1.3); transition: transform 320ms cubic-bezier(.2, .7, .2, 1), opacity 160ms; }
.op-cup.op-cup-on { opacity: 1; transform: none; }
.op-cup[data-state="low"] { border-color: var(--op-warn, #c77700); }
.op-cup[data-state="disagree"] { border-color: var(--op-ask, #b3261e); }
.op-moment { box-sizing: border-box; z-index: 2; width: max-content; max-width: min(320px, calc(100% - 8px)); padding: 8px 10px; border-radius: 8px;
  font: 13px/1.4 system-ui, sans-serif; text-align: left; white-space: normal; overflow-wrap: anywhere;
  background: var(--op-tip-bg, var(--bg-raised, #fff)); color: var(--op-tip-fg, var(--fg, #111));
  border: 2px solid var(--op-color, var(--accent, #0a6cff)); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.op-moment.op-m-abs { position: absolute; }
.op-moment.op-m-ask { width: min(320px, calc(100% - 8px)); }
.op-m-q .qc-crop { display: none; }
.op-m-q .qc-btn { white-space: normal; }
.op-moment[data-state="low"] { border-color: var(--op-warn, #c77700); }
.op-moment[data-state="disagree"] { border-color: var(--op-ask, #b3261e); }
.op-moment p { margin: 0 0 2px; line-height: 1.4; }
.op-m-val { font-size: 16px; font-weight: 700; }
.op-m-state { font-weight: 600; }
.op-m-by, .op-m-field, .op-m-text, .op-m-note { font-size: 12px; opacity: .85; }
.op-m-q { margin-top: 6px; }
.op-m-close { margin-top: 6px; font: inherit; font-size: 12px; padding: 4px 10px; min-height: 28px; border-radius: 6px; border: 1px solid var(--border, #888); background: transparent; color: inherit; cursor: pointer; }
.op-m-close:focus-visible { outline: 3px solid var(--op-color, var(--accent, #0a6cff)); outline-offset: 2px; }
.op-got { outline: 3px solid var(--op-color, var(--accent, #0a6cff)); outline-offset: 2px; box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--op-color, var(--accent, #0a6cff)) 22%, transparent); }
.op-layer[data-action="read"] .op-blob-body { animation-duration: 1.8s; }
.op-layer[data-action="read"] .op-blob { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.op-layer[data-action="read"] .op-blob-core { left: 14px; top: 14px; }
.op-layer[data-reduced="1"] .op-arm, .op-layer[data-reduced="1"] .op-drop { transition: none; }
@media (prefers-reduced-motion: reduce) { .op-arm, .op-drop, .op-cup { transition: none; } }

/* AMOEBA skin (amoeba-pilot.js): the body is a canvas; the hug outline follows the target box; Stop is the pilot's control. */
.op-cursor.op-amoeba { width: 0; height: 0; }
.op-cursor.op-amoeba canvas { display: block; }
.op-hug { position: fixed; left: 0; top: 0; box-sizing: border-box; pointer-events: none; border: 2px solid var(--op-color, var(--accent, #0a6cff));
  border-radius: 42% 58% 50% 50% / 50% 44% 56% 50%; background: color-mix(in srgb, var(--op-color, var(--accent, #0a6cff)) 10%, transparent);
  animation: op-hug-morph 6s ease-in-out infinite; }
@keyframes op-hug-morph { 0%, 100% { border-radius: 42% 58% 50% 50% / 50% 44% 56% 50%; } 50% { border-radius: 55% 45% 40% 60% / 45% 58% 42% 55%; } }
.op-hug[hidden] { display: none; }
.op-layer[data-reduced="1"] .op-hug { animation: none; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .op-hug { animation: none; border-radius: 4px; } }
.op-stop { position: fixed; left: 12px; bottom: 12px; pointer-events: auto; padding: 6px 14px; min-height: 36px; border-radius: 999px; cursor: pointer;
  font: 700 13px system-ui, sans-serif; background: var(--op-warn, #c77700); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.op-stop[hidden] { display: none; }
.op-stop:focus-visible { outline: 3px solid var(--op-color, var(--accent, #0a6cff)); outline-offset: 2px; }
