/* Proof. Helvetica, the 5:7 mark, flat surfaces, one accent. A messaging app for a team of agents. */
:root {
  --fg: #141414; --muted: #6b6b6b; --faint: #a3a3a3; --line: #ececea; --line2: #deddda;
  --bg: #ffffff; --side: #f8f7f5; --hover: #efeeea; --sel: #e7e9fe;
  --accent: #3355ff; --accent-soft: #e9edff;
  --them: #f0efec; --live: #22c55e; --idle: #b9b8b4; --bad: #d92d20; --bad-soft: #fdeceb;
  --seam: rgba(0,0,0,.08); --seam-lit: rgba(115,143,184,.9); --seam-held: rgb(92,122,171);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pop: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.12);
  --ease: cubic-bezier(.25,1,.5,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; font-synthesis: none; overscroll-behavior: none; }
#app { height: 100%; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: var(--fg); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.center { justify-content: center; } .row.end { justify-content: flex-end; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.err { color: var(--bad); font-size: 12.5px; margin-top: 8px; }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 14px; height: 14px; }
.icon.thick { stroke-width: 2.4; }
.icon.fill { fill: currentColor; stroke: none; }
.icon .f { fill: currentColor; stroke: none; }
.icon.obj { width: 16px; height: 16px; } /* the gear and the bin are drawings of things: a touch smaller, so they sit with the marks */
/* one quiet colour for every scrollbar */
* { scrollbar-width: thin; scrollbar-color: #d9d8d3 transparent; }
.mark { display: inline-block; width: 10px; height: 14px; background: var(--fg); flex: none; }
.mark.xl { width: 24px; height: 33.6px; }

/* buttons */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; white-space: nowrap; font-weight: 500; transition: background .12s, box-shadow .12s, opacity .12s; }
:where(body:not(.still)) .b:hover:not(:disabled) { background: var(--hover); }
.b:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.b:disabled { opacity: .4; }
.b.dark { background: var(--fg); color: #fff; border-color: var(--fg); }
:where(body:not(.still)) .b.dark:hover:not(:disabled) { background: #333; }
.b.ghost { border-color: transparent; background: transparent; color: var(--muted); }
:where(body:not(.still)) .b.ghost:hover:not(:disabled), .b.ghost.on { background: var(--hover); color: var(--fg); }
.b.sm { height: 28px; padding: 0 12px; font-size: 12.5px; }
.b.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
:where(body:not(.still)) .b.danger-fill:hover:not(:disabled) { background: #c0261b; }
.b.danger-fill:focus-visible { outline: none; box-shadow: none; } /* it starts focused so Enter confirms; already the obvious default, it needs no ring */
.b.danger-fill:disabled { opacity: .75; }
.b .icon { width: 16px; height: 16px; }
.iconbtn { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); flex: none; transition: background .12s, color .12s; }
:where(body:not(.still)) .iconbtn:hover { background: var(--hover); color: var(--fg); }
.iconbtn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.iconbtn.sm { width: 28px; height: 28px; }
.iconbtn.sm .icon { width: 15px; height: 15px; }
.iconbtn.mob { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); display: inline-block; flex: none; }
.dot.on { background: #2ea85a; }
.ok { width: 16px; height: 16px; border-radius: 50%; background: #2ea85a; color: #fff; display: grid; place-items: center; flex: none; }
.ok .icon { width: 10px; height: 10px; stroke-width: 3; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* layout */
.app { --sw: 320px; display: grid; grid-template-columns: var(--sw) 1fr; height: 100%; position: relative; }
.main { min-width: 0; height: 100%; overflow: hidden; }

/* Dot's seam: a 9px strip; the hairline grows about its centre to 5px and turns slate blue */
.seam { position: absolute; top: 0; bottom: 0; width: 9px; z-index: 20; cursor: col-resize; }
.seam-side { left: calc(var(--sw) - 4.5px); }
.seam-info { right: -4.5px; }
.seam::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: var(--seam); transition: left .12s, width .12s, background .12s; }
:where(body:not(.still)) .seam:hover::after, .seam.held::after { left: 2px; width: 5px; background: var(--seam-lit); }
.seam.held::after { background: var(--seam-held); }

@property --ft { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fb { syntax: '<length>'; inherits: false; initial-value: 0px; }
/* a fixed soft edge that content passes through; each scroller pads its ends so nothing rests in it */
.fades { --ft: 14px; --fb: 14px; --fade: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.06) calc(var(--ft) * .2), rgba(0,0,0,.25) calc(var(--ft) * .4), rgba(0,0,0,.55) calc(var(--ft) * .6), rgba(0,0,0,.82) calc(var(--ft) * .8), #000 var(--ft), #000 calc(100% - var(--fb)), rgba(0,0,0,.82) calc(100% - var(--fb) * .8), rgba(0,0,0,.55) calc(100% - var(--fb) * .6), rgba(0,0,0,.25) calc(100% - var(--fb) * .4), rgba(0,0,0,.06) calc(100% - var(--fb) * .2), transparent 100%); -webkit-mask: var(--fade) 0 0 / calc(100% - 8px) 100% no-repeat, linear-gradient(#000, #000) 100% 0 / 8px 100% no-repeat; mask: var(--fade) 0 0 / calc(100% - 8px) 100% no-repeat, linear-gradient(#000, #000) 100% 0 / 8px 100% no-repeat; }

/* sidebar */
.side { background: var(--side); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side-h { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px 0 18px; flex: none; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.search { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 0 11px; height: 34px; border-radius: 10px; background: #e8e7e2; color: #8f8e89; flex: none; transition: background .12s; }
.search:focus-within { background: #e3e2dd; }
.search .icon { width: 15px; height: 15px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.search input::placeholder { color: #8f8e89; }
.side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 8px 16px; }
.side-f { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px; flex: none; }
.side-f .warn { font-size: 12.5px; color: var(--accent); font-weight: 500; }
.side-empty { text-align: center; padding: 40px 10px; color: var(--faint); font-size: 13px; }

.pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; padding: 2px 0 10px; }
.pin { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 14px; font-size: 12px; color: var(--muted); min-width: 0; transition: background .12s; }
:where(body:not(.still)) .pin:hover { background: var(--hover); }
.pin.on { background: var(--sel); color: var(--fg); }
.pin > .ell { max-width: 100%; }
.pin-av { position: relative; }
.badge { position: absolute; top: -3px; left: -3px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--side); }

.rowwrap { position: relative; border-radius: 14px; overflow: hidden; }
a.row { display: flex; align-items: center; gap: 11px; padding: 10px 10px 10px 4px; border-radius: 14px; position: relative; z-index: 1; background: var(--side); transition: transform .32s var(--ease), background .12s; }
a.row.live { transition: background .12s; }
:where(body:not(.still)) a.row:hover { background: var(--hover); }
a.row.on { background: var(--sel); }
.rowwrap.moving a.row { background: var(--hover); }
.rowwrap.moving a.row.on { background: var(--sel); }
.swipe { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 8px; transition: opacity .2s, transform .2s var(--ease); }
.swipe.left { left: 10px; transform-origin: left center; }
.swipe.right { right: 8px; transform-origin: right center; }
.sw { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.sw .icon { width: 19px; height: 19px; }
.sw.blue { background: var(--accent); }
.sw.slate { background: var(--seam-lit); }
.sw.red { background: #ef5350; }
:where(body:not(.still)) .sw:hover { filter: brightness(.94); }
.udot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
a.row.unread .udot { background: var(--accent); }
.row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.l1 { display: flex; align-items: baseline; gap: 8px; }
.l1 b { flex: 1; font-weight: 600; }
.tm { font-size: 12px; color: var(--faint); flex: none; }
.l2 { color: var(--muted); font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
a.row.unread .l1 b { font-weight: 700; }
a.row.unread .l2 { color: var(--fg); }

/* narrow list: just the pictures, like Messages */
.app.compact .side-h { justify-content: center; padding: 0; }
.app.compact .side-f { justify-content: center; padding: 0; }
.app.compact .side-scroll { padding: 14px 0 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.crow { position: relative; display: grid; place-items: center; width: 68px; height: 68px; flex: none; border-radius: 16px; transition: background .12s; }
:where(body:not(.still)) .crow:hover { background: var(--hover); }
.crow.on { background: var(--sel); }
.crow .badge { top: 6px; left: 6px; }

/* avatars */
.av { --s: 40px; position: relative; width: var(--s); height: var(--s); flex: none; display: inline-block; vertical-align: middle; }
.face { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: block; width: 100%; height: 100%; object-fit: cover; }
.face svg { width: 100%; height: 100%; display: block; }
.face.mk { display: grid; place-items: center; }
.face.mk i { width: 25%; aspect-ratio: 5 / 7; display: block; }
.st { position: absolute; right: -1px; bottom: -1px; width: max(9px, calc(var(--s) * .27)); height: max(9px, calc(var(--s) * .27)); border-radius: 50%; background: var(--idle); border: max(2px, calc(var(--s) * .055)) solid var(--bg); transition: background .2s; }
.side .st { border-color: var(--side); }
a.row.on .st, .pin.on .st, .crow.on .st { border-color: var(--sel); }
:where(body:not(.still)) a.row:hover:not(.on) .st, :where(body:not(.still)) .pin:hover:not(.on) .st, :where(body:not(.still)) .crow:hover:not(.on) .st, .rowwrap.moving a.row:not(.on) .st { border-color: var(--hover); }
.st.on { background: var(--live); }
.av.grp .g1, .av.grp .g2 { position: absolute; width: var(--sub); height: var(--sub); }
.av.grp .g1 { top: 0; left: 0; }
.av.grp .g2 { right: 0; bottom: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.side .av.grp .g2 { box-shadow: 0 0 0 2px var(--side); }
a.row.on .av.grp .g2, .pin.on .av.grp .g2, .crow.on .av.grp .g2 { box-shadow: 0 0 0 2px var(--sel); }

/* home */
.home { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.home p { color: var(--muted); margin: 4px 0 6px; max-width: 380px; }

/* chat: the thread scrolls under a frosted header and a floating message box */
.chat { display: flex; height: 100%; min-width: 0; }
.col { --dock: 76px; --head: 70px; flex: 1; min-width: 0; position: relative; }
.ch { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 24px; flex: none; }
.ch.float { position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: auto; padding: 8px 24px 0; justify-content: center; pointer-events: none; }
.ch.float > * { pointer-events: auto; }
.ch.float .mob { position: absolute; left: 22px; top: 16px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; max-width: min(360px, 70%); padding: 6px 14px 6px; border-radius: 16px; transition: background .12s; }
:where(body:not(.still)) .who:hover .who-t .icon { color: var(--fg); transform: translateX(1px); }
.who .av { transition: transform .2s var(--ease); }
:where(body:not(.still)) .who:hover .av { transform: scale(1.04); }
.who:active .av { transform: scale(.97); }
.who-t { display: flex; align-items: center; gap: 1px; min-width: 0; max-width: 100%; padding-left: 13px; }
.who-t .icon { color: var(--faint); transition: color .15s, transform .2s var(--ease); }
.who > small { font-size: 11.5px; color: var(--muted); margin-top: -2px; max-width: 100%; }
.who-t b { font-size: 13px; font-weight: 600; }
.who > small.live { color: #16a34a; }
.who > small.bad { color: var(--bad); }
.info-top small { font-size: 12px; color: var(--muted); }
small.live { color: #16a34a; }
small.bad { color: var(--bad); }

.thread { position: absolute; inset: 0; overflow-y: auto; /* the content fades under the header and above the message box; the scrollbar strip doesn't */
  -webkit-mask: var(--thread-mask) 0 0 / calc(100% - 12px) 100% no-repeat, linear-gradient(#000, #000) 100% 0 / 12px 100% no-repeat; mask: var(--thread-mask) 0 0 / calc(100% - 12px) 100% no-repeat, linear-gradient(#000, #000) 100% 0 / 12px 100% no-repeat;
  --thread-mask: linear-gradient(to bottom, transparent 0, transparent calc(var(--head) + 2px), rgba(0,0,0,.25) calc(var(--head) + 12px), rgba(0,0,0,.7) calc(var(--head) + 24px), #000 calc(var(--head) + 34px), #000 calc(100% - var(--dock) - 26px), rgba(0,0,0,.7) calc(100% - var(--dock) - 16px), rgba(0,0,0,.25) calc(100% - var(--dock) - 4px), transparent calc(100% - var(--dock) + 8px)); }
.thread-in { min-height: 100%; padding: calc(var(--head) + 38px) 24px calc(var(--dock) + 30px); display: flex; flex-direction: column; }
.thread-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--muted); }
.thread-empty b { color: var(--fg); font-size: 17px; margin-top: 4px; }
.thread-empty span { max-width: 300px; font-size: 13px; text-wrap: balance; }
.sep-t { text-align: center; font-size: 11.5px; color: var(--faint); margin: 16px 0 8px; font-weight: 500; }
.note { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0; }

.msg { display: flex; align-items: flex-end; gap: 11px; margin-top: 2px; }
.msg.first { margin-top: 10px; }
.msg.last { margin-bottom: 2px; }
.msg.me { justify-content: flex-end; }
.msg-av { width: 28px; flex: none; }
.msg-c { display: flex; flex-direction: column; gap: 2px; max-width: min(620px, 72%); min-width: 0; }
.msg.me .msg-c { align-items: flex-end; }
.msg.them .msg-c { align-items: flex-start; }
.msg-n { font-size: 11.5px; color: var(--muted); margin: 0 12px 2px; }
.bub { position: relative; isolation: isolate; padding: 8px 13px; border-radius: 19px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; max-width: 100%; }
.msg.me .bub { background: var(--accent); color: #fff; }
.msg.them .bub { background: var(--them); }
/* the little wedge on the last bubble of a run */
.msg.last:not(.team) .bub::before, .msg.last:not(.team) .bub::after { content: ""; position: absolute; bottom: 0; height: 20px; z-index: -1; }
.msg.me.last .bub::before { right: -7px; width: 20px; background: var(--accent); border-bottom-left-radius: 16px 14px; }
.msg.me.last .bub::after { right: -10px; width: 10px; background: var(--bg); border-bottom-left-radius: 10px; }
.msg.them.last .bub::before { left: -7px; width: 20px; background: var(--them); border-bottom-right-radius: 16px 14px; }
.msg.them.last .bub::after { left: -10px; width: 10px; background: var(--bg); border-bottom-right-radius: 10px; }
.msg.team .bub { background: transparent; box-shadow: inset 0 0 0 1px var(--line2); color: var(--muted); font-size: 13px; }
.msg.team .msg-n { font-style: italic; }
.bub a { text-decoration: underline; text-underline-offset: 2px; }
.bub code { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 5px; }
.msg.me .bub code { background: rgba(255,255,255,.2); }
.bub pre { margin: 6px 0; padding: 10px 12px; background: rgba(0,0,0,.06); border-radius: 10px; overflow-x: auto; white-space: pre; }
.msg.me .bub pre { background: rgba(255,255,255,.14); }
.imgs { display: flex; flex-wrap: wrap; gap: 4px; }
.msg.me .imgs { justify-content: flex-end; }
.img { border-radius: 16px; overflow: hidden; display: block; background: var(--them); }
.img img { display: block; max-width: 300px; max-height: 300px; min-width: 60px; min-height: 60px; object-fit: cover; transition: filter .12s; }
:where(body:not(.still)) .img:hover img { filter: brightness(.95); }
.filecard { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line2); background: var(--bg); width: 300px; max-width: 100%; transition: background .12s; }
:where(body:not(.still)) .filecard:hover { background: var(--side); }
.fc-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ext { width: 38px; height: 44px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .02em; flex: none; }
.fc-t { display: flex; flex-direction: column; min-width: 0; }
.fc-t b { font-weight: 600; font-size: 13.5px; }
.fc-t small { color: var(--muted); font-size: 12px; }

/* message box: Dot's pill, + | text | send on one centre line, floating over a fade */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 18px 24px 18px; pointer-events: none; }
.dock > * { pointer-events: auto; }
.tobottom { position: absolute; left: 50%; bottom: calc(var(--dock) - 6px); z-index: 5; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: #fdfdfc; color: #444; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.06); opacity: 0; pointer-events: none; transition: opacity .15s; }
.tobottom.show { opacity: 1; pointer-events: auto; }
.tobottom .icon { transform: rotate(180deg); }
:where(body:not(.still)) .tobottom:hover { background: var(--side); }
.composer { max-width: 740px; margin: 0 auto; }
.pill { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; grid-template-areas: 'plus text send'; align-items: end; column-gap: 6px; border: 1px solid #e4e3df; border-radius: 22px; padding: 6px; background: #fdfdfc; box-shadow: 0 1px 3px rgba(0,0,0,.035); }
.pill.multi { grid-template-areas: 'text text text' 'plus . send'; row-gap: 6px; }
.pill textarea { grid-area: text; border: 0; outline: 0; resize: none; background: transparent; padding: 7px 4px; font-size: 15px; line-height: 20px; field-sizing: content; min-height: 34px; max-height: 240px; }
.pill.multi textarea { padding: 8px 10px 2px; }
.attach { grid-area: plus; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: #444; transition: background .12s, color .12s; }
:where(body:not(.still)) .attach:hover { background: var(--hover); color: var(--fg); }
.attach .icon, .send .icon, .tobottom .icon { width: 16px; height: 16px; stroke-width: 2; }
.send { grid-area: send; width: 34px; height: 34px; border-radius: 50%; background: var(--line2); color: #fff; display: grid; place-items: center; transition: background .15s, transform .1s; }
.send.on { background: var(--fg); }
:where(body:not(.still)) .send.on:hover { transform: scale(1.06); }
.pending { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.pf { position: relative; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 30px 0 6px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line2); background: #fff; max-width: 240px; font-size: 12.5px; }
.pf .ext { width: 32px; height: 38px; }
.pf.pic { padding: 0; width: 64px; height: 64px; overflow: hidden; }
.pf.pic img { width: 100%; height: 100%; object-fit: cover; }
.pf.up { opacity: .55; }
.pf .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(20,20,20,.75); color: #fff; display: grid; place-items: center; }
.pf .x .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.dropzone { position: absolute; inset: 8px; border: 2px dashed var(--accent); border-radius: 18px; background: rgba(255,255,255,.92); display: grid; place-items: center; font-weight: 600; color: var(--accent); pointer-events: none; z-index: 6; }

/* details panel */
.infowrap { --iw: 320px; position: relative; width: var(--iw); flex: none; height: 100%; overflow: hidden; }
.infowrap.settle { transition: width .24s var(--ease); }
.infowrap > .info { width: max(var(--iw), 280px); opacity: var(--io, 1); }
.infowrap.settle > .info { transition: opacity .24s var(--ease); }
.info { height: 100%; overflow-y: auto; position: relative; padding: 28px 20px 28px; }
.info .close { position: absolute; top: 14px; right: 14px; }
.info-top { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.av-edit { position: relative; display: block; width: 88px; height: 88px; border-radius: 50%; line-height: 0; }
.av-edit .veil { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.42); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 88px; text-align: center; opacity: 0; transition: opacity .15s; }
:where(body:not(.still)) .av-edit:hover .veil, .av-edit:focus-visible .veil { opacity: 1; }
.ename { font-size: 20px; font-weight: 700; padding: 2px 10px; border-radius: 10px; margin-top: 10px; max-width: 100%; overflow-wrap: anywhere; transition: background .12s; }
:where(body:not(.still)) .ename:hover { background: var(--hover); }
.ename-w { margin-top: 10px; }
.ename-in { font-size: 20px; font-weight: 700; text-align: center; border: 0; box-shadow: inset 0 0 0 1px var(--line2); border-radius: 10px; padding: 2px 10px; width: 220px; outline: 0; }
.ename-in:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.acts { display: flex; justify-content: center; gap: 8px; margin: 20px 0 6px; }
.acts button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; flex: 1; max-width: 80px; height: 62px; border-radius: 14px; background: var(--side); font-size: 11.5px; color: var(--muted); transition: background .12s, color .12s; }
:where(body:not(.still)) .acts button:hover { background: var(--hover); color: var(--fg); }
.acts button.on { background: var(--accent-soft); color: var(--accent); }
.info section { margin-top: 26px; }
.info h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mem { display: flex; align-items: center; gap: 4px; margin: 0 -8px; padding: 0 4px 0 0; border-radius: 12px; transition: background .12s; width: calc(100% + 16px); }
:where(body:not(.still)) .mem:hover { background: var(--side); }
.mem-l { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 8px; }
.mem .iconbtn { opacity: 0; transition: opacity .12s; }
:where(body:not(.still)) .mem:hover .iconbtn { opacity: 1; }
.mem.add { gap: 10px; padding: 6px 8px; color: var(--accent); font-weight: 500; }
.mem .plus { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }
.sched { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; font-size: 13px; }
.sched .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.sched small { display: block; color: var(--muted); font-size: 12px; }
.files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ft { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--side); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; transition: background .12s; }
:where(body:not(.still)) .ft:hover { background: var(--hover); }
.ft img { width: 100%; height: 100%; object-fit: cover; }
button.ft { padding: 0; }
.ft.doc span { font-size: 11px; font-weight: 700; color: var(--accent); }
.ft.doc small { font-size: 10.5px; color: var(--muted); max-width: 100%; }
.dangerbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; transition: background .12s; }
:where(body:not(.still)) .dangerbtn:hover { background: #fbdcd9; }
.dangerbtn .icon { width: 16px; height: 16px; }

/* sheets */
.scrim { position: fixed; inset: 0; background: rgba(20,20,20,.28); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.sheet { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--pop); display: flex; flex-direction: column; gap: 14px; animation: rise .2s var(--ease); }
.sheet.sm { max-width: 360px; }
.sheet h3 { margin: 0; font-size: 17px; text-align: center; }
.sheet p { margin: 0; text-align: center; }
.na-av { display: flex; justify-content: center; }
.na-name { font-size: 17px; font-weight: 600; text-align: center; border: 0; box-shadow: inset 0 0 0 1px var(--line2); border-radius: 12px; padding: 10px 12px; outline: 0; }
.na-name:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.picker { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.info .picker { margin-top: 12px; align-self: stretch; background: var(--side); border-radius: 16px; padding: 10px; }
.picker .grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; justify-items: center; container-type: inline-size; }
.picker .grid button { width: 100%; max-width: 52px; aspect-ratio: 1; height: auto; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .12s; }
.picker .grid button .av { display: block; }
:where(body:not(.still)) .picker .grid button:hover { box-shadow: inset 0 0 0 2px var(--line2); }
.picker .grid button.on { box-shadow: inset 0 0 0 2px var(--accent); }
.picker label { cursor: pointer; }
.picker .grid .av { --s: min(44px, calc((100cqi - 10px) / 6 - 8px)) !important; }

/* new chat */
.sheet.nc { max-width: 440px; gap: 12px; }
.search.big { margin: 0; height: 40px; border-radius: 12px; background: var(--side); color: var(--faint); }
.search.big:focus-within { background: var(--hover); }
.nc-list { display: flex; flex-direction: column; gap: 2px; height: min(380px, 52vh); overflow-y: auto; margin: -10px -8px; padding: 12px 8px; }
.nc-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 14px; text-align: left; transition: background .1s; }
.nc-row.hi { background: var(--side); }
.nc-row.picked { background: var(--accent-soft); }
.nc-row b { font-weight: 600; }
.nc-row small { display: block; color: var(--muted); font-size: 12px; }
.newav { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.check { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line2); display: grid; place-items: center; flex: none; transition: background .12s, box-shadow .12s; }
.nc-row.picked .check { background: var(--accent); box-shadow: none; color: #fff; }
.check .icon { width: 13px; height: 13px; }
.nc-none { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.nc-name { flex: 1; min-width: 0; height: 36px; border: 0; border-radius: 10px; padding: 0 12px; outline: 0; background: var(--side); margin-right: 4px; opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
.nc-name.show { opacity: 1; visibility: visible; }
.nc-name:focus { background: var(--hover); }
.sheet .row.end { margin-top: 2px; }

/* activity */
.sheet.tall { max-width: 620px; height: min(720px, 86vh); padding: 0; gap: 0; overflow: hidden; }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 20px; }
.sheet-h b { display: block; font-size: 15px; }
.sheet-h small { display: block; font-size: 12px; }
.sheet-b { flex: 1; overflow-y: auto; padding: 14px 20px 24px; overscroll-behavior: contain; }
.act-time { text-align: center; font-size: 11.5px; color: var(--faint); margin: 14px 0 6px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 10px; text-align: left; transition: background .1s; }
:where(body:not(.still)) .act-row:hover, .act-row.open { background: var(--side); }
.act-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--side); display: grid; place-items: center; color: var(--muted); flex: none; }
:where(body:not(.still)) .act-row:hover .act-ic, .act-row.open .act-ic { background: #fff; }
.act-ic .icon { width: 14px; height: 14px; }
.act-l { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; font-size: 13.5px; }
.act-l > span { flex: none; }
.act-l code { color: var(--muted); font-size: 12px; }
.act-d { margin: 4px 0 8px 36px; padding: 10px 12px; background: var(--side); border-radius: 10px; white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 260px; overflow: auto; }
.act-text { font-size: 13.5px; padding: 6px 0 6px 36px; white-space: pre-wrap; overflow-wrap: anywhere; }
.act-text.thought { color: var(--muted); font-style: italic; font-size: 13px; }
.act-text.bad { color: var(--bad); }
.act-text code { background: var(--side); padding: 1px 5px; border-radius: 5px; }
.act-empty { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }

/* popovers */
.dd { position: relative; display: inline-flex; }
.pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 200px; max-height: 360px; overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px rgba(0,0,0,.05), var(--pop); padding: 5px; animation: pop .12s var(--ease); }
.pop.up { top: auto; bottom: calc(100% + 6px); }
.pop.right { left: auto; right: 0; }
.pop.ctx { position: fixed; top: 0; min-width: 180px; }
.pop.float { position: fixed; z-index: 150; }
@keyframes pop { from { opacity: 0; transform: translateY(-3px); } }
.pop .it { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 9px; text-align: left; white-space: nowrap; font-size: 13.5px; }
.pop .it.hi, :where(body:not(.still)) .pop .it:hover:not(:disabled) { background: var(--hover); }
.pop .it:disabled { opacity: .4; }
.pop .it.danger { color: var(--bad); }
.pop .chk { width: 14px; display: grid; place-items: center; color: var(--fg); }
.pop .chk .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.pop .hint { margin-left: auto; padding-left: 14px; color: var(--faint); font-size: 12px; }
.pop .sec { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.pop .sep { height: 6px; }

.lightbox { position: fixed; inset: 0; background: rgba(15,15,15,.88); z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; animation: fade .15s; }
.lightbox img { max-width: 100%; max-height: calc(100% - 60px); object-fit: contain; border-radius: 8px; }
.lb-bar { display: flex; align-items: center; gap: 14px; color: #fff; max-width: 100%; }
.lb-bar .b { background: #fff; color: var(--fg); }

/* settings */
.pagewrap { position: relative; height: 100%; }
.pagewrap > .back { position: absolute; top: 14px; left: 16px; z-index: 2; }
.page { height: 100%; overflow-y: auto; }
.page-in { max-width: 780px; margin: 0 auto; padding: 28px 24px 60px; }
.page h1 { font-size: 22px; margin: 0; }
.page section { margin-top: 26px; }
.page h2 { font-size: 15px; margin: 0 0 4px; }
.page section > p { margin: 0 0 12px; font-size: 13px; }
.card { border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; background: var(--side); }
.plan .row { gap: 8px; }
.meter { height: 6px; border-radius: 3px; background: var(--line2); margin: 12px 0 10px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s var(--ease); }
.meter.full i { background: #e4572e; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-o { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line2); text-align: left; transition: background .12s, box-shadow .12s; }
.plan-o span { color: var(--muted); font-size: 13px; }
.plan-o small { color: var(--faint); font-size: 12px; }
.plan-o.on { box-shadow: inset 0 0 0 2px var(--accent); }
.plan-o:disabled:not(.on) { cursor: default; }
:where(body:not(.still)) .plan-o:not(:disabled):hover { background: var(--side); }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }
.conn-t { font-weight: 600; width: 72px; flex: none; }
.field { display: flex; gap: 8px; }
.field input { flex: 1; height: 34px; border: 0; box-shadow: inset 0 0 0 1px var(--line2); border-radius: 10px; padding: 0 11px; outline: 0; background: #fff; }
.field input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.codebig { font: 600 17px var(--mono); letter-spacing: .08em; color: var(--fg); }
.roles { margin: 0 -12px; }
.rh, .rr { display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr 1fr minmax(0, 1fr) 28px; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; }
.rh { font-size: 11.5px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.rr { transition: background .12s; }
:where(body:not(.still)) .rr:hover:not(.total) { background: var(--side); }
.rr .sel { margin-left: -10px; justify-self: start; }
.rr .del { opacity: 0; background: #ecebe7; color: var(--muted); width: 28px; height: 28px; transition: opacity .12s, color .12s, background .12s; }
:where(body:not(.still)) .rr:hover .del { opacity: 1; }
:where(body:not(.still)) .rr .del:hover { color: var(--bad); background: var(--bad-soft); }
.rn { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rr .ename { font-size: 14px; font-weight: 600; margin: 0; padding: 2px 6px; text-align: left; }
.rr .ename-w { margin: 0; }
.rr .ename-in { font-size: 14px; text-align: left; width: 160px; padding: 2px 6px; }
.rr.total { color: var(--muted); font-weight: 600; margin-top: 4px; }
.r { text-align: right; }
.spend { display: flex; flex-direction: column; align-items: flex-end; }
.spend small { color: var(--faint); font-size: 11.5px; }
.sel { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 10px; border-radius: 9px; transition: background .12s; }
:where(body:not(.still)) .sel:hover, .sel.on { background: var(--hover); }
.sel .icon { color: var(--faint); }

/* auth */
.auth { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; align-items: stretch; }
.auth .mark { align-self: center; }
.auth h3 { text-align: center; margin: 6px 0; }
.auth input { height: 40px; border: 0; box-shadow: inset 0 0 0 1px var(--line2); border-radius: 12px; padding: 0 13px; outline: 0; }
.auth input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }

/* phones: one pane at a time */
@media (max-width: 760px) {
  .app, .app.compact { grid-template-columns: 1fr; }
  .app.in .side { display: none; }
  .app:not(.in) .main { display: none; }
  .seam { display: none; }
  .iconbtn.mob { display: inline-grid; margin-left: -8px; }
  .ch { padding: 0 14px; }
  .infowrap { position: fixed; inset: 0; width: auto; background: #fff; z-index: 30; }
  .thread-in { padding-left: 14px; padding-right: 14px; }
  .dock { padding: 12px; }
  .rh, .rr { grid-template-columns: 1fr 1fr 28px; }
  .rh span:nth-child(n+3):not(:last-child), .rr > :nth-child(3), .rr > :nth-child(4) { display: none; }
}
