/* Callister Business v0.0.1 — C1 "pure WhatsApp" chat-first layout, clean light colours. Tokens from the C1 mockups
   (callister-business-mockups/shared.css + cv.css), made responsive. Self-hosted Inter (web/fonts, OFL). */
@font-face { font-family: Inter; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --navy: #0f2240; --navy-2: #173056; --accent: #3d7ab8; --accent-soft: #e8f1f8; --accent-mid: #c5d9ec;
  --bg: #f3f5f8; --card: #fff; --line: #e3e7ee; --line-2: #d5dbe4; --text: #152033; --text-2: #3d4a5c; --muted: #6b7688; --muted-2: #8b95a5;
  --success: #1b7a4a; --success-bg: #e7f6ee; --warning: #8a6410; --warning-bg: #fff6e0; --danger: #b42318; --danger-bg: #fdecea;
  --highlight: #fff3b0; --highlight-bd: #e6c86a; --radius: 12px; --shadow: 0 1px 2px rgba(15,34,64,.05), 0 8px 20px rgba(15,34,64,.06); --shadow-sm: 0 1px 2px rgba(15,34,64,.05);
  --header-h: 56px; --list-w: 330px; --drawer-w: 440px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; max-width: 100%; overflow: hidden; overflow-x: hidden; } html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
