/* NextGen — one small sheet, in the admin page's style (master/admin.html): the same tokens, light by default and dark
   by the system's preference, the same button, input and card spacing. The canvas (Canvas.jsx) reads these tokens too. */
:root { --bg: #f6f6f4; --card: #fff; --ink: #1c1c1a; --dim: #6b6b66; --line: #e3e2dd; --ok: #1f7a4d; --warn: #a15c00; --bad: #b3261e; --accent: #2f5fd0; --shadow: 0 12px 40px rgba(0,0,0,.14); }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; --bg: #161615; --card: #1f1f1d; --ink: #ececea; --dim: #9a9a94; --line: #33332f; --ok: #5ec48f; --warn: #e0a44a; --bad: #f0857d; --accent: #8fb0ff; --shadow: 0 12px 40px rgba(0,0,0,.45); } }
:root { --panel: var(--card); --text: var(--ink); --danger: var(--bad); --wait: var(--warn); --open: var(--accent); --radius: 10px;
  /* a page's own colours: the paper, its ink, its dim and faint greys, its rules, a note's paper, the hover and focus washes */
  --paper: #ffffff; --paper-ink: #1c1c1a; --paper-dim: #7a7a74; --paper-faint: #c9c8c2; --paper-line: #e3e2dd; --paper-edge: #d6d5cf; --paper-well: #f3f2ee; --paper-locked: #3a4a7a; --note: #fff9e6; --note-line: #ecdfb3; --note-edge: #d9cd9c; --wash: rgba(0,0,0,.025); --focus: rgba(47,95,208,.06); --frame: rgba(0,0,0,.035); --frame-line: rgba(0,0,0,.09); }
@media (prefers-color-scheme: dark) { :root { --paper: #26262a; --paper-ink: #e8e6e1; --paper-dim: #9a9a94; --paper-faint: #5c5c58; --paper-line: #3a3a3e; --paper-edge: #4a4a4e; --paper-well: #1f1f22; --paper-locked: #a9b8e8; --note: #332e1e; --note-line: #4d4530; --note-edge: #5c5236; --wash: rgba(255,255,255,.04); --focus: rgba(143,176,255,.12); --frame: rgba(255,255,255,.045); --frame-line: rgba(255,255,255,.1); } }
* { box-sizing: border-box; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-thumb:hover { background: var(--dim); background-clip: padding-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, sans-serif; }
#root { height: 100%; }
.micon.flip { transform: scaleX(-1); }
.micon { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; display: inline-block; vertical-align: middle; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 60px; }
.btn { padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto; animation: spin .8s linear infinite; }
.spinner.small { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
/* sign-in */
.loginwrap { display: grid; place-items: center; height: 100%; }
.login { width: min(380px, 92vw); display: grid; gap: 12px; background: var(--card); padding: 20px 16px; border-radius: 10px; border: 1px solid var(--line); }
.login .brand { font-weight: 600; font-size: 20px; }
.login .error { color: var(--bad); font-size: 12px; }
.login .code { letter-spacing: .4em; font-size: 20px; text-align: center; }
/* the shell */
.shell { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.top .brand { font-weight: 600; font-size: 16px; }
.top .crumbs { color: var(--dim); display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.top .crumbs .t { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.top .crumbs .t.edit { cursor: text; border-radius: 6px; padding: 2px 6px; margin: 0 -6px; } .top .crumbs .t.edit:hover { background: var(--bg); }
.top .crumbs input.t { width: min(520px, 50vw); padding: 2px 6px; font: inherit; }
.top .grow { flex: 1; }
.top .user { position: relative; display: flex; }
.top .avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--accent); color: #fff; font: 600 13px system-ui; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.top .avatar:hover, .top .avatar.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent); }
.top .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 30; display: grid; gap: 2px; }
.top .menu .me { display: grid; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13px; overflow: hidden; } .top .menu .me b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .top .menu .me small { color: var(--dim); font-size: 11px; }
.top .menu .item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; text-align: left; width: 100%; }
.top .menu .item:hover { background: var(--bg); } .top .menu .item .micon { font-size: 18px; color: var(--dim); }
.top .btn { display: inline-flex; align-items: center; gap: 4px; }
.top .btn.on { border-color: var(--accent); color: var(--accent); }
.top a.btn { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.top a.btn:visited { color: var(--ink); }
/* home: the projects as cards */
.home { padding: 20px 16px 60px; overflow: auto; max-width: 1200px; margin: 0 auto; width: 100%; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { display: grid; grid-template-rows: auto 1fr auto auto; gap: 10px; align-items: start; aspect-ratio: 4 / 3; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-align: left; transition: border-color .15s; cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card .micon { font-size: 26px; color: var(--dim); }
.card .t { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; align-self: start; }
.card .m { display: flex; justify-content: space-between; gap: 8px; color: var(--dim); font-size: 12px; align-self: end; }
.card .m i { font-style: normal; }
.card .o { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: end; }
.card .m b { font-weight: 500; color: var(--warn); }
.card.waiting { border-color: var(--warn); }
.card.waiting .micon { color: var(--warn); }
.card.new { border-style: dashed; background: transparent; }
.card.new .micon { color: var(--accent); font-size: 32px; }
.card.new .m { display: block; line-height: 1.35; }
.card.new:hover { border-color: var(--accent); }
.home .none { color: var(--dim); text-align: center; margin-top: 24px; }
.card .row { display: flex; align-items: center; gap: 4px; }
.card .x { background: none; border: 0; color: var(--dim); padding: 4px; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.card:hover .x, .card .x:focus-visible, .card.deleted .x { opacity: 1; } .card .x:hover { color: var(--bad); background: var(--bg); }
.card.deleted { opacity: .75; cursor: default; } .card.deleted:hover { border-color: var(--line); } .card.deleted .m b { color: var(--bad); }
.home .sep { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 12px; margin: 28px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
/* the composer: big in a new project, docked in a running one */
.composer { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 6px; }
.composer textarea { min-height: 0; border: 0; background: transparent; padding: 6px 8px; resize: none; }
.composer textarea:focus { outline: none; }
.composer.big { padding: 12px 14px; }
.composer.big textarea { min-height: 120px; font-size: 16px; resize: vertical; }
.composer .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer .line { display: flex; gap: 4px; align-items: flex-end; }
.composer .line textarea { flex: 1; min-width: 0; max-height: 160px; }
.composer .hint { color: var(--dim); font-size: 12px; }
.composer .files { display: flex; gap: 6px; flex-wrap: wrap; color: var(--dim); font-size: 12px; padding: 0 8px; }
.composer .files span { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; }
.composer.drop { outline: 2px dashed var(--accent); }
.composer:focus-within { border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--dim); padding: 5px 8px; }
.btn.ghost:hover:not(:disabled) { color: var(--ink); background: var(--bg); border-color: transparent; }
/* the project: tree left, canvas right */
.studio { display: grid; grid-template-columns: 240px 1fr; height: 100%; min-height: 0; }
.studio.one { grid-template-columns: 1fr; }
.dock .history { font-size: 11px; color: var(--dim); display: grid; gap: 4px; padding: 8px 12px; max-height: 32vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); } .dock .history b { color: var(--ink); font-weight: 500; }
.status .meta { color: var(--dim); font-size: 12px; white-space: nowrap; } .status .btn.ghost.on { color: var(--accent); } .status .btn b { font-weight: 600; color: var(--accent); }
/* the People modal: a row per account with a toggle, as the admin page's switches */
.modal.people .body { display: grid; gap: 10px; color: var(--ink); } .modal.people .meta { color: var(--dim); font-size: 12px; }
.modal.people .list { display: grid; gap: 2px; max-height: 50vh; overflow: auto; }
.modal.people .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); } .modal.people .row:last-child { border-bottom: 0; }
.modal.people .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .modal.people .who i { color: var(--ok); font-style: normal; font-size: 12px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .15s; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--ok); } .switch input:checked + span::after { left: 19px; }
.switch input:disabled + span { opacity: .5; }
.studio.folded { grid-template-columns: 0 1fr; } .studio.folded .tree.docs { padding: 0; border: 0; overflow: hidden; }     /* folded away: only the tab shows, on the canvas's edge */
.tree .fold { width: auto; padding: 4px; margin: 0 0 4px auto; color: var(--dim); } .tree .fold:hover { color: var(--ink); background: var(--bg); }
.studio.folded .tree { padding: 6px 4px; } .studio.folded .tree .fold { margin: 0 auto; }
.tree { border-right: 1px solid var(--line); background: var(--card); padding: 10px; overflow: auto; display: grid; align-content: start; gap: 2px; }
.tree button { display: block; width: 100%; text-align: left; padding: 6px 8px; border-radius: 7px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree button:hover { color: var(--ink); }
.tree button.on { background: var(--bg); color: var(--ink); font-weight: 600; }
.tree .lvl1 { padding-left: 20px; } .tree .lvl2 { padding-left: 32px; }
.tree .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--line); }
.tree .dot.waiting { background: var(--warn); } .tree .dot.approved { background: var(--ok); } .tree .dot.open { background: var(--accent); }
.tree .sep { color: var(--dim); font-size: 12px; margin: 10px 8px 2px; display: flex; align-items: center; justify-content: space-between; }
.tree .row { display: flex; align-items: center; } .tree .row > button:first-child { flex: 1; min-width: 0; }
.tree .mini { width: auto; padding: 2px; color: var(--dim); border-radius: 6px; opacity: 0; } .tree .row:hover .mini, .tree .sep .mini { opacity: 1; } .tree .mini:hover { color: var(--ink); background: var(--bg); }
.tree .mini .micon { font-size: 16px; }
.tree .history { font-size: 11px; color: var(--dim); display: grid; gap: 4px; padding: 2px 8px; max-height: 40vh; overflow: auto; } .tree .history b { color: var(--ink); font-weight: 500; }
.board .bar { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.board .bar .t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .board .bar .meta { color: var(--dim); font-size: 12px; white-space: nowrap; }
.board .bar select { width: auto; padding: 4px 8px; font-size: 12px; }

.dock .attached { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px; font-size: 12px; color: var(--dim); } .dock .attached span { background: var(--card); border: 1px solid var(--accent); color: var(--ink); border-radius: 99px; padding: 2px 9px; }
.board { position: relative; overflow: hidden; min-height: 0; background: var(--bg); }
/* the canvas in HTML: a world panned and zoomed by one transform, the sheets on it */
.wrap { position: absolute; inset: 0; overflow: hidden; cursor: crosshair; user-select: none; }
.wrap.drag { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.slot { display: flex; flex-direction: column; align-items: flex-start; }
/* a group: a frame under the sheets, grown to hold its own; a press on it where no sheet is moves them as one */
.group { background: var(--frame); border: 1px solid var(--frame-line); border-radius: 8px; min-width: 456px; min-height: 180px; padding: 0 0 18px; }
.group.picked { outline: 1px dashed var(--accent); outline-offset: 3px; }
.ghead { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px 10px; cursor: grab; user-select: none; }
.ghead .titles { flex: 1; min-width: 0; } .ghead .f { color: var(--dim); font: 600 9.5px system-ui; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
.ghead .t { font: 600 15px system-ui; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; border-radius: 4px; margin: 0 -4px; padding: 0 4px; }
.ghead div.t:hover { background: var(--card); } .ghead input.t { width: 100%; border: 1px solid var(--accent); background: var(--card); color: inherit; line-height: 1.2; }
.ghead .tags { display: flex; gap: 4px; align-items: center; flex: none; margin-top: 3px; } .ghead .n { color: var(--dim); font-size: 11px; margin-right: 4px; white-space: nowrap; }
.ghead .tag { font: 600 10px system-ui; color: var(--dim); border: 1px solid var(--line); border-radius: 9px; padding: 1px 7px; background: var(--card); cursor: pointer; white-space: nowrap; } .ghead .tag:hover { color: var(--ink); border-color: var(--dim); }
.ghint { color: var(--dim); font-size: 12px; padding: 8px 0 0; width: 420px; }
.modal.flows { width: min(520px, calc(100% - 32px)); } .modal.flows .body { display: grid; gap: 8px; }
.modal.flows .head .t { display: grid; gap: 2px; } .modal.flows .ttl { display: grid; gap: 4px; color: var(--dim); font-size: 12px; margin-bottom: 6px; } .modal.flows .ttl input { font-size: 14px; color: var(--ink); } .modal.flows .lbl { color: var(--dim); font-size: 12px; } .modal.flows .head .t small { color: var(--dim); font-size: 12px; font-weight: 400; }
.modal.flows .opt { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font: inherit; color: var(--ink); }
.modal.flows .opt:hover { border-color: var(--accent); } .modal.flows .opt b { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; } .modal.flows .opt b i { font-style: normal; font-weight: 400; color: var(--dim); font-size: 12px; } .modal.flows .opt span { color: var(--dim); font-size: 12px; line-height: 1.4; }
.sheet { content-visibility: auto; contain-intrinsic-size: auto 420px auto 400px; }   /* off-screen sheets are not laid out or painted: the browser's own culling */
.sheet.note { background: var(--note); min-height: 120px; margin-top: 8px; border: 1px dashed var(--note-edge); contain-intrinsic-size: auto 420px auto 120px; }   /* flush under its sheet: attached */
.sheet.note .head { padding: 12px 0 6px; margin: 0 22px 4px; border-bottom-color: var(--note-line); cursor: default; } .sheet.note .head .t { font-size: 14px; } .sheet.note .body { padding: 0 22px 16px; }
.sheet .addnote { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 1px solid var(--paper-edge); color: var(--paper-dim); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 1; }
.sheet .addnote .micon { font-size: 18px; } .sheet:hover .addnote { opacity: 1; } .sheet .addnote:hover { color: var(--accent); border-color: var(--accent); }
.sheet { position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 6px; display: flex; flex-direction: column; cursor: default; user-select: text; font: 13px/18px Georgia, "Times New Roman", serif; }
.sheet.picked { outline: 1px dashed var(--accent); outline-offset: 2px; }
.marquee { position: absolute; border: 1px solid var(--accent); background: rgba(47,95,208,.08); pointer-events: none; z-index: 5; } .sheet.isdone { outline: 2px solid var(--ok); } .sheet.over { outline: 2px dashed var(--accent); }
.sheet .head { display: flex; align-items: flex-start; gap: 8px; padding: 18px 0 8px; margin: 0 28px 6px; border-bottom: 1px solid var(--paper-line); cursor: grab; user-select: none; }
.sheet .body { cursor: grab; } .sheet .body textarea, .sheet .body select, .sheet .body input { cursor: text; } .sheet .body select { cursor: pointer; }
/* zoomed out past half size: the controls give way and the whole sheet (or frame) is one thing to drag */
.wrap.far .sheet textarea, .wrap.far .sheet select, .wrap.far .sheet input, .wrap.far .sheet button, .wrap.far .sheet a, .wrap.far .sheet img, .wrap.far .sheet video, .wrap.far .ghead button, .wrap.far .ghead input { pointer-events: none; }
.wrap.far .sheet, .wrap.far .group { cursor: grab; }
.sheet .head .titles { flex: 1; min-width: 0; } .sheet .head .t { font: 600 17px Georgia, "Times New Roman", serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; border-radius: 3px; margin: 0 -4px; padding: 0 4px; }
.sheet .head div.t:hover { background: var(--wash); } .sheet .head input.t { width: 100%; border: 0; background: var(--focus); color: inherit; line-height: 1.2; }
.sheet .head .f { color: var(--paper-dim); font: 600 9.5px system-ui; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.sheet .head .sub input { display: block; width: calc(100% + 12px); margin: 2px -6px 0; padding: 0 6px; height: 20px; border: 0; border-radius: 3px; background: transparent; color: var(--paper-dim); font: italic 13px/18px Georgia, "Times New Roman", serif; cursor: text; }
.sheet .head .sub input::placeholder { color: var(--paper-faint); } .sheet .head .sub input:hover { background: var(--wash); } .sheet .head .sub input:focus { outline: none; background: var(--focus); color: var(--paper-ink); }
.sheet .tags { display: flex; gap: 4px; flex: none; margin-top: 3px; }
.sheet .tag { font: 600 10px system-ui; color: var(--paper-dim); border: 1px solid var(--paper-edge); border-radius: 9px; padding: 1px 7px; background: var(--paper); cursor: pointer; white-space: nowrap; }
.sheet .tag:hover { color: var(--paper-ink); border-color: var(--paper-dim); } .sheet .tag.on { color: var(--ok); border-color: var(--ok); }
.sheet .body { padding: 0 28px 22px; display: flex; flex-direction: column; }
.sheet .sec { position: relative; padding: 6px 0 4px; }
.sheet .sec h6 { margin: 0 0 2px; color: var(--paper-dim); font: 600 9.5px system-ui; text-transform: uppercase; letter-spacing: .04em; }
.sheet .sec textarea { display: block; width: calc(100% + 12px); margin: 0 -6px; padding: 1px 6px; border: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; resize: none; overflow: hidden; min-height: 20px; }
.sheet .sec textarea::placeholder { color: var(--paper-faint); font-style: italic; }
.sheet .sec textarea:hover { background: var(--wash); } .sheet .sec textarea:focus { outline: none; background: var(--focus); }
.sheet .sec textarea[readonly] { color: var(--paper-locked); } .sheet .sec textarea[readonly]:focus { background: transparent; }
.sheet .sec select { appearance: none; -webkit-appearance: none; width: auto; max-width: 100%; margin: 0 -6px; padding: 1px 22px 1px 6px; border: 0; border-radius: 3px; color: inherit; font: inherit; cursor: pointer; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7a74' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 6px center; }
.sheet .sec select option { color: var(--paper-ink); background: var(--paper); }   /* the popup's rows: never the faint "pick one" colour */
@media (prefers-color-scheme: dark) { .sheet .sec select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239a9a94' stroke-width='1.5'/%3E%3C/svg%3E"); } }
.sheet .sec select:hover { background-color: var(--wash); } .sheet .sec select.empty { color: var(--paper-faint); font-style: italic; }
.sheet .sec.media img, .sheet .sec.media video { display: block; width: 100%; max-height: 260px; object-fit: contain; background: var(--paper-well); border-radius: 3px; }
.sheet .sec.media .empty { color: var(--paper-faint); font-style: italic; padding: 2px 0; border: 1px dashed transparent; border-radius: 3px; }
.sheet .sec.media.over .empty, .sheet .sec.media.over img, .sheet .sec.media.over video { outline: 2px dashed var(--accent); }
.sheet .sec.media .x { position: absolute; right: 0; top: 22px; opacity: 0; }
.sheet .sec.media:hover .x { opacity: 1; }
.sheet .x { background: var(--paper); color: var(--paper-dim); border: 1px solid var(--paper-edge); border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.sheet .x .micon { font-size: 14px; } .sheet .x:hover { color: var(--bad); border-color: var(--bad); }
.sheet .pins { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--paper-line); }
.sheet .pin { position: relative; width: 72px; height: 72px; background: var(--paper-well); border-radius: 3px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sheet .pin img, .sheet .pin video { width: 100%; height: 100%; object-fit: cover; } .sheet .pin a { font: 10px system-ui; color: var(--paper-dim); padding: 4px; text-align: center; overflow-wrap: anywhere; }
.sheet .pin.agent { outline: 1px solid var(--accent); }
.sheet .pin .x { position: absolute; right: 2px; top: 2px; opacity: 0; } .sheet .pin:hover .x { opacity: 1; }
.board.empty { display: grid; place-items: center; padding: 24px; overflow: auto; }
.intro { width: min(680px, 100%); display: grid; gap: 12px; }
.intro h1 { margin: 0; font-size: 20px; }
.intro p { margin: 0 0 6px; color: var(--dim); max-width: 560px; }
.dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(780px, calc(100% - 24px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.dock > * { min-width: 0; }
.status { display: flex; gap: 10px; align-items: center; padding: 4px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; margin: 0 auto; }
.status .txt { color: var(--dim); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status select { width: auto; padding: 4px 8px; font-size: 12px; }
.status .btn { white-space: nowrap; }
.status .pace { color: var(--warn); font-size: 12px; white-space: nowrap; border: 1px solid currentColor; border-radius: 99px; padding: 1px 8px; }
.dock .composer { box-shadow: var(--shadow); }
/* the reports: what every project cost */
.reports { padding: 20px 16px 60px; overflow: auto; display: grid; gap: 14px; align-content: start; max-width: 980px; margin: 0 auto; width: 100%; }
.reports .rhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.reports h1 { margin: 0; font-size: 20px; }
.reports h2 { margin: 14px 0 0; font-size: 15px; }
.reports .meta { color: var(--dim); font-size: 12px; }
.reports .btn.on { border-color: var(--accent); color: var(--accent); }
.reports .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.reports .tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.reports .tile .v { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.reports .tile .k { color: var(--dim); font-size: 12px; }
.reports .alerts { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--warn); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.reports .alerts .micon { color: var(--warn); font-size: 18px; }
.reports table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.reports th, .reports td { padding: 8px 14px; text-align: left; border-top: 1px solid var(--line); }
.reports th { border-top: 0; color: var(--dim); font-weight: 500; font-size: 12px; }
.reports th.n, .reports td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reports td.bar { width: 140px; }
.reports .link { color: var(--ink); text-align: left; padding: 0; }
.reports .link:hover { color: var(--accent); }
.rbar { display: block; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.rbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.status .about { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink); background: var(--card); border: 1px solid var(--accent); border-radius: 99px; padding: 1px 4px 1px 9px; white-space: nowrap; }
.status .about button { color: var(--dim); padding: 0 4px; } .status .about button:hover { color: var(--bad); }
.tree .meta { color: var(--dim); font-size: 12px; }
.tree.docs { display: block; } .tree.docs > * { margin-bottom: 2px; }     /* a plain list that scrolls: as a grid, many entries were squeezed to nothing instead */ .tree.docs button { font-size: 13px; padding: 5px 8px; } .tree.docs button small { color: var(--dim); font-size: 11px; font-weight: 400; } .tree.docs .sep { margin-top: 12px; }
/* the project's wallet, in the top bar */
.wallet { position: relative; }
.wallet .btn.warn, .top .btn.warn { border-color: var(--warn); } .wallet .btn b, .top .btn b { font-weight: 500; color: var(--warn); } .top .btn i { font-style: normal; color: var(--dim); }
/* the generations modal: the agent's staged jobs as cards */
.modal.gens { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 32px); grid-template-rows: auto 1fr; }
.modal.gens .body { display: grid; gap: 10px; overflow: auto; color: var(--ink); align-content: start; } .modal.gens .meta { color: var(--dim); font-size: 12px; }
.gen { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.gen .row { display: flex; align-items: center; gap: 8px; min-width: 0; } .gen .row b { font-weight: 600; } .gen .row .micon { color: var(--dim); } .gen .grow { flex: 1; }
.gen .st { font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .gen .st.staged { color: var(--warn); } .gen .st.done { color: var(--ok); } .gen .st.failed { color: var(--bad); }
.gen.s-staged { border-color: var(--warn); }
.gen .prompt { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.gen .outs { display: flex; flex-wrap: wrap; gap: 8px; } .gen .out img, .gen .out video { max-height: 180px; max-width: 320px; border-radius: 6px; display: block; background: #000; } .gen .out a { color: var(--ink); font-size: 12px; }
.gen .acts { display: flex; align-items: center; gap: 8px; } .gen .acts .btn { display: inline-flex; align-items: center; gap: 4px; } .gen .err { font-size: 12px; }
/* a sheet another person holds: their colour around it, their name on the head, its boxes closed to me */
.sheet.held, .group.held { outline: 2px solid var(--c); outline-offset: 2px; cursor: not-allowed; }
.sheet.held .body, .sheet.held .head, .group.held .ghead, .group.held .gbody > .ghint { pointer-events: none; }
.holders { display: inline-flex; gap: 4px; margin-top: 3px; } .holders span { font: 500 10px system-ui; color: #fff; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.ghead .holders { margin-top: 4px; }
/* another person's pointer on the canvas: an arrow and their name, kept its screen size through the zoom */
.cursor { position: absolute; pointer-events: none; z-index: 6; transform: scale(calc(1 / var(--k, 1))); transform-origin: 0 0; display: flex; align-items: flex-start; gap: 0; transition: left .08s linear, top .08s linear; }
.cursor svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); } .cursor span { margin: 14px 0 0 -4px; background: var(--c); color: #fff; font: 500 11px system-ui; padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.wallet .panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 15; width: min(420px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 10px; }
.wallet .panel .head { display: flex; align-items: baseline; gap: 10px; } .wallet .panel .head .t { font-weight: 600; flex: 1; }
.wallet .panel .big { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wallet .panel .wait { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--warn); font-size: 13px; } .wallet .panel .wait b { font-weight: 600; }
.wallet .panel .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .wallet .panel .row input { width: 90px; }
.wallet .panel .meta { color: var(--dim); font-size: 12px; }
.wallet .panel .ledger { display: grid; gap: 3px; font-size: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.wallet .panel .ledger > div { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; }
.wallet .panel .ledger b { font-variant-numeric: tabular-nums; } .wallet .panel .ledger b.in { color: var(--ok); }
/* a modal, in place of the browser's confirm */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); display: grid; }
.modal .head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.modal .head .t { font-weight: 600; flex: 1; }
.modal .body { padding: 12px 14px; color: var(--dim); } .modal .body p { margin: 0 0 6px; } .modal .body p:last-child { margin: 0; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 10px 10px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (max-width: 800px) { .studio { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .tree { max-height: 140px; } }
/* the canvas: every sheet and frame at its own place in the world (x, y), drawn by a transform; frames under the sheets */
.slot { position: absolute; left: 0; top: 0; }
.slot.frameslot { z-index: 0; } .slot.sheetslot { z-index: 1; }
.slot.frameslot .group { width: 100%; height: 100%; min-width: 0; min-height: 0; padding: 0; cursor: grab; }
.group .ghint { padding: 0 18px; }
/* the Workflows page: the list and the agent left, the form builder in the middle, the document as a sheet right */
.wfs { display: grid; grid-template-columns: 280px minmax(0, 1fr) 480px; height: 100%; min-height: 0; }
.wf-side { border-right: 1px solid var(--line); background: var(--card); display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); min-height: 0; min-width: 0; overflow: hidden; }
.wf-sh { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px 16px; } .wf-sh .btn { display: inline-flex; align-items: center; gap: 2px; }
.wf-list { overflow: auto; padding: 0 8px; display: grid; align-content: start; gap: 2px; }
.wf-item { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 8px; } .wf-item:hover { background: var(--bg); } .wf-item.on { background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.wf-item b { font-weight: 600; } .wf-item span { color: var(--dim); font-size: 12px; }
.wf-ro { padding: 12px 16px; }
.wf-center { position: relative; min-height: 0; min-width: 0; } .wf-center .dock { width: min(720px, calc(100% - 32px)); }
.wf-main { height: 100%; overflow: auto; padding: 18px 22px 170px; display: grid; gap: 12px; align-content: start; }
.wf-head { display: flex; gap: 16px; align-items: flex-start; } .wf-head .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wf-title { font-size: 20px; font-weight: 600; border-color: transparent; background: transparent; padding: 2px 6px; margin-left: -7px; } .wf-title:hover:not(:disabled) { border-color: var(--line); }
.wf-when { min-height: 0; border-color: transparent; background: transparent; padding: 2px 6px; margin-left: -7px; color: var(--dim); resize: none; overflow: hidden; } .wf-when:hover:not(:disabled) { border-color: var(--line); }
.wf-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .wf-acts .btn { display: inline-flex; align-items: center; gap: 4px; }
.wf-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.wf-tab { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 13px; } .wf-tab i { font-style: normal; color: var(--dim); font-size: 11px; }
.wf-tab .micon { font-size: 16px; } .wf-tab:hover { border-color: var(--accent); } .wf-tab.on { border-color: var(--accent); color: var(--accent); } .wf-tab.add { border-style: dashed; color: var(--dim); }
.wf-cards { display: grid; gap: 10px; }
.wf-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; } .wf-card.doc { border-color: var(--accent); }
.wf-card .frow { display: flex; gap: 8px; align-items: center; } .wf-card .frow .lt { flex: 1; min-width: 0; font-weight: 600; } .wf-card .frow .kind { width: 150px; flex: none; }
.wf-card .n { color: var(--dim); font-variant-numeric: tabular-nums; width: 20px; text-align: right; flex: none; }
.wf-card label { display: grid; gap: 4px; color: var(--dim); font-size: 12px; } .wf-card label.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .wf-card label.check input { width: auto; }
.wf-card textarea { min-height: 0; resize: none; overflow: hidden; } .wf-card .grid2 { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.wf-card .meta, .wf-cards > .meta, .wf-main .meta, .wf-prev .meta { color: var(--dim); font-size: 12px; }
.moves { display: inline-flex; flex: none; } .moves .btn { padding: 3px 4px; } .moves .micon { font-size: 18px; }
.btn.ghost.add { justify-self: start; display: inline-flex; align-items: center; gap: 2px; }
.opts { display: grid; gap: 4px; padding: 6px 0 0 10px; border-left: 2px solid var(--line); }
.opts .orow { display: flex; gap: 6px; align-items: center; } .opts .orow select { width: auto; max-width: 280px; } .opts .ov { width: 200px; flex: none; } .opts .om { flex: 1; min-width: 0; color: var(--dim); }
.opts .link { color: var(--accent); padding: 0; font-size: 12px; } .opts .link:hover { text-decoration: underline; }
.wf-prev { border-left: 1px solid var(--line); overflow: auto; padding: 16px 24px 60px; display: grid; gap: 8px; align-content: start; justify-content: center; background: var(--bg); }
.wf-prev .sheet { pointer-events: none; }
@media (max-width: 1300px) { .wfs { grid-template-columns: 260px minmax(0, 1fr); } .wf-prev { display: none; } }
/* the composer's model: a small press beside attach, its menu above it */
.mp { position: relative; flex: none; } .mpb { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; max-width: 180px; } .mpb span { overflow: hidden; text-overflow: ellipsis; } .mpb .micon { font-size: 18px; } .mpb.on { color: var(--accent); }
.mp-menu { position: absolute; bottom: calc(100% + 8px); right: 0; width: 300px; max-height: 60vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 30; display: grid; gap: 2px; }
.mp-h { color: var(--dim); font: 600 10px system-ui; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px 2px; }
.mp-opt { display: grid; gap: 1px; text-align: left; padding: 7px 10px; border-radius: 7px; } .mp-opt:hover { background: var(--bg); } .mp-opt.on { background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.mp-opt b { font-weight: 600; font-size: 13px; } .mp-opt span { color: var(--dim); font-size: 11.5px; line-height: 1.35; }
.mp-eff { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 8px 6px; } .mp-eff .chip { font-size: 12px; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--dim); } .mp-eff .chip.on { border-color: var(--accent); color: var(--accent); }
/* the app's chrome never takes a text selection (the bar, the dock, the rail, the side lists): only a sheet's text and the boxes do */
.top, .dock .status, .tree, .wf-side, .wf-tabs, .home .card { user-select: none; -webkit-user-select: none; }
.addm { position: relative; display: inline-flex; } .addm-menu { left: 0; right: auto; width: 290px; } .mp-opt:disabled { opacity: .45; cursor: default; } .mp-opt:disabled:hover { background: none; }
.gone { display: grid; gap: 12px; justify-items: center; margin-top: 30vh; text-align: center; }
/* the Documents rail: its list scrolls; the fold press is a tab outside its right edge, at half its height */
.rail { position: relative; z-index: 4; min-height: 0; display: grid; } .rail .tree { min-height: 0; }
.railfold { position: absolute; top: 50%; left: 100%; transform: translateY(-50%); width: 20px; height: 48px; padding: 0; border-radius: 0 8px 8px 0; border: 1px solid var(--line); border-left: 0; background: var(--card); color: var(--dim); display: grid; place-items: center; }
.railfold:hover { color: var(--ink); border-color: var(--accent); } .railfold .micon { font-size: 18px; }
/* the lightbox: a layer over everything, a carousel of a sheet's pictures and videos; a picture fits, zooms and pans */
.sheet .sec.media img, .sheet .sec.media video, .sheet .pin img, .sheet .pin video { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 1000; background: #0b0b0b; display: grid; grid-template-rows: auto 1fr auto; color: #e8e6e1; user-select: none; }
.lb .btn.ghost { color: #c9c7c2; } .lb .btn.ghost:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.08); } .lb .btn.ghost:disabled { opacity: .35; }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; } .lb-top .grow { flex: 1; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lb-count { color: #9a9a94; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-zoom { display: inline-flex; align-items: center; gap: 2px; } .lb-zoom .btn { min-width: 30px; font-size: 15px; } .lb-pct { width: 46px; text-align: center; color: #9a9a94; font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 0; cursor: zoom-in; }
.lb-stage.zoomed { cursor: grab; } .lb-stage.zoomed:active { cursor: grabbing; }
.lb-stage img { max-width: calc(100vw - 140px); max-height: calc(100vh - 170px); object-fit: contain; transform-origin: center; will-change: transform; box-shadow: 0 12px 48px rgba(0,0,0,.6); border-radius: 3px; }
.lb-stage video { max-width: calc(100vw - 140px); max-height: calc(100vh - 170px); background: #000; border-radius: 3px; cursor: default; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.08); color: #e8e6e1; display: grid; place-items: center; z-index: 2; }
.lb-nav:hover { background: rgba(255,255,255,.18); } .lb-nav .micon { font-size: 28px; } .lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-strip { display: flex; gap: 8px; justify-content: center; padding: 10px 14px 14px; overflow-x: auto; }
.lb-thumb { flex: none; width: 64px; height: 48px; border-radius: 4px; overflow: hidden; opacity: .55; outline: 2px solid transparent; outline-offset: 1px; padding: 0; background: #000; }
.lb-thumb:hover { opacity: .85; } .lb-thumb.on { opacity: 1; outline-color: var(--accent); } .lb-thumb img, .lb-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.world.measuring .sheet { content-visibility: visible; }     /* arrange measures every sheet, the skipped ones too */
.dock .proposal { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; } .dock .proposal > .words { flex: 1; min-width: 0; } .dock .proposal > .micon { flex: none; } .dock .proposal .micon { color: var(--accent); }
.modal.flows .ttl textarea { font-size: 14px; color: var(--ink); min-height: 84px; resize: vertical; }
.modal.flows .fillnow { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink); margin: 2px 0 8px; cursor: pointer; } .modal.flows .fillnow small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; } .modal.flows .fillnow.off { opacity: .55; cursor: default; } .modal.flows .fillnow .switch { margin-top: 1px; }
.modal.flows { max-height: calc(100vh - 32px); overflow: auto; }
.modal.flows .ttl > span { display: flex; justify-content: space-between; } .modal.flows .ttl i { font-style: normal; font-variant-numeric: tabular-nums; } .modal.flows .ttl i.near { color: var(--warn); }
.tree.docs .desc { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; color: var(--ink); font-weight: 500; } .tree.docs .desc .micon { font-size: 17px; color: var(--accent); } .tree.docs .desc.none { color: var(--dim); font-weight: 400; } .tree.docs .desc.none .micon { color: var(--dim); } .tree.docs .desc small { color: var(--dim); font-weight: 400; }
.modal.desc { width: min(760px, calc(100% - 32px)); } .modal.desc .head .t { display: grid; gap: 2px; } .modal.desc .head .t small { color: var(--dim); font-size: 12px; font-weight: 400; }
.modal.desc .body { display: grid; gap: 8px; } .modal.desc textarea { min-height: 52vh; font-size: 14px; line-height: 1.5; color: var(--ink); } .modal.desc .meta { font-size: 12px; }
/* the agent panel, right of the canvas: the conversation with its thinking and tool calls; a tab outside its left edge folds it */
.rpanel { position: relative; z-index: 4; min-height: 0; min-width: 0; display: grid; grid-template-rows: auto 1fr; border-left: 1px solid var(--line); background: var(--card); }
.rpanel.folded { border-left: 0; }
.rpanefold { position: absolute; top: 50%; right: 100%; transform: translateY(-50%); width: 20px; height: 48px; padding: 0; border-radius: 8px 0 0 8px; border: 1px solid var(--line); border-right: 0; background: var(--card); color: var(--dim); display: grid; place-items: center; }
.rpanefold:hover { color: var(--ink); border-color: var(--accent); } .rpanefold .micon { font-size: 18px; }
.ap-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--dim); } .ap-head b { color: var(--ink); font-weight: 600; } .ap-head .micon { font-size: 17px; color: var(--accent); } .ap-head .grow { flex: 1; } .ap-head i { font-style: normal; }
.ap-list { overflow: auto; min-height: 0; padding: 12px 12px 40px; display: grid; gap: 12px; align-content: start; user-select: text; }
.ap-none { color: var(--dim); font-size: 12px; text-align: center; padding: 24px 12px; }
.ap-turn { display: grid; gap: 6px; font-size: 13px; } .ap-who { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 11.5px; } .ap-who .grow { flex: 1; } .ap-who i { font-style: normal; } .ap-who .micon { font-size: 15px; color: var(--accent); }
.ap-turn.you .ap-said { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-think { border-left: 2px solid var(--line); padding-left: 8px; color: var(--dim); font-size: 12px; } .ap-think summary { cursor: pointer; font-style: italic; } .ap-think div { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; max-height: 280px; overflow: auto; }
.ap-tool { display: flex; align-items: center; gap: 7px; font: 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--dim); padding: 3px 8px; border-radius: 6px; background: var(--bg); } .ap-tool .grow { flex: 1; }
.ap-tool .ap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; } .ap-tool.bad { color: var(--bad); } .ap-tool.bad .ap-dot { background: var(--bad); } .ap-tool.run .ap-dot { background: var(--warn); animation: spin 1s linear infinite; border-radius: 2px; }
.ap-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--dim); font-size: 12.5px; } .ap-text.final { color: var(--ink); font-size: 13px; }
.ap-err { color: var(--bad); font-size: 12px; } .ap-turn.failed .ap-who { color: var(--bad); }
.status { flex-wrap: wrap; justify-content: center; row-gap: 2px; } .status:has(.about) { border-radius: 18px; } .status .txt { flex: 0 4 auto; min-width: 24px; } .status .about { min-width: 0; max-width: 300px; flex: 0 1 auto; } .status .about > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .status .about button { flex: none; }     /* the bar never wider than the dock: crowded, it wraps; the chip shortens its title */
