/* Cop dashboard, from the old console (console/ui/app.css): same identity as the site. One orange primary per view,
   pill buttons, no gradient, no uppercase label. */
:root {
  --bg: #08080A; --bg-2: #0E0E11; --surface: #121216; --hover: #17171C;
  --line: #222228; --line-2: #2E2E36; --line-3: #5A5A66;
  --text: #F4F2EF; --text-2: #A3A1A8; --text-3: #8A8891;
  --accent: #FF5B1A; --accent-hover: #FF7A45; --on-accent: #140600;
  --run: #FF7A45; --wait: #F2B84B; --idle: #8A8891; --err: #F0465A;
  --f-ui: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Fragment Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --top: 61px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; border-radius: 6px; }
.mn { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
svg.i { flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic { display: inline-flex; flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 500; white-space: nowrap; line-height: 20px; padding: 8px 18px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-g { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.btn-g:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-d { color: var(--text); background: transparent; border-color: var(--line-2); }
.btn-d:hover { border-color: var(--text-3); }
.btn-icon { padding: 8px 10px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--top); padding: 0 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.wordmark { display: flex; align-items: center; gap: 8px; font: 600 17px var(--f-ui); letter-spacing: -.02em; }
.wordmark .ic { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pendbar { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--err);
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(240, 70, 90, .45); white-space: nowrap; }
.pendbar:hover { background: rgba(240, 70, 90, .1); }
.pendbar b { font-weight: 600; color: var(--text); }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wait); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; z-index: 20; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0;
  background: none; color: var(--text); font-size: 14px; border-radius: 8px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--hover); }
.menu .muted { color: var(--text-3); font-size: 13px; padding: 6px 10px; }

/* side menu */
.shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.side { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; font-size: 14px; color: var(--text-2); }
.side a:hover { background: var(--hover); color: var(--text); }
.side a.on { background: var(--surface); color: var(--text); }

.wrap { width: 100%; min-width: 0; padding: 20px 28px 64px; }
.label { font-size: 14px; color: var(--text-2); margin: 22px 0 11px; }
.label:first-child { margin-top: 0; }
.help { font-size: 13px; color: var(--text-3); margin: 12px 0 0; }

/* cards and rows */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 11px; padding: 13px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--hover); }
.row .meta { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.row .txt { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.shown { background: var(--hover); box-shadow: inset 2px 0 0 var(--accent); }
.empty { padding: 14px 16px; color: var(--text-2); font-size: 14px; }
.empty a { text-decoration: underline; text-underline-offset: 3px; }

/* states: a clear icon and a coloured label */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.c-run { color: var(--run); } .c-ok { color: var(--text); } .c-wait { color: var(--wait); } .c-idle { color: var(--idle); }
.c-err { color: var(--err); } .c-2 { color: var(--text-2); } .c-dim { color: var(--text-3); }

/* pending approvals */
.pend { display: flex; flex-direction: column; gap: 9px; }
.pcard { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; }
.pcard .what { font-size: 14px; min-width: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .what:hover { color: #fff; }
.pcard .acts, .acts { margin-left: auto; display: flex; gap: 7px; flex: none; align-items: center; }

/* page header (Agent, Run) */
.phead { padding: 16px 28px; margin: -20px -28px 18px; border-bottom: 1px solid var(--line); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.back:hover { color: var(--text); }
.pline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pline .ttl { font: 600 24px var(--f-ui); letter-spacing: -.02em; }
.pline .ttl.run { font-size: 22px; }
.pline .meta { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); }
.pline .acts { margin-left: auto; }
.ahead { display: inline-flex; margin-right: -4px; }

/* run steps on the Agent page */
.live { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 16px; }
.lrow { display: flex; align-items: center; gap: 11px; padding: 9px 2px; }
.lrow .txt { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .meta { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.lrow.click { cursor: pointer; border-radius: 8px; margin: 0 -8px; padding-left: 10px; padding-right: 10px; }
.lrow.click:hover, .lrow.click.open { background: var(--hover); }
.lrow.click .ic.c-dim { margin-left: 4px; }
.lhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lhead > span { display: inline-flex; align-items: center; gap: 8px; }
.linkbtn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); background: none;
  border: 0; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.linkbtn:hover { color: var(--text); background: var(--hover); }
.linkbtn.u { text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.linkbtn.u:hover { background: none; }

/* Run page: numbered steps and detail */
.rungrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 13px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; align-items: center; gap: 11px; padding: 11px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 44px; }
.step:hover { border-color: var(--line-2); }
.step.sel { border-color: var(--line-3); }
.step.gate { border-color: rgba(240, 70, 90, .45); }
.step.gate.sel { border-color: var(--err); }
.step .txt { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.step .txt.soft { color: var(--text-2); }
.step .n { font-family: var(--f-mono); color: var(--text-3); margin-right: 6px; }
.step .meta { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); margin-left: auto; white-space: nowrap; padding-left: 8px; }

.detail { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  position: sticky; top: calc(var(--top) + 15px); max-height: calc(100vh - var(--top) - 35px); overflow: auto; }
.detail .dh { font-size: 12px; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.detail .lbl { font-size: 12px; color: var(--text-3); margin: 12px 0 5px; }
.detail .lbl:first-of-type { margin-top: 4px; }
.detail pre, .detail .code { margin: 0; font: 12px/1.55 var(--f-mono); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail .call { color: var(--text); }
.detail .say { font-size: 14px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.detail.dinline { position: static; max-height: none; overflow: visible; background: var(--bg); border-radius: 12px; margin: 2px 0 10px 26px; padding: 10px 12px; }
.detail.dinline.top { margin: 0 0 12px; }

/* Console: one card per agent, animated bot on top */
.chead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ctitle { font: 600 24px var(--f-ui); letter-spacing: -.02em; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; height: 486px; cursor: pointer; transition: border-color .15s; }
.acard:hover { border-color: var(--line-3); }
.acard.x { height: auto; }
.acard.sel { border-color: var(--accent); }
.acard.alert { border-color: var(--err); }
.acard.alert:hover { border-color: #FF6B7C; }
.band { height: 104px; flex: none; display: flex; align-items: center; justify-content: center; position: relative;
  background: var(--bg-2); border-bottom: 1px solid var(--line); }
.notif { position: absolute; top: 9px; left: 10px; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(240, 70, 90, .14); color: var(--err); border: 1px solid rgba(240, 70, 90, .45);
  border-radius: 999px; padding: 2px 8px 2px 6px; font: 400 12px var(--f-mono); }
.chbot { position: absolute; bottom: 7px; right: 8px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 3px 9px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.acard:hover .chbot, .chbot:focus-visible { opacity: 1; }
.chbot:hover { color: var(--text); }
@media (hover: none) { .chbot { opacity: 1; } }
.acard .bd { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.acard .nm { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.acard .nm:hover { color: #fff; }
.acard .sl { margin-top: 3px; }
.acard .ml { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.acard .idl { font: 12px var(--f-mono); color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.acard .lbl { font-size: 12px; color: var(--text-3); margin: 12px 0 6px; }
.acard .rt { font-size: 13px; color: var(--text-2); display: flex; align-items: flex-start; gap: 6px; margin: 0 0 4px; line-height: 1.4; }
.acard .rt .ic { margin-top: 2px; }
.acard .rt.act, .acard .tl.act { color: var(--wait); }
.acard .rt.free { color: var(--run); }
.acard .tl { display: block; font: 12px/1.4 var(--f-mono); color: var(--text-2); padding: 2px 0; word-break: break-all; }
.morebtn { margin-top: auto; align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
  border: 0; background: none; color: var(--text-2); font-size: 13px; border-radius: 8px; cursor: pointer; }
.acard.x .morebtn { margin-top: 10px; }
.morebtn:hover { background: var(--hover); color: var(--text); }
.legend { font-size: 13px; color: var(--text-3); margin-top: 14px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.picker { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.pkh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 15px; font-weight: 500; }
.pkg { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.pb { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; height: 64px; display: flex;
  align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pb:hover { border-color: var(--line-3); }
.pb.on { border: 2px solid var(--accent); }

/* bot animations (SVG + CSS, no media): running = blink, smile, small bounce and one prop at a time;
   waiting = hops and looks around with a « ? »; asleep = sways, breathes, « z » rising, peeks once. */
.bot .body, .bot .breath { transform-box: view-box; transform-origin: 32px 56px; }
.bot .eo { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; animation-delay: var(--d, 0s); }
.bot .ec { opacity: 0; }
.bot .ms { opacity: 0; animation: smile 8s infinite; animation-delay: var(--d, 0s); }
.bot .mf { animation: flat 8s infinite; animation-delay: var(--d, 0s); }
.bot .prop, .bot .zz, .bot .q { opacity: 0; }
.bot text { font-family: var(--f-ui); }

.bot.run .body { animation: bob 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.bot.run .prop { transform-box: fill-box; transform-origin: 30% 60%; animation: prop 13.5s infinite; }
.bot.run .p1 { animation-delay: var(--d, 0s); }
.bot.run .p2 { animation-delay: calc(var(--d, 0s) - 9s); }
.bot.run .p3 { animation-delay: calc(var(--d, 0s) - 4.5s); }
.bot.run .pen { animation: write .45s ease-in-out infinite alternate; }
.bot.run .ink { stroke-dasharray: 12; animation: ink 2.2s linear infinite; }
.bot.run .mag { animation: scan 2.4s ease-in-out infinite; }
.bot.run .c1 { animation: code 1.1s steps(2) infinite; }
.bot.run .c2 { animation: code 1.1s steps(2) infinite -.35s; }
.bot.run .c3 { animation: code 1.1s steps(2) infinite -.7s; }

.bot.wait .body { animation: hop 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.bot.wait .eo { animation: look 3.4s infinite; animation-delay: var(--d, 0s); }
.bot.wait .q { transform-box: fill-box; transform-origin: center bottom; animation: qpop 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }

.bot.sleep .body { animation: sway 9s ease-in-out infinite; animation-delay: var(--d, 0s); }
.bot.sleep .breath { animation: breathe 3s ease-in-out infinite; }
.bot.sleep .eo { animation: peek 9s infinite; animation-delay: var(--d, 0s); }
.bot.sleep .ec { animation: peekc 9s infinite; animation-delay: var(--d, 0s); }
.bot.sleep .ms { display: none; } .bot.sleep .mf { animation: none; }
.bot.sleep .zz { opacity: 1; }
.bot.sleep .zz text { opacity: 0; transform-box: fill-box; animation: zfloat 3s ease-out infinite; }
.bot.sleep .zz .z2 { animation-delay: .7s; } .bot.sleep .zz .z3 { animation-delay: 1.4s; }

@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } }
@keyframes smile { 0%, 55%, 100% { opacity: 0; } 60%, 92% { opacity: 1; } }
@keyframes flat { 0%, 55%, 100% { opacity: 1; } 60%, 92% { opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }
@keyframes prop { 0% { opacity: 0; transform: scale(.4) rotate(-12deg); } 4%, 29% { opacity: 1; transform: scale(1) rotate(0); }
  33%, 100% { opacity: 0; transform: scale(.4) rotate(10deg); } }
@keyframes write { from { transform: translate(-2.5px, 0); } to { transform: translate(2.5px, .8px); } }
@keyframes ink { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }
@keyframes scan { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-3px, -2px); } 60% { transform: translate(2px, -3px); } 80% { transform: translate(1px, 2px); } }
@keyframes code { 0% { opacity: 1; } 100% { opacity: .25; } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-3.5px); } 80% { transform: translateY(0); } 88% { transform: translateY(-1.5px); } }
@keyframes look { 0%, 35%, 100% { transform: translateX(0); } 45%, 62% { transform: translateX(3px); } 72%, 85% { transform: translateX(-3px); } }
@keyframes qpop { 0%, 55%, 100% { opacity: .85; transform: scale(1); } 68% { opacity: 1; transform: scale(1.18) translateY(-1.5px); } 80% { transform: scale(.95); } }
@keyframes sway { 0%, 28%, 100% { transform: rotate(-7deg); } 42%, 86% { transform: rotate(7deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, 1.04); } }
@keyframes peek { 0%, 58%, 80%, 100% { opacity: 0; } 63%, 75% { opacity: 1; } }
@keyframes peekc { 0%, 58%, 80%, 100% { opacity: 1; } 63%, 75% { opacity: 0; } }
@keyframes zfloat { 0% { opacity: 0; transform: translate(0, 4px) scale(.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(4px, -7px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .bot * { animation: none !important; } .bot.run .p1 { opacity: 1; } }

/* forms and Settings */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); }
.inp { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text);
  padding: 9px 12px; font-size: 14px; width: 100%; }
.inp.mn { font-size: 13px; }
.inp.big { height: 52px; padding: 0 16px; font-size: 17px; border-radius: 12px; background: var(--surface); }
.inp:focus { outline: none; border-color: var(--accent-hover); }
.inp:disabled { opacity: .55; }
.inp.num { width: 76px; text-align: right; }
.inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.tag { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; }
.sname { flex: none; width: 200px; }
.scmd { flex: 1; min-width: 180px; width: auto; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: var(--surface); border: 1px solid var(--line-2); border-left: 3px solid var(--err);
  border-radius: 12px; padding: 10px 14px; color: var(--text); font-size: 14px; z-index: 30; }

/* Agent page: « Decision needed », everything needed to decide without opening the run */
.dcard { background: var(--surface); border: 1px solid var(--err); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; }
.dtop { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dtitle { font: 600 15px var(--f-ui); color: var(--err); }
.dtop .meta { margin-left: auto; font: 12px var(--f-mono); color: var(--text-3); }
.dact { font: 600 18px var(--f-ui); letter-spacing: -.01em; margin-bottom: 10px; }
.drow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.dk { color: var(--text-3); font-size: 13px; padding-top: 1px; }
.dev { display: block; color: var(--text-2); }
.dsay { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.dpre { margin: 0; font: 12px/1.5 var(--f-mono); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.dbtns { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dmore { margin-left: auto; font-size: 13px; color: var(--accent-hover); }

/* Add agent: name, then the split screen. The header and side menu stay. */
.ob-name { min-height: calc(100vh - var(--top) - 84px); display: flex; align-items: center; justify-content: center; animation: fade .3s ease; }
.ob-name form { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 28px; }
.ob-name h1 { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.ob { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: calc(100vh - var(--top)); margin: -20px -28px -64px; animation: fade .3s ease; }
.ob-left { overflow: auto; padding: 32px clamp(20px, 3vw, 44px); }
.ob-right { overflow: auto; background: var(--bg-2); border-left: 1px solid var(--line); padding: 28px clamp(16px, 2.4vw, 36px); display: flex; flex-direction: column; }
.ob-center { margin: auto 0; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.ob-stage { display: flex; flex-direction: column; gap: 20px; animation: rise .28s ease; }
.ob-stage h2 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.ob-stage h3, .choice h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.ob-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ob-err { color: var(--err); font-size: 15px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; padding: 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent-hover); background: #17130F; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { font-weight: 500; font-size: 17px; }
.drop span { font-size: 14px; }
.types { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.types dt { font-size: 13px; }
.types dd { margin: 0; color: var(--text-3); }
.drop.has { border: 1px solid var(--accent); background: #17130F; gap: 8px; }
.pf { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; max-width: 100%; }
.pf-n { font: 400 16px var(--f-mono); color: var(--accent); overflow-wrap: anywhere; }
.ob-next { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ob-next ol { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.counts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--text-2); }
.counts b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: turn .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
.choice { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.choice .c-dim { font-size: 14px; }
.ob-local { display: flex; flex-direction: column; gap: 12px; }
details.more summary { cursor: pointer; font-size: 14px; color: var(--text-2); }
details.more ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--text-3); display: flex; flex-direction: column; gap: 4px; }
details.more .mn { color: var(--text-2); overflow-wrap: anywhere; }

/* findings, as they appear */
.feed { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.f { border-bottom: 1px solid var(--line); animation: rise .25s ease; }
.f summary { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 9px 0; cursor: pointer; list-style: none; font-size: 14px; }
.f summary::-webkit-details-marker { display: none; }
.f-k { color: var(--text-3); }
.f-n { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }
.f-s { color: var(--text-3); font-size: 12px; font-family: var(--f-mono); white-space: nowrap; }
.f.blind .f-k { color: var(--accent-hover); }
.f.llm .f-s::before { content: "LLM · "; color: var(--accent-hover); }
.f.rej { opacity: .6; }
.f-body { padding: 0 0 12px 106px; font-size: 14px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.f-body .mn { font-size: 12px; }
.f-body code { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; white-space: pre-wrap; }

/* the map of an agent */
.map svg { display: block; width: 100%; height: auto; overflow: visible; }
.m-h { font: 400 12.5px var(--f-ui); fill: var(--text-3); }
.m-box rect { fill: var(--surface); stroke: var(--line-2); }
.m-box.new { animation: fade .35s ease; }
.m-box.gated rect { stroke: var(--line-3); }
.m-box.llm rect, .m-box.run rect { stroke: var(--accent); }
.m-h.blind { fill: var(--accent-hover); }
.m-box.blind rect { fill: #17130F; stroke: var(--accent); }
.m-box.blind .m-n { fill: var(--accent-hover); }
.m-box.remote rect { fill: transparent; stroke: var(--line-3); stroke-dasharray: 5 4; }
.m-n { font: 400 12.5px var(--f-mono); fill: var(--text); }
.m-k { font: 400 11.5px var(--f-ui); fill: var(--text-3); }
.m-box.gated .m-k { fill: var(--text-2); }
.m-box.llm .m-k, .m-box.run .m-k { fill: var(--accent-hover); }
.m-ln { stroke: #3A3A44; stroke-width: 1.25; fill: none; }
.m-ln.dash { stroke-dasharray: 4 4; }
.m-agent { transition: transform .4s ease; }
.m-agent rect { fill: #17171C; stroke: var(--line-3); }
.m-name { font: 600 15px var(--f-ui); fill: var(--text); }
.m-sub { font: 400 12px var(--f-ui); fill: var(--text-3); }
.orbit, .orbit-up { animation: turn 3.4s linear infinite; transform-origin: 0 0; }
.orbit-up { animation-direction: reverse; }
.loupe circle, .loupe line { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.loupe circle { fill: #08080ACC; }
.map.idle .orbit { display: none; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }
.about { padding: 14px; }
.mapcard { padding: 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.map.small { flex: 1; min-height: 0; }
.map.small svg { height: 100%; }
.map.small .m-n, .map.small .m-h { font-size: 12px; }
.map.small .m-name { font-size: 12px; }
.m-dot { fill: var(--wait); }
.m-legend { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.m-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--wait); }

/* agent page: the run on two thirds, the map on the last third. It folds away to the right. */
.agrid { container-type: inline-size; display: grid; grid-template-columns: 2fr 1fr; align-items: start; margin-bottom: -44px; transition: grid-template-columns .28s ease; }
.agrid.closed { grid-template-columns: 1fr 0fr; }
.acol { min-width: 0; }
.amap { min-width: 0; overflow: hidden; position: sticky; top: calc(var(--top) + 15px); }
.agrid.closed .amap { visibility: hidden; transition: visibility 0s .28s; }
.amap-in { width: calc(100cqw / 3); padding-left: 20px; height: var(--map-h, auto); display: flex; flex-direction: column; }
.amap-head { display: flex; justify-content: flex-end; }
.btn-sm { height: 30px; padding: 0 8px 0 10px; font-size: 13px; }
.amap-tab { display: none; position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 5; align-items: center; gap: 4px; padding: 12px 10px 12px 6px; font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line-3); border-right: 0; border-radius: 8px 0 0 8px; cursor: pointer; }
.amap-tab:hover { background: var(--hover); }
.agrid.closed + .amap-tab { display: inline-flex; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ob-stage, .f, .ob, .ob-name, .m-box.new { animation: none; } .agrid { transition: none; } .orbit, .orbit-up { animation: none; } .m-agent { transition: none; } }

@media (max-width: 1040px) {
  .rungrid { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; max-height: none; }
  .ob { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ob-left, .ob-right { overflow: visible; }
  .ob-right { order: -1; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 1180px) {
  .agrid, .agrid.closed { container-type: normal; grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
  .amap { position: static; overflow: visible; margin-top: 22px; }
  .amap-in { width: auto; padding-left: 0; height: auto; }
  .map.small svg { height: auto; }
  .agrid.closed .amap { display: none; }
}
@media (max-width: 680px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; overflow-x: auto; }
  .side a { white-space: nowrap; }
  .top { padding: 0 16px; }
  .wrap { padding: 16px 16px 48px; }
  .phead { margin: -16px -16px 14px; padding: 12px 16px; }
  .ob { margin: -16px -16px -48px; }
  .ob-name h1 { font-size: 32px; }
  .pendbar .long { display: none; }
  .row { flex-wrap: wrap; }
  .row .meta { margin-left: 0; width: 100%; padding-left: 26px; }
  .sname, .scmd { width: 100%; flex: 1 1 100%; }
  .pcard { flex-wrap: wrap; }
  .pcard .acts { margin-left: 24px; }
  .f summary { grid-template-columns: 80px minmax(0, 1fr); }
  .f-s { grid-column: 2; }
  .f-body { padding-left: 0; }
  .drow { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
