:root {
  --bg: #111111; --card: #181818; --card-hi: #1f1f1f; --edge: #2a2a2a; --edge-hi: #3a3a3a;
  --ink: #e9e9e9; --ink-hi: #ffffff; --muted: #a3a3a3; --dim: #737373;
  --acc: #037edc; --acc-hi: #32b2ff; --acc-deep: #0542bd;
  --g: #3ccf8e; --w: #f2b84b; --b: #ff6b6b;
  --t-task: #32b2ff; --t-subitem: #8aa7ff; --t-update: #41eafd; --t-external: #f2b84b; --t-note: #a3a3a3;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 Inter, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc-hi); }
.why { color: var(--muted); font-size: 13px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 6px; font-size: 18px; }
.arvo { font-family: Arvo, serif; font-weight: 700; }
.os { font-weight: 800; background: linear-gradient(90deg, #41eafd, #32b2ff 40%, #037edc 70%, #0542bd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sep { color: var(--dim); margin: 0 4px; }
.cmd { color: var(--muted); font-size: 15px; }
.conns { display: flex; gap: 8px; flex-wrap: wrap; }
.conn { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--edge-hi); color: var(--muted); }
.conn i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--dim); }
.conn.live i { background: var(--g); } .conn.demo i { background: var(--w); }
main { max-width: 1500px; margin: 0 auto; padding: 0 24px 120px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: 14px; padding: 20px; }
h1 { font-size: 20px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 0; }
.pick-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; margin: 16px 0 8px; }
.pick-grid .field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
input, select, textarea { background: var(--card-hi); border: 1px solid var(--edge-hi); border-radius: 8px; padding: 8px 10px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); }
.search-select { position: relative; }
.list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #1b1b1b; border: 1px solid var(--edge-hi); border-radius: 10px; max-height: 320px; overflow: auto; }
.list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; } .list li:hover, .list li.on { background: #262626; }
.meetings { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.meeting { display: flex; justify-content: space-between; gap: 10px; text-align: left; background: var(--card-hi); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.meeting:hover { border-color: var(--edge-hi); } .meeting.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset; }
.meeting small { color: var(--muted); }
.paste summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 6px 0; } .paste textarea { margin-top: 6px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.btn { border: 0; border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 600; color: #fff; background: linear-gradient(180deg, #32b2ff, #037edc 55%, #0542bd); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.alt { background: var(--card-hi); border: 1px solid var(--edge-hi); color: var(--ink); font-weight: 500; }
.btn.alt:hover:not(:disabled) { border-color: #555; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.working ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); } .working li.done { color: var(--ink); } .working li.done::marker { content: "✓  "; color: var(--g); }
.review-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.review-head .actions { margin: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--edge); border-radius: 12px; background: var(--card); }
table.grid { border-collapse: collapse; width: 100%; min-width: 1240px; }
.grid th { position: sticky; top: 0; background: #1a1a1a; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 600; text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--edge); white-space: nowrap; }
.grid td { padding: 6px 8px; border-bottom: 1px solid #222; vertical-align: top; }
.grid tr.row td:first-child { border-left: 3px solid transparent; }
.grid tr.row.accepted td:first-child { border-left-color: var(--g); }
.grid tr.row.pushed { opacity: .55; }
.grid tr.row.child td.pulse-cell { padding-left: 26px; position: relative; }
.grid tr.row.child td.pulse-cell::before { content: "↳"; position: absolute; left: 10px; top: 13px; color: var(--dim); }
.grid input, .grid select, .grid textarea { background: transparent; border-color: transparent; padding: 6px 7px; border-radius: 6px; }
.grid input:hover, .grid select:hover, .grid textarea:hover { border-color: var(--edge-hi); }
.grid input:focus, .grid select:focus, .grid textarea:focus { background: var(--card-hi); border-color: var(--acc); }
.grid select option { background: #1b1b1b; }
.type-sel { font-weight: 600; font-size: 12.5px; min-width: 132px; }
.grid td.pulse-cell { min-width: 300px; }
.grid select[data-k="group"] { min-width: 160px; }
.pfx { color: var(--muted); font-size: 12px; margin-right: 2px; }
.pulse-wrap { display: flex; align-items: center; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 0 7px; }
.flag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid; }
.flag.w { color: var(--w); border-color: #5a4720; } .flag.b { color: var(--b); border-color: #5c2a2a; }
.flag button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0 0 0 4px; font-size: 11.5px; }
.vid { white-space: nowrap; font-size: 12.5px; text-decoration: none; display: inline-block; padding: 6px 0; }
.ok { color: var(--g); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.detail td { background: #151515; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; padding: 6px 4px 10px 36px; }
.detail-grid label > span { display: block; font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.detail-grid textarea, .detail-grid select { background: var(--card-hi); border-color: var(--edge-hi); }
.quote { color: var(--muted); font-style: italic; font-size: 13px; margin: 8px 0 0; }
.expander { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 6px 4px; }
.expander:hover, .del:hover { color: var(--ink); }
.del { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 16px; padding: 4px; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.summary .card { padding: 14px 16px; }
.summary h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bars div { display: grid; grid-template-columns: 130px 1fr 64px; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0; }
.bars i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #037edc, #32b2ff); }
.bars em { font-style: normal; color: var(--muted); text-align: right; }
.pushbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 20; width: min(760px, calc(100% - 32px)); display: flex; gap: 10px; align-items: center; background: #1b1b1b; border: 1px solid var(--edge-hi); border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.gap { flex: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: #161616; z-index: 40; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 22px 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot { display: flex; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--edge); }
.iconbtn { background: none; border: 1px solid var(--edge-hi); color: var(--muted); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; }
.op { background: var(--card); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 12px; }
.op small { color: var(--dim); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.op .vals { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.op.failed { border-color: #5c2a2a; } .op.done { border-color: #1f4a36; }
.warnline { color: var(--w); font-size: 12.5px; }
.errline { color: var(--b); font-size: 12.5px; }
@media (max-width: 860px) {
  .pick-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; padding-left: 8px; }
  main { padding: 0 16px 120px; } .top { padding: 16px; }
}
.grid select[data-k="billable"] { min-width: 128px; }
.expander, .btn.sm { white-space: nowrap; }
.grid select[data-k="owner"] { min-width: 112px; }

/* ===== OS shell ===== */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.ostop { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 12px; }
.mini-logo { background: none; border: 0; padding: 0; cursor: pointer; visibility: hidden; }
.mini-logo img { height: 26px; display: block; }
.shell[data-mode="chat"] .mini-logo { visibility: visible; }
.ostop-r { display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--edge-hi); background: #1c1c1c; color: var(--ink-hi); font-weight: 600; cursor: pointer; }
.acct-wrap { position: relative; }
.acct { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; width: 290px; background: #191919; border: 1px solid var(--edge-hi); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.acct-row { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); text-decoration: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.acct-row:hover { background: #242424; }
.acct-row small { display: block; color: var(--muted); font-size: 12px; }
.hero { display: flex; justify-content: center; margin: 22vh 0 26px; }
.hero img { width: 330px; max-width: 75vw; }
.shell[data-mode="chat"] .hero { display: none; }
.thread { flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 6px; }
.shell[data-mode="landing"] .thread { display: none; }
.composer-wrap { padding: 0 24px 18px; }
.shell[data-mode="chat"] .composer-wrap { position: sticky; bottom: 0; padding-top: 14px; background: linear-gradient(180deg, rgba(17,17,17,0), #111 30%); z-index: 15; }
.composer { max-width: 760px; margin: 0 auto; position: relative; }
.field { display: flex; align-items: center; gap: 8px; background: #1b1b1b; border: 1px solid var(--edge-hi); border-radius: 18px; padding: 7px 7px 7px 8px; }
.field:focus-within { border-color: #4a4a4a; }
#input { flex: 1; min-width: 0; background: none; border: 0; padding: 8px 4px; font-size: 15px; }
#input:focus { border: 0; }
.scope-btn { background: #242424; border: 1px solid var(--edge-hi); border-radius: 10px; padding: 6px 10px; cursor: pointer; font-size: 13px; color: var(--ink); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cmd-chip { font-weight: 700; padding: 3px 8px; border-radius: 8px; border: 1px solid #1d4f7a; background: linear-gradient(90deg, #41eafd, #32b2ff 45%, #037edc); -webkit-background-clip: text; background-clip: text; color: transparent; cursor: pointer; white-space: nowrap; }
.go { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center; background: linear-gradient(180deg, #32b2ff, #037edc 55%, #0542bd); }
.go svg { width: 17px; height: 17px; }
.foot { text-align: center; font-size: 11.5px; color: var(--dim); margin: 8px 0 0; }
.menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); margin: 0; list-style: none; background: #191919; border: 1px solid var(--edge-hi); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.6); max-height: 50vh; overflow: auto; z-index: 20; }
.menu li { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.menu li.on, .menu li:hover { background: #242424; }
.menu li b { color: var(--acc-hi); font-weight: 600; }
.menu li span { color: var(--muted); font-size: 13px; }
.menu li.head { display: block; cursor: default; color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; background: none; }
.menu.scope li { grid-template-columns: minmax(0,1fr); }
.menu.scope li.search { cursor: default; background: none; padding: 4px; }
.msg { display: flex; gap: 12px; padding: 10px 4px; }
.msg .av { width: 34px; height: 34px; border-radius: 8px; background: #2a2a2a; color: var(--ink-hi); font-weight: 600; display: grid; place-items: center; flex: none; font-size: 14px; overflow: hidden; }
.msg .av img { width: 26px; }
.msg-main { flex: 1; min-width: 0; }
.msg-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.msg-h b { color: var(--ink-hi); } .msg-h time { color: var(--dim); font-size: 11.5px; }
.msg-h .app { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: #222; border-radius: 3px; padding: 1px 4px; }
.msg-b .token { font-weight: 700; background: linear-gradient(90deg, #41eafd, #32b2ff 45%, #037edc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.msg-b > .card { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { background: var(--card-hi); border: 1px solid var(--edge-hi); color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: #555; }
.answer-bar { position: sticky; bottom: 92px; z-index: 12; margin-top: 12px; display: flex; gap: 10px; align-items: center; background: #1b1b1b; border: 1px solid var(--edge-hi); border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.client-pick { max-width: 420px; margin-top: 10px; }
.client-pick .opts { margin-top: 6px; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.client-pick .opts button { text-align: left; background: none; border: 0; color: var(--ink); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.client-pick .opts button:hover { background: #242424; }
@media (max-width: 860px) { .menu li { grid-template-columns: 1fr; gap: 2px; } .thread, .composer-wrap, .ostop { padding-left: 16px; padding-right: 16px; } .hero { margin-top: 16vh; } }
a.conn { text-decoration: none; }
.msg-b table.grid { min-width: 1180px; }
.msg-b .grid td.pulse-cell { min-width: 250px; }
.msg-b .grid td, .msg-b .grid th { padding-left: 6px; padding-right: 6px; }
.msg-b .type-sel { min-width: 120px; }
.msg-b .grid select[data-k="group"] { min-width: 140px; }