svg { display: block; }
.ico { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; flex: 0 0 15px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .err { color: var(--danger) !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== buttons ===== */
.btn, .primary, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.primary { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.primary:hover { background: var(--navy-2); } .primary:disabled, .ghost:disabled { opacity: .55; cursor: default; }
.ghost { background: #fff; color: var(--text); border: 1px solid var(--line-2); }
.ghost:hover { background: var(--bg); }
.sm { height: 28px; padding: 0 11px; font-size: 12px; }
.link { color: #245680; font-weight: 600; font-size: 12.5px; padding: 2px 4px; }
.link:hover { text-decoration: underline; }
.danger { color: var(--danger); }

/* ===== sign-in ===== */
.signin { position: fixed; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, #0f2240 0%, #1d3a66 60%, #2c5f8f 100%); padding: 20px; }
.signin .card { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 30px 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.signin .logo { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; margin-bottom: 18px; }
.signin h1 { font-size: 21px; font-weight: 650; color: var(--navy); letter-spacing: -.02em; }
.signin p { margin-top: 4px; }
.signin form { display: grid; gap: 12px; margin-top: 20px; }
.signin label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.signin .primary { height: 40px; font-size: 14px; }
.msg { min-height: 1.2em; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=email], input[type=search], input[type=date], input:not([type]), select, textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; background: #fff; font-size: 13.5px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,122,184,.15); }

/* ===== shell ===== */
.shell { height: var(--app-h, 100dvh); width: 100%; max-width: 100%; overflow: hidden; display: grid; grid-template-rows: var(--header-h) 1fr; margin-top: var(--app-off, 0px); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.hdr { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 18px 0 16px; position: relative; z-index: 6; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: 0 0 28px; }
.wordmark { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { font-weight: 600; } .wordmark span { font-weight: 400; color: rgba(255,255,255,.72); margin-left: 5px; }
.switcher { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 4px 9px; font-size: 12.5px; font-weight: 500; margin-left: 6px; max-width: 220px; }
.switcher span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .dot { width: 7px; height: 7px; border-radius: 50%; background: #7dcea0; box-shadow: 0 0 0 3px rgba(125,206,160,.18); flex: 0 0 7px; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.hdr-date { font-size: 12.5px; color: rgba(255,255,255,.68); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; position: relative; }
.icon-btn .ping { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #f0b429; border: 1.5px solid var(--navy); }
.hdr-back { display: none; color: #fff; }
.menu { position: absolute; right: 14px; top: 50px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; z-index: 20; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.menu .who b { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; text-align: left; color: var(--text-2); }
.menu button:hover { background: var(--bg); }
.main { min-height: 0; display: grid; grid-template-columns: var(--list-w) 1fr; overflow: hidden; }
.main.drawer-open { grid-template-columns: var(--list-w) 1fr var(--drawer-w); }

/* ===== avatars ===== */
.avatar { display: grid; place-items: center; border-radius: 50%; font-weight: 600; letter-spacing: .02em; color: #fff; flex: 0 0 auto; line-height: 1; user-select: none; position: relative; }
.avatar.md { width: 28px; height: 28px; font-size: 11px; } .avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.av-bot { background: var(--navy); border-radius: 8px; } .av-bot .ico-sm { color: #fff; }
.av-0 { background: #1a3a5c; } .av-1 { background: #3d7ab8; } .av-2 { background: #2a6a4f; } .av-3 { background: #8a5a3a; } .av-4 { background: #6b4c9a; } .av-5 { background: #4a7c8c; } .av-6 { background: #a0566c; } .av-7 { background: #5a6a7a; }
.hdr .avatar { cursor: pointer; }

/* ===== chat list ===== */
.list { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.list-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px; }
.list-h h2 { font-size: 17px; font-weight: 650; color: var(--navy); letter-spacing: -.02em; }
.list-h .ib { margin-left: auto; display: flex; gap: 6px; }
.ib-b { width: 30px; height: 30px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; color: var(--text-2); }
.ib-b:hover { background: var(--accent-soft); color: var(--navy); }
#searchBtn { display: none; }
.search { margin: 0 14px 8px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--muted-2); }
.search input { border: 0 !important; background: transparent; padding: 8px 0; box-shadow: none !important; font-size: 12.5px; }
.pills { display: flex; gap: 6px; padding: 2px 14px 8px; }
.pl { height: 26px; padding: 0 11px; border-radius: 13px; background: var(--bg); color: var(--text-2); font-size: 12px; font-weight: 550; display: inline-flex; align-items: center; gap: 5px; }
.pl.on { background: var(--accent-soft); color: var(--navy); font-weight: 650; }
.pl .n { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 8px; padding: 0 5px; line-height: 15px; }
.scroll { overflow-y: auto; min-height: 0; flex: 1; padding-bottom: 12px; }
.grp-l { display: flex; align-items: center; gap: 6px; padding: 12px 16px 5px; font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sec-h { display: flex; width: 100%; align-items: center; gap: 6px; padding: 9px 16px 6px; font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); }
.sec-h .ico { width: 13px; height: 13px; transition: transform .15s; }
.sec-h[aria-expanded=false] .ico { transform: rotate(-90deg); }
.sec-h .cnt { margin-left: auto; font-size: 10.5px; font-weight: 700; background: var(--bg); color: var(--text-2); border-radius: 8px; padding: 0 6px; line-height: 16px; letter-spacing: 0; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; width: 100%; padding: 8px 14px; text-align: left; }
.row:hover { background: #f7f9fb; } .row.active { background: var(--accent-soft); }
.row .cn { font-size: 13.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.active .cn { color: var(--navy); }
.row .pv { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row .when { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.ub { min-width: 17px; height: 17px; border-radius: 9px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.row .avatar.md, .chan { width: 32px; height: 32px; }
.row .avatar.md { font-size: 11.5px; }
.chan { border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.c0 { background: #e8f1f8; color: #2c5f8f; } .c1 { background: #e8f4ee; color: #1b7a4a; } .c2 { background: #f3efe6; color: #8a6d2b; } .c3 { background: #f6ecef; color: #a0566c; } .c4 { background: #efe8f6; color: #6b4c9a; }
.ring { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 8.5px; font-weight: 700; color: var(--navy); position: relative; }
.ring::before { content: ""; position: absolute; inset: 3px; background: #fff; border-radius: 50%; }
.ring span { position: relative; }
.empty-l { padding: 6px 16px 8px; font-size: 12px; color: var(--muted-2); }

/* ===== thread ===== */
.pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.wall { background-color: #e8edf4; background-image: radial-gradient(rgba(15,34,64,.06) 1px, transparent 1px); background-size: 18px 18px; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; flex: 1; max-width: 100%; overflow: hidden; }
.thead { display: flex; align-items: center; gap: 11px; background: #fff; border-bottom: 1px solid var(--line); padding: 9px 18px; min-height: 56px; }
.thead .tn { font-size: 14px; font-weight: 650; color: var(--navy); letter-spacing: -.01em; }
.thead .ts { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thead .tright { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.thead .back { display: none; color: var(--text-2); }
.avs { display: flex; } .avs .avatar { box-shadow: 0 0 0 2px #fff; margin-left: -6px; width: 24px; height: 24px; font-size: 9px; }
.scroller { flex: 1; overflow-y: auto; min-height: 0; }
.msgs { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 12px; max-width: 980px; }
.day { align-self: center; font-size: 11.5px; color: var(--muted); background: rgba(243,245,248,.9); border-radius: 8px; padding: 2px 10px; margin: 4px 0; }
.m { display: flex; gap: 10px; align-items: flex-start; width: 100%; max-width: 100%; min-width: 0; }
.m.out { flex-direction: row-reverse; }
.m .gap { width: 28px; flex: 0 0 28px; }
.bub { background: #fff; border: 1px solid rgba(15,34,64,.08); border-radius: 4px 14px 14px 14px; padding: 9px 13px 10px; box-shadow: 0 1px 1px rgba(15,34,64,.06); font-size: 13.5px; line-height: 1.5; color: var(--text); max-width: min(620px, 100%); min-width: 0; overflow-wrap: anywhere; }
.bub p { margin: 0; white-space: pre-wrap; } .bub p + p { margin-top: 6px; }
.bub.out { background: #dcebf8; border-color: #c6dcef; border-radius: 14px 14px 4px 14px; color: var(--navy); font-weight: 500; max-width: min(460px, 100%); }
.bub.wide { max-width: min(760px, 100%); }
.bub .nm { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: #2c5f8f; margin-bottom: 2px; }
.bub .nm .tm { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--muted-2); padding-left: 14px; }
.bub .tmo { display: block; text-align: right; font-size: 10.5px; color: #6f8ba6; margin-top: 2px; font-weight: 400; }
.bot-tag { font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--navy); color: #fff; border-radius: 3px; padding: 0 4px; line-height: 14px; }
.mention { background: var(--accent-soft); color: #245680; border-radius: 5px; padding: 1px 5px; font-weight: 600; }
.ref { font-size: 10.5px; font-weight: 700; color: #245680; background: var(--accent-soft); border-radius: 4px; padding: 0 4px; margin: 0 1px; vertical-align: 1px; }
.thinking { display: inline-flex; gap: 4px; padding: 4px 2px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.qr { display: flex; gap: 8px; margin-left: 38px; flex-wrap: wrap; }
.qrb { height: 32px; padding: 0 14px; border-radius: 16px; background: #fff; border: 1px solid #b9d0e6; color: #245680; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-sm); }
.qrb:hover { background: var(--accent-soft); }
.acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
/* needs-you list inside a bubble */
.nrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eef1f5; }
.nrow:first-child { border-top: 0; }
.need-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 30px; background: var(--accent-soft); color: var(--accent); }
.need-ico .ico { width: 16px; height: 16px; }
.need-ico.bill { background: var(--warning-bg); color: var(--warning); } .need-ico.disp { background: #e8f4ee; color: var(--success); } .need-ico.task { background: #efe8f6; color: #6b4c9a; }
.nrow .mid { flex: 1; min-width: 0; }
.nrow .t { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.nrow .amt { font-size: 13px; font-weight: 650; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* answer tables + citations */
.tbl { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 12.5px; }
.tbl th { text-align: left; font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 8px; border-bottom: 1px solid #eef1f5; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; } .tbl .num { text-align: right; white-space: nowrap; }
.src { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.cites { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cite { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 7px; background: #fff; border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 600; color: var(--text-2); max-width: 260px; }
.cite span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cite .pg { color: var(--muted); font-weight: 400; }
.cite:hover, .cite.on { border-color: #9bbad6; background: var(--accent-soft); color: var(--navy); }
.cite .ico-sm { width: 13px; height: 13px; flex: 0 0 13px; }
/* propose/confirm card */
.prop { border: 1px solid #f1e3b8; background: #fffbf0; border-radius: 12px; padding: 12px 13px; margin-top: 8px; }
.prop .ph { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--navy); }
.prop .pb { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-top: 9px; font-size: 12.5px; color: var(--text-2); }
.prop .kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
.prop .kv dt { color: var(--muted); } .prop .kv dd { font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.prop .pf { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.prop .pf .note { margin-left: auto; font-size: 11.5px; color: var(--muted); font-style: italic; }
.prop.done { background: var(--success-bg); border-color: #bfe3cf; }
.notice-card { border: 1px solid var(--accent-mid); background: #f5f9fd; border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; font-size: 12.5px; color: var(--text-2); }
.notice-card .ico { color: var(--accent); margin-top: 1px; }
/* composer */
.composer-wrap { padding: 8px 18px 14px; position: relative; }
.composer { display: flex; align-items: flex-end; gap: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow-sm); }
.composer textarea { border: 0 !important; box-shadow: none !important; padding: 7px 0; resize: none; max-height: 140px; min-height: 22px; background: transparent; }
.composer .send { width: 34px; height: 34px; padding: 0; border-radius: 9px; flex: 0 0 34px; }
.mention-pop { position: absolute; bottom: 64px; left: 22px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; min-width: 220px; z-index: 5; }
.mention-pop button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: 7px; font-size: 13px; text-align: left; }
.mention-pop button:hover, .mention-pop button.on { background: var(--accent-soft); }
.mhover { display: none; margin-left: 4px; align-self: center; }
.m:hover .mhover { display: block; }
/* project */
.pbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 18px 12px; }
.pbar .top { display: flex; font-size: 12px; color: var(--text-2); gap: 8px; }
.pbar .top .nx { margin-left: auto; color: var(--muted); }
.track { height: 6px; border-radius: 3px; background: #e6ebf1; margin: 8px 0 10px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; overflow-x: auto; }
.step { position: relative; padding-top: 16px; font-size: 11px; color: var(--text-2); min-width: 80px; }
.step::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 2px; background: #d5dbe4; }
.step::after { content: ""; position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #c7cfda; box-sizing: border-box; }
.step.done::before { background: #2f9e62; } .step.done::after { background: #2f9e62; border-color: #2f9e62; }
.step.now::after { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,122,184,.2); }
.step b { display: block; font-weight: 600; color: var(--text); font-size: 11.5px; }
.step.later { color: var(--muted-2); } .step.later b { color: var(--muted); font-weight: 500; }
.chipline { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px 10px; }
.chipline .ico-sm { color: #2f9e62; width: 13px; height: 13px; }
/* empty */
.hello { margin: auto; text-align: center; padding: 40px 20px; color: var(--muted); }
.hello .av-bot { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px; }
.hello .av-bot .ico-sm { width: 24px; height: 24px; }
.hello h3 { color: var(--navy); font-size: 17px; font-weight: 650; margin-bottom: 4px; }

/* ===== drawer ===== */
.drawer { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.drawer .dh .t { font-size: 13.5px; font-weight: 650; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer .dh .s { font-size: 11.5px; color: var(--muted); }
.drawer .dh .x { margin-left: auto; }
.drawer .db { flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; background: #f0f2f5; padding: 16px; }
.page { position: relative; background: #fffcf7; border: 1px solid #e8e2d4; box-shadow: 0 6px 20px rgba(15,34,64,.10); margin: 0 auto; width: 100%; max-width: 100%; box-sizing: border-box; touch-action: pan-y pinch-zoom; }
.page + .page { margin-top: 16px; }
.page canvas { display: block; width: 100%; max-width: 100%; height: auto; touch-action: pan-y pinch-zoom; }
.page .hl { position: absolute; background: rgba(255,214,0,.30); border: 1.5px solid rgba(214,160,0,.9); border-radius: 3px; box-shadow: 0 0 0 4px rgba(255,214,0,.15); }
.page.schem { aspect-ratio: 1 / 1.414; }
.page.schem::before { content: ""; position: absolute; inset: 7% 9%; background: repeating-linear-gradient(#fffcf7 0 10px, #ece6d8 10px 11px); opacity: .9; }
.drawer .quote { margin-top: 12px; background: #fff; border-left: 3px solid var(--highlight-bd); padding: 8px 11px; font-size: 12.5px; color: var(--text-2); border-radius: 0 8px 8px 0; }
.drawer .dnote { margin-top: 8px; font-size: 11.5px; color: var(--muted); }

/* ===== panels (settings, files, needs, tasks) ===== */
.panel { flex: 1; overflow-y: auto; background: var(--bg); min-height: 0; }
.panel-in { max-width: 980px; margin: 0 auto; padding: 22px 26px 60px; }
.panel h1 { font-size: 20px; font-weight: 650; color: var(--navy); letter-spacing: -.02em; }
.panel h2 { font-size: 15px; font-weight: 650; color: var(--navy); margin-bottom: 4px; }
.panel h3 { font-size: 13px; font-weight: 650; color: var(--text); margin: 16px 0 6px; }
.panel .lead { color: var(--muted); font-size: 13px; margin: 3px 0 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 18px; overflow-x: auto; }
.tab { padding: 9px 12px; font-size: 13px; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--navy); font-weight: 650; border-bottom-color: var(--navy); }
.wiz { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: start; }
.wsteps { list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; position: sticky; top: 0; }
.wsteps button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; border-radius: 8px; font-size: 13px; color: var(--text-2); text-align: left; }
.wsteps button.on { background: var(--accent-soft); color: var(--navy); font-weight: 650; }
.wsteps .dotn { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--muted); flex: 0 0 20px; }
.wsteps .done .dotn { background: #2f9e62; border-color: #2f9e62; color: #fff; }
.wsteps .opt { margin-left: auto; font-size: 10.5px; color: var(--muted-2); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.formrow { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.formrow .msg { margin: 0 0 0 4px; }
.grid-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid-t th { text-align: left; font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid-t td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.grid-t tr:last-child td { border-bottom: 0; }
.grid-t td.c, .grid-t th.c { text-align: center; }
.grid-t input[type=text], .grid-t input:not([type]) { padding: 6px 8px; font-size: 13px; }
.tablewrap { overflow-x: auto; }
.state { display: inline-block; font-size: 11px; font-weight: 650; border-radius: 6px; padding: 2px 7px; background: var(--bg); color: var(--text-2); white-space: nowrap; }
.state.ok, .state.clean, .state.accepted, .state.active { background: var(--success-bg); color: var(--success); }
.state.pending, .state.warn { background: var(--warning-bg); color: var(--warning); }
.state.rejected, .state.bad, .state.revoked, .state.deactivated { background: var(--danger-bg); color: var(--danger); }
.ulist { list-style: none; }
.ulist > li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #eef1f5; flex-wrap: wrap; font-size: 13px; }
.ulist > li:first-child { border-top: 0; }
.ulist .grow { flex: 1; min-width: 160px; }
.ulist .t { font-weight: 600; color: var(--text); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; }
.checks legend { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.sw { display: inline-flex; align-items: center; gap: 8px; }
.dz { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 14px; background: #fbfcfe; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .v { font-size: 20px; font-weight: 650; color: var(--navy); }
.kpi .l { font-size: 11.5px; color: var(--muted); }
.linkbox { display: flex; gap: 8px; margin-top: 10px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(15,34,64,.35); display: grid; place-items: center; z-index: 30; padding: 16px; }
.sheet { background: #fff; border-radius: 16px; width: min(460px, 100%); max-height: 86vh; overflow: auto; padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.sheet h2 { font-size: 16px; font-weight: 650; color: var(--navy); margin-bottom: 12px; }
.sheet .plist { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.sheet .plist label, .sheet .plist button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; width: 100%; font-size: 13px; border-top: 1px solid #eef1f5; text-align: left; }
.sheet .plist > :first-child { border-top: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 13px; z-index: 40; box-shadow: var(--shadow); }

/* ===== phone ===== */
.tabbar, .fab { display: none; }
@media (max-width: 1180px) { .main.drawer-open { grid-template-columns: var(--list-w) 1fr; } .main.drawer-open .drawer { position: fixed; right: 0; top: var(--header-h); bottom: 0; width: min(var(--drawer-w), 92vw); z-index: 12; box-shadow: -10px 0 30px rgba(15,34,64,.15); } }
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .hdr { padding: 0 14px; gap: 10px; }
  .hdr-date, .hdr .icon-btn, .hdr .avatar { display: none; }
  .wordmark { font-size: 16.5px; } .logo { width: 32px; height: 32px; border-radius: 8px; }
  .switcher { margin-left: auto; font-size: 13px; padding: 5px 10px; min-width: 0; max-width: 52vw; flex-shrink: 1; } .hdr { overflow: hidden; } .hdr .brand { flex-shrink: 1; }
  .main, .main.drawer-open { grid-template-columns: 1fr; }
  .list { border-right: 0; padding-bottom: 66px; }
  .list-h { padding: 18px 16px 10px; } .list-h h2 { font-size: 25px; font-weight: 700; }
  .list-h .ib-b { width: 34px; height: 34px; } #newChatBtn { display: none; }
  .search { display: none; } .search.open { display: flex; } #searchBtn { display: inline-flex; }
  .pills { padding: 2px 16px 10px; } .pl { height: 30px; padding: 0 13px; font-size: 13px; border-radius: 15px; }
  .row { padding: 11px 16px; gap: 14px; } .row .cn { font-size: 15px; } .row .pv { font-size: 13.5px; } .row .when { font-size: 12px; }
  .row .avatar.md, .row .chan, .row .ring { width: 36px; height: 36px; }
  .grp-l, .sec-h { font-size: 11.5px; padding-left: 16px; }
  .pane { display: none; }
  body.in-thread .list { display: none; } body.in-thread .pane { display: flex; }
  body.in-thread .tabbar, body.in-thread .fab { display: none !important; }
  .thead .back { display: grid; }
  .thead .tright .avs { display: none; }
  .msgs { padding: 14px 12px 10px; } .bub { font-size: 14.5px; } .m .gap { display: none; }
  .qr { margin-left: 0; }
  .composer-wrap { padding: 8px 12px 12px; }
  .drawer, .main.drawer-open .drawer { position: fixed !important; top: var(--app-off, 0px) !important; left: 0 !important; right: 0 !important; bottom: auto !important; height: var(--app-h, 100dvh) !important; max-height: var(--app-h, 100dvh) !important; width: auto !important; z-index: 20; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: 0; }
  .drawer .db { flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: #fff; border-top: 1px solid var(--line); z-index: 8; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 550; color: var(--muted); position: relative; }
  .tabbar button.on { color: var(--navy); font-weight: 650; }
  .tabbar .ico { width: 21px; height: 21px; }
  .tabbar .rb { position: absolute; top: 6px; left: calc(50% + 4px); min-width: 17px; height: 17px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; box-sizing: content-box; }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: 84px; width: 52px; height: 52px; border-radius: 16px; background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(15,34,64,.3); z-index: 9; }
  .fab .ico { width: 24px; height: 24px; }
  body.in-panel .list { display: none; } body.in-panel .pane { display: flex; } body.in-panel .fab { display: none !important; }
  .panel-in { padding: 16px 14px 90px; }
  .wiz { grid-template-columns: 1fr; } .wsteps { position: static; display: flex; overflow-x: auto; gap: 4px; } .wsteps button { white-space: nowrap; }
  .fgrid { grid-template-columns: 1fr; }
  .pbar .steps { display: none; } .pbar .top .nx { display: none; }
}
/* "Here's what I learned" card (company understanding pass) */
.learned { border-left: 3px solid var(--accent, #1f6feb); padding: 2px 0 2px 12px; }
.learned .t { font-weight: 650; margin-bottom: 4px; }
.learned .obs { margin: 6px 0 10px; padding-left: 18px; }
.learned .obs li { margin: 3px 0; }
.learned .acts { display: flex; gap: 8px; justify-content: flex-end; }
.kgrp h3 { font-size: 13px; margin: 14px 0 4px; }

.ingest-hint { margin-top: 4px; padding: 6px 8px; border-radius: 6px; background: var(--warning-bg); color: var(--warning); }
/* guided setup checklist (guide.js), pinned at the top of the Company bot chat */
.guide { list-style: none; position: sticky; top: 0; z-index: 3; margin: 0 0 10px; }
.guide-in { background: #fff; border: 1px solid #b9d0e6; border-left: 3px solid var(--accent, #1f6feb); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.guide-in .t { font-weight: 650; margin-bottom: 6px; }
.guide-in p { margin: 4px 0; font-size: 13.5px; }
.guide-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 12px; color: var(--muted-2, #6f8ba6); counter-reset: gs; }
.guide-steps li { counter-increment: gs; }
.guide-steps li::before { content: counter(gs); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; margin-right: 5px; font-size: 11px; }
.guide-steps li.ok { color: #1d7a46; } .guide-steps li.ok::before { content: '✓'; background: #e3f4ea; border-color: #1d7a46; }
.guide-steps li.cur { color: #245680; font-weight: 650; } .guide-steps li.cur::before { background: #245680; color: #fff; border-color: #245680; }
.guide-bar { height: 4px; border-radius: 2px; background: #e6eef7; overflow: hidden; margin: 6px 0; }
.guide-bar i { display: block; height: 100%; width: 35%; background: #245680; animation: guidebar 1.4s ease-in-out infinite; }
@keyframes guidebar { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .guide-bar i { animation: none; width: 100%; opacity: .5; } }

/* =====================================================================================================
   SIEA restyle (Dec 2026): light, Grok Bot desktop–style chat. Sidebar of round-avatar chats, centred
   conversation column, dark-orange user pills, soft grey bot cards, slim rounded composer, source panel
   only on chip click. Overrides the C1 rules above; behaviour and ids are unchanged.
   ===================================================================================================== */
:root {
  --siea: #c8531a; --siea-2: #b04612; --siea-soft: #fbeee6;
  --ink: #1d1d1f; --ink-2: #3a3a3c; --grey: #6e6e73; --grey-2: #8e8e93;
  --side-bg: #f7f7f8; --hair: #ececee; --card-bot: #f2f2f3; --chip: #ffffff;
  --list-w: 280px; --drawer-w: 420px; --col: 720px;
  --accent: #c8531a; --accent-soft: #fbeee6; --navy: #1d1d1f; --navy-2: #000;
}
body { background: #fff; color: var(--ink); font-size: 14.5px; }
.shell { grid-template-rows: 1fr; }
:focus-visible { outline-color: var(--siea); }
.primary { background: var(--ink); border-color: var(--ink); border-radius: 999px; }
.primary:hover { background: #000; }
.ghost { border-radius: 999px; border-color: #dcdce0; }
.link { color: var(--siea-2); }
input:focus, select:focus, textarea:focus { border-color: #c7c7cc; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }

/* sign-in: light */
.signin { background: #f7f7f8; }
.signin .card { box-shadow: 0 10px 40px rgba(0,0,0,.08); border: 1px solid var(--hair); }
.signin .logo { background: var(--siea); border-radius: 50%; }
.signin h1 { color: var(--ink); }

/* ---------- sidebar ---------- */
.list { background: var(--side-bg); border-right: 1px solid var(--hair); }
.side-top { padding: 18px 14px 6px; display: flex; flex-direction: column; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--hair); box-shadow: 0 1px 2px rgba(0,0,0,.06);
  display: grid; place-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: var(--ink); flex: 0 0 34px; }
.switcher { background: none; border: 0; padding: 0; margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); max-width: none; min-width: 0; }
.switcher .dot { display: none; }
.side-top .ib { display: flex; gap: 2px; margin-left: -4px; }
.ib-b { width: 32px; height: 32px; border-radius: 50%; background: transparent; color: var(--ink-2); position: relative; }
.ib-b:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.ib-b .ico-sm { width: 17px; height: 17px; flex-basis: 17px; }
#searchBtn { display: grid; }
.ib-b .ping { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--siea); border: 1.5px solid var(--side-bg); }
.search { display: none; margin: 0 12px 8px; background: #fff; border: 1px solid var(--hair); border-radius: 999px; padding: 0 12px; }
.search.open { display: flex; }
.pills { padding: 0 12px 6px; gap: 4px; }
.pl { height: 26px; border-radius: 999px; background: transparent; color: var(--grey); font-weight: 550; }
.pl:hover { background: rgba(0,0,0,.04); }
.pl.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--hair); font-weight: 600; }
.pl .n { background: var(--siea); }
.scroll { padding: 2px 8px 10px; }
.grp-l, .sec-h { padding: 12px 10px 4px; font-size: 11px; letter-spacing: .02em; text-transform: none; font-weight: 600; color: var(--grey-2); }
.grp-l .ico-sm { display: none; }
.sec-h .cnt { background: transparent; color: var(--grey-2); }
.row { padding: 9px 10px; border-radius: 12px; gap: 12px; }
.row:hover { background: rgba(0,0,0,.035); }
.row.active { background: #e9e9eb; }
.row .cn, .row.active .cn { font-size: 14px; font-weight: 600; color: var(--ink); }
.row .pv { font-size: 12.5px; color: var(--grey); margin-top: 2px; }
.row .when { font-size: 11px; color: var(--grey-2); }
.ub { background: #2f7cf6; min-width: 8px; height: 8px; padding: 0; font-size: 0; border-radius: 50%; }
.row .avatar.md, .row .chan, .row .ring { width: 38px; height: 38px; flex: 0 0 38px; }
.row .avatar.md { font-size: 13px; }
.chan { border-radius: 50%; font-size: 17px; }
.empty-l { padding: 6px 10px 8px; }
.side-foot { position: relative; display: flex; align-items: center; gap: 6px; padding: 10px 12px 14px; border-top: 1px solid transparent; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 4px; border-radius: 12px; text-align: left; }
.me:hover { background: rgba(0,0,0,.04); }
.me .avatar.md { width: 32px; height: 32px; font-size: 12px; cursor: pointer; }
.me-t { display: flex; flex-direction: column; min-width: 0; }
.me-t b { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-t .hdr-date { font-size: 11px; color: var(--grey-2); }
.side-foot .menu { top: auto; bottom: 58px; left: 12px; right: auto; border-radius: 14px; border-color: var(--hair); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.menu button:hover { background: #f2f2f3; }

/* avatars: round, warm palette */
.avatar { border-radius: 50%; }
.av-bot { background: var(--siea); border-radius: 50%; }
.av-0 { background: #5b5bd6; } .av-1 { background: #2fa36b; } .av-2 { background: #e2468a; } .av-3 { background: #2f7cf6; }
.av-4 { background: #d9822b; } .av-5 { background: #8e5bd6; } .av-6 { background: #e04848; } .av-7 { background: #4a9aa8; }
.c0 { background: #e9e6fb; color: #5b5bd6; } .c1 { background: #e2f4ea; color: #2a8a5a; } .c2 { background: #fdeee2; color: #c0651d; } .c3 { background: #fbe6ef; color: #c43a78; } .c4 { background: #e3eefe; color: #2f6fd6; }

/* ---------- conversation ---------- */
.wall { background: #fff; background-image: none; }
.pane { background: #fff; }
.thead { position: relative; justify-content: center; background: transparent; border-bottom: 0; padding: 12px 18px 4px; min-height: 52px; }
.tpill { display: inline-flex; align-items: center; gap: 8px; max-width: min(60%, 420px); padding: 5px 14px 5px 6px; border-radius: 999px; background: #fff;
  border: 1px solid var(--hair); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.tpill .avatar, .tpill .chan { width: 22px !important; height: 22px !important; flex: 0 0 22px; font-size: 9px; }
.tpill .chan { font-size: 11px; }
.tpill .av-bot .ico-sm { width: 12px; height: 12px; flex-basis: 12px; }
.thead .tn { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thead .ts { display: none; }
.thead .tright { position: absolute; right: 18px; top: 12px; margin: 0; }
.thead .back { position: absolute; left: 10px; top: 12px; }
.org-chip { display: none; height: 30px; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hair); font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: #fff; }
.pbar { border-bottom: 0; max-width: var(--col); width: 100%; margin: 0 auto; border-radius: 14px; background: #f7f7f8; }
.msgs { max-width: calc(var(--col) + 48px); margin: 0 auto; padding: 18px 24px 16px; gap: 14px; width: 100%; }
.day { background: transparent; color: var(--grey-2); font-size: 11.5px; }
.m { gap: 10px; }
.m .gap { width: 0; flex-basis: 0; }
.m.out > .avatar, .pane[data-kind=bot] .m > .avatar, .pane[data-kind=bot] .m > .gap, .pane[data-kind=dm] .m > .avatar, .pane[data-kind=dm] .m > .gap { display: none; }
.pane[data-kind=group] .m .gap { width: 30px; flex-basis: 30px; }
.m > .avatar.md { width: 30px; height: 30px; margin-top: 2px; }
.bub { background: var(--card-bot); border: 0; box-shadow: none; border-radius: 20px; padding: 12px 16px; font-size: 14.5px; line-height: 1.55; color: var(--ink); max-width: min(560px, 100%); }
.bub.wide { max-width: 100%; }
.bub p + p { margin-top: 10px; }
.bub .nm { font-size: 12px; color: var(--grey); font-weight: 600; margin-bottom: 3px; }
.pane[data-kind=bot] .bub .nm { display: none; }
.bot-tag { background: #e3e3e6; color: var(--grey); }
.bub.out { background: var(--siea); color: #fff; font-weight: 500; border-radius: 20px; padding: 8px 15px; max-width: min(480px, 85%); }
.bub.out .tmo { display: none; }
.bub.out .mention { background: rgba(255,255,255,.2); color: #fff; }
.mention { background: var(--siea-soft); color: var(--siea-2); }
.ref { background: #e6e6e9; color: var(--grey); }
/* list items with their sources (the "what's important" digest) */
.bub .items { margin: 8px 0 4px; padding-left: 22px; display: grid; gap: 12px; }
.bub .items > li { padding-left: 4px; }
.bub .items .isrc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-missed { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: #e5242f; color: #fff; font-size: 12px; font-weight: 600; vertical-align: 1px; }
.cites { gap: 6px; margin-top: 10px; }
.cite { height: 26px; border-radius: 8px; background: var(--chip); border: 1px solid #e0e0e4; color: var(--ink-2); font-weight: 500; font-size: 12px; }
.cite.sm { height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; max-width: 240px; vertical-align: 1px; }
.cite .ico-sm { color: var(--grey-2); }
.cite:hover, .cite.on { background: #fff; border-color: var(--siea); color: var(--siea-2); }
.cite.on { background: var(--siea); border-color: var(--siea); color: #fff; }
.src { color: var(--grey-2); }
.tbl th { color: var(--grey-2); border-bottom-color: #e3e3e6; } .tbl td { border-bottom-color: #e8e8ea; }
.qr { margin-left: 0; gap: 6px; }
.qrb { height: 32px; border-radius: 999px; background: #fff; border: 1px solid #dcdce0; color: var(--ink-2); font-weight: 500; box-shadow: none; }
.qrb:hover { background: #f5f5f7; }
.nrow { border-top-color: #e6e6e9; } .nrow .amt { color: var(--ink); }
.need-ico { border-radius: 50%; }
.prop { border-radius: 16px; }
.prop .ph { color: var(--ink); }
.hello h3 { color: var(--ink); }
.hello .av-bot { border-radius: 50%; }
.thinking i { background: var(--grey-2); }
.chipline { border-radius: 999px; border-color: var(--hair); }
.learned { border-radius: 16px; }
.guide-in { border-color: var(--hair); border-left-color: var(--siea); border-radius: 16px; box-shadow: none; }

/* composer: slim rounded bar with + */
.composer-wrap { max-width: calc(var(--col) + 48px); width: 100%; margin: 0 auto; padding: 6px 24px 18px; }
.composer { align-items: center; gap: 6px; border-radius: 999px; border: 1px solid #e0e0e4; padding: 5px 5px 5px 6px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.composer textarea { padding: 6px 2px; font-size: 14.5px; min-height: 20px; }
.composer .add { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px; display: grid; place-items: center; color: var(--ink-2); background: #f2f2f3; }
.composer .add:hover { background: #e8e8ea; }
.composer .send { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px; background: var(--siea); border-color: var(--siea); }
.composer .send:hover { background: var(--siea-2); }
.notice-card { border-color: var(--hair); background: #f7f7f8; border-radius: 16px; }
.notice-card .ico { color: var(--siea); }
.mention-pop { border-radius: 14px; border-color: var(--hair); left: 30px; }
.mention-pop button:hover, .mention-pop button.on { background: #f2f2f3; }

/* ---------- source panel: a right-side panel, only after a chip is clicked ---------- */
.drawer { background: #fff; border-left: 1px solid var(--hair); }
.drawer .dh { padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--hair); }
.drawer .dh > .ico-sm { color: var(--grey-2); }
.drawer .dh .t { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.drawer .dh .s { color: var(--grey-2); }
.drawer .db { background: #f7f7f8; }
.page { border-radius: 10px; overflow: hidden; border-color: #e6e6e9; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.page .hl { background: rgba(255,205,60,.35); border-color: rgba(230,160,0,.9); }
.drawer .quote { border-left-color: #f2c94c; border-radius: 0 10px 10px 0; }
@keyframes drawer-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.main.drawer-open .drawer { animation: drawer-in .16s ease-out; }
@media (prefers-reduced-motion: reduce) { .main.drawer-open .drawer { animation: none; } }

/* panels (Settings, Files, Needs you, Tasks) sit on white too */
.panel { background: #fff; }
.panel h1, .panel h2, .sheet h2 { color: var(--ink); }
.card { border-color: var(--hair); border-radius: 16px; box-shadow: none; }
.tab.on { color: var(--ink); border-bottom-color: var(--siea); }
.wsteps { border-color: var(--hair); } .wsteps button.on { background: #f2f2f3; color: var(--ink); }
.kpi { border-color: var(--hair); border-radius: 14px; } .kpi .v { color: var(--ink); }
.toast { background: var(--ink); border-radius: 999px; }
.sheet { border-radius: 20px; } .sheet-bg { background: rgba(0,0,0,.25); }

@media (max-width: 1180px) {
  .main.drawer-open .drawer { top: 0; border-radius: 16px 0 0 16px; box-shadow: -12px 0 40px rgba(0,0,0,.12); }
}
/* ---------- phone: the sidebar collapses; a thread fills the screen ---------- */
@media (max-width: 760px) {
  .side-top { padding: 16px 16px 6px; flex-direction: row; align-items: center; justify-content: space-between; }
  .switcher { font-size: 22px; margin-left: 0; max-width: 60vw; }
  .side-top .ib { margin: 0; } #newChatBtn { display: none; }
  .side-foot { display: none; }
  .scroll { padding: 2px 8px 10px; }
  .row { padding: 10px 10px; } .row .cn { font-size: 15.5px; } .row .pv { font-size: 13.5px; }
  .row .avatar.md, .row .chan, .row .ring { width: 44px; height: 44px; flex-basis: 44px; }
  .pills { padding: 2px 16px 8px; }
  .thead { justify-content: flex-start; padding: 10px 12px 10px 52px; border-bottom: 1px solid var(--hair); min-height: 60px; }
  .thead .back { top: 50%; transform: translateY(-50%); left: 8px; width: 36px; height: 36px; }
  .tpill { border: 0; box-shadow: none; padding: 0; background: transparent; gap: 10px; max-width: calc(100% - 90px); }
  .tpill .avatar, .tpill .chan { width: 34px !important; height: 34px !important; flex-basis: 34px; font-size: 12px; }
  .tpill .av-bot .ico-sm { width: 16px; height: 16px; flex-basis: 16px; }
  .thead .tn { font-size: 17px; }
  .thead .tright { top: 50%; transform: translateY(-50%); right: 12px; }
  .org-chip { display: inline-flex; }
  .msgs { padding: 16px 14px 10px; }
  .bub { max-width: 88%; font-size: 15px; } .bub.wide { max-width: 100%; }
  .bub.out { font-size: 15px; }
  .composer-wrap { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
  .composer { padding: 6px 6px 6px 8px; }
  .main.drawer-open .drawer { top: var(--app-off, 0px) !important; left: 0 !important; right: 0 !important; bottom: auto !important; height: var(--app-h, 100dvh) !important; max-height: var(--app-h, 100dvh) !important; border-radius: 0; }
  .tabbar { border-top-color: var(--hair); } .tabbar button.on { color: var(--siea); }
  .tabbar .rb { background: var(--siea); }
  .fab { background: var(--siea); border-radius: 50%; box-shadow: 0 8px 20px rgba(200,83,26,.35); }
}
.composer .mic { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px; display: grid; place-items: center; color: var(--ink-2); }
.composer .mic:hover { background: #f2f2f3; } .composer .mic.on { background: var(--siea-soft); color: var(--siea); }
.bub .items { margin-bottom: 12px; }
.guide-steps li.cur { color: var(--ink); } .guide-steps li.cur::before { background: var(--siea); border-color: var(--siea); }
.guide-bar i { background: var(--siea); }

/* Setup checklist, SIEA restyle: scrolls with the chat (no longer sticky over the messages) and folds into a small note. */
.guide { position: static; margin: 0 0 6px; }
.guide-h { display: flex; align-items: flex-start; gap: 8px; } .guide-h .t { flex: 1; }
.guide-x { width: 26px; height: 26px; margin: -4px -6px 0 0; border-radius: 50%; color: var(--muted); font-size: 18px; line-height: 1; display: grid; place-items: center; }
.guide-x:hover { background: #f0f0f2; color: var(--text); }
.guide-note { display: none; align-items: center; gap: 8px; align-self: flex-start; font-size: 12.5px; color: var(--text-2); background: #f4f4f5; border-radius: 999px; padding: 4px 6px 4px 12px; width: fit-content; }
.guide-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--siea); flex: 0 0 6px; }
.guide-note .guide-show { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; color: var(--text); }
.guide.min .guide-in { display: none; } .guide.min .guide-note { display: inline-flex; }

/* SIEA version label (sourced from window.BUSINESS.version / VERSION file) */
.siea-ver { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; white-space: nowrap; }
.side-foot .siea-ver { margin-left: 4px; padding: 0 4px 0 0; }
.signin .siea-ver { margin-top: 16px; text-align: center; }
.settings-ver { margin-top: 28px; }

/* Source panel: extracted text for mail / Google docs, and as a fallback when a PDF page cannot be drawn. */
.page-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.page-text .hl-text { background: var(--highlight); box-shadow: 0 0 0 2px var(--highlight-bd); border-radius: 2px; color: inherit; }

/* iPhone Safari: viewport, keyboard, no horizontal overflow */
html.kbd-open .composer-wrap { padding-bottom: 8px; }
html.kbd-open .drawer, html.kbd-open .drawer .db { overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y pinch-zoom; }
@media (max-width: 760px) {
  .pane, .thread, .scroller { min-width: 0; max-width: 100%; overflow-x: hidden; }
  .msgs { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; box-sizing: border-box; }
  .m { width: 100%; max-width: 100%; }
  .bub, .bub.out, .bub.wide { max-width: calc(100% - 52px); min-width: 0; }
  .thead { position: relative; overflow: hidden; min-width: 0; max-width: 100%; padding-right: max(12px, env(safe-area-inset-right)); }
  .thead .tright { max-width: 42%; min-width: 0; }
  .org-chip { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tpill { max-width: calc(100% - 7.5rem); min-width: 0; overflow: hidden; }
  .composer-wrap { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .composer { max-width: 100%; min-width: 0; }
  .composer textarea { min-width: 0; flex: 1 1 auto; }
}
