/* Tensor OS app shell and screens (app/*.html) */
body.app { height: 100vh; height: 100dvh; overflow: hidden; }
.shell { display: grid; grid-template-columns: 248px 1fr; height: 100%; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 16px 18px 4px; font-weight: 600; font-size: var(--fs-base); letter-spacing: -.01em; }
.side-brand .logo-mark { width: 24px; height: 24px; }
.side-brand span { color: var(--faint); font-weight: 500; }
.ws-switch { margin: 8px 10px 6px; padding: 8px; border-radius: 12px; display: flex; align-items: center; gap: 10px; width: calc(100% - 20px); text-align: left; position: relative; }
.ws-switch:hover { background: var(--panel-2); }
.ws-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.ws-switch b { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; }
.ws-switch small { color: var(--faint); font-size: var(--fs-xs); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-switch .ico { margin-left: auto; color: var(--faint); }
.side-search { margin: 4px 10px 8px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); color: var(--faint); font-size: var(--fs-sm); width: calc(100% - 20px); }
.side-search:hover { border-color: var(--line-2); color: var(--muted); }
.side-search .kbd { margin-left: auto; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.nav-group { font-size: 10.5px; letter-spacing: .12em; color: var(--faint); padding: 16px 10px 6px; font-weight: 500; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-size: var(--fs-sm); }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--text); color: var(--bg); font-weight: 500; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 2px 8px rgba(0,0,0,.25); }
.nav a.active .ico { color: var(--bg); }
.nav a.active .n { color: var(--bg); opacity: .6; }
.nav a .n { margin-left: auto; font-size: 11px; color: var(--faint); }
.nav a .n.hot { color: var(--accent-ink); background: var(--accent); padding: 0 6px; border-radius: 999px; font-weight: 600; }
.side-foot { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 4px; }
.me { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; }
.me b { display: block; font-size: var(--fs-sm); font-weight: 500; line-height: 1.2; }
.me small { color: var(--faint); font-size: var(--fs-xs); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-2); }
.topbar { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--faint); min-width: 0; }
.crumbs b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.role-pick { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: var(--fs-xs); color: var(--muted); }
.role-pick select { background: transparent; border: 0; outline: none; font-size: var(--fs-xs); color: var(--text); font-weight: 500; cursor: pointer; }
.role-pick select option { background: var(--panel); }
.burger { display: none; }
.content { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 8px 8px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.page { padding: 28px 28px 60px; max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.1; letter-spacing: -.025em; margin-top: 4px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.searchbox { position: relative; min-width: 220px; flex: 0 1 300px; }
.searchbox .ico { position: absolute; left: 11px; top: 11px; color: var(--faint); }
.searchbox .input { padding-left: 34px; height: 38px; border-radius: 999px; }

.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.kpi { padding: 16px 18px; }
.kpi .v { font-family: var(--font-serif); font-size: 36px; line-height: 1; margin-top: 8px; }
.kpi .l { color: var(--muted); font-size: var(--fs-sm); }
.kpi .d { font-size: var(--fs-xs); color: var(--faint); margin-top: 6px; }

.list { display: grid; }
.li { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li.clickable { cursor: pointer; }
.li.clickable:hover { background: var(--panel-2); }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); flex: none; }
.src-ic.gold { background: var(--accent-soft); color: var(--accent); }
.src-ic.blue { background: var(--blue-soft); color: var(--blue); }
.src-ic.green { background: var(--green-soft); color: var(--green); }
.src-ic.violet { background: var(--violet-soft); color: var(--violet); }
.src-ic.red { background: var(--red-soft); color: var(--red); }
.src-ic.amber { background: var(--amber-soft); color: var(--amber); }
.date-tile { width: 42px; flex: none; text-align: center; border-radius: 10px; border: 1px solid var(--line-2); padding: 4px 0; }
.date-tile small { display: block; font-size: 9.5px; letter-spacing: .1em; color: var(--red); font-weight: 600; text-transform: uppercase; }
.date-tile b { font-size: 16px; font-weight: 600; line-height: 1.1; }

/* greeting + quick ask */
.hello { font-family: var(--font-serif); font-size: clamp(34px, 4vw, 46px); line-height: 1.05; letter-spacing: -.015em; }
.ask-box { margin-top: 18px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); padding: 12px 12px 10px 16px; transition: border-color .15s; }
.ask-box:focus-within { border-color: var(--accent); }
.ask-box textarea { width: 100%; border: 0; outline: none; background: transparent; resize: none; min-height: 44px; font-size: var(--fs-md); line-height: 1.5; }
.ask-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ask-row .send { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.ask-row .send:hover { background: var(--accent); color: var(--accent-ink); }
.chip { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: var(--fs-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { color: var(--text); background: var(--panel-2); }
.chip.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* stage dots */
.stages { display: inline-flex; align-items: center; gap: 0; }
.stages i { width: 9px; height: 9px; border-radius: 50%; background: var(--panel-3); border: 1.5px solid var(--line-2); }
.stages i + i { margin-left: 14px; position: relative; }
.stages i + i::before { content: ""; position: absolute; right: 100%; top: 50%; width: 14px; height: 1.5px; background: var(--line-2); transform: translateY(-50%); }
.stages i.done { background: var(--green); border-color: var(--green); }
.stages i.cur { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sla { font-variant-numeric: tabular-nums; }

/* drawer + modal */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line-2); z-index: 90; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal { background: var(--bg-2) !important; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; z-index: 95; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.modal-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 27px; letter-spacing: -.02em; }
.modal-body { padding: 12px 20px 8px; }
.modal-foot { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: var(--fs-sm); }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
.timeline-v { display: grid; gap: 0; margin-top: 8px; }
.tv { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding-bottom: 16px; position: relative; font-size: var(--fs-sm); }
.tv::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1.5px; background: var(--line-2); }
.tv:last-child::before { display: none; }
.tv i { width: 13px; height: 13px; border-radius: 50%; margin-top: 3px; margin-left: 2px; background: var(--panel-3); border: 2px solid var(--line-2); }
.tv i.done { background: var(--green); border-color: var(--green); }
.tv i.cur { background: var(--accent); border-color: var(--accent); }
.tv .s { color: var(--faint); font-size: var(--fs-xs); }

/* command palette */
.cmdk { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); z-index: 100; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: none; }
.cmdk.open { display: block; }
.cmdk input { width: 100%; height: 54px; border: 0; outline: none; background: transparent; padding: 0 18px; font-size: var(--fs-md); border-bottom: 1px solid var(--line); }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cmdk-sec { font-size: 10.5px; letter-spacing: .1em; color: var(--faint); padding: 10px 12px 4px; }
.cmdk-item { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; font-size: var(--fs-sm); cursor: pointer; }
.cmdk-item .s { margin-left: auto; color: var(--faint); font-size: var(--fs-xs); }
.cmdk-item.sel { background: var(--panel-3); }

.toast-host { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; justify-items: center; width: calc(100vw - 32px); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: var(--fs-sm); display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); animation: toast .25s ease; max-width: 100%; }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }
.menu-pop { position: absolute; z-index: 70; min-width: 240px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; }
.menu-pop.open { display: block; }
.menu-pop button, .menu-pop a { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: var(--fs-sm); text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--panel-2); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 0; }

/* intelligence */
.intel { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: 100%; min-height: 0; }
.intel-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.intel-tabs { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread { flex: 1; overflow-y: auto; padding: 24px 20px; }
.thread-in { max-width: 760px; margin: 0 auto; display: grid; gap: 22px; }
.msg-q { justify-self: end; max-width: 78%; background: var(--panel-3); padding: 11px 15px; border-radius: 16px 16px 4px 16px; }
.msg-a { display: grid; gap: 12px; }
.msg-a .who { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.msg-a .body { line-height: 1.7; }
.msg-a .body p + p { margin-top: 10px; }
.msg-a .body ul { margin: 8px 0; padding-left: 20px; }
.read-trail { display: flex; gap: 6px; flex-wrap: wrap; }
.read-trail span { font-size: var(--fs-xs); color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; display: inline-flex; gap: 6px; align-items: center; }
.cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; font-size: 10.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; margin: 0 1px; cursor: pointer; border: 1px solid transparent; }
.cite:hover, .cite.on { border-color: var(--accent); }
.files { display: flex; gap: 8px; flex-wrap: wrap; }
.file-chip { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-size: var(--fs-sm); }
.file-chip:hover { border-color: var(--accent); }
.file-chip b { font-size: 10px; padding: 2px 5px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.file-chip b.x { background: var(--green-soft); color: var(--green); }
.file-chip b.p { background: var(--red-soft); color: var(--red); }
.approve { border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(170deg, var(--accent-soft), var(--panel) 70%); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.approve .row { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.composer { padding: 12px 20px 18px; }
.composer .ask-box { max-width: 760px; margin: 0 auto; }
.cites { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.cites-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cites-body { overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.cite-card { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; transition: border-color .15s; }
.cite-card.on { border-color: var(--accent); }
.cite-card blockquote { margin: 0; font-family: var(--font-serif); font-size: 17px; line-height: 1.35; }
.cite-card mark { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.cite-card .src { display: flex; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--faint); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.agent-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.toggle { width: 34px; height: 20px; border-radius: 99px; background: var(--panel-3); position: relative; flex: none; border: 1px solid var(--line-2); transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle.on { background: var(--accent); border-color: transparent; }
.toggle.on::after { transform: translateX(14px); background: var(--accent-ink); }

/* redline */
.redline { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px clamp(18px, 4vw, 56px); font-family: var(--font-serif); font-size: 18px; line-height: 1.6; }
.doc h2 { font-family: var(--font-serif); font-weight: 400; font-size: 26px; text-align: center; margin-bottom: 4px; }
.doc h4 { font-family: var(--font-sans); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; margin: 26px 0 8px; color: var(--muted); }
.doc p { margin: 0 0 12px; }
.chg { border-radius: 3px; padding: 0 1px; cursor: pointer; transition: background .15s, outline-color .15s; outline: 1.5px solid transparent; }
del.chg { background: var(--del); color: var(--red); text-decoration-thickness: 1.5px; }
ins.chg { background: var(--ins); color: var(--green); text-decoration: none; border-bottom: 1.5px solid var(--green); }
.chg.focus { outline-color: var(--accent); }
.chg.accepted-del { display: none; }
ins.chg.accepted-ins { background: transparent; color: inherit; border-bottom: 0; }
ins.chg.rejected-ins { display: none; }
del.chg.rejected-del { background: transparent; color: inherit; text-decoration: none; }
.flag-c { background: var(--amber-soft); border-bottom: 1.5px dashed var(--amber); cursor: pointer; }
.issue { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; cursor: pointer; }
.issue:last-child { border-bottom: 0; }
.issue:hover, .issue.focus { background: var(--panel-2); }
.issue .t { display: flex; justify-content: space-between; gap: 8px; align-items: start; font-weight: 500; font-size: var(--fs-sm); }
.issue p { font-size: var(--fs-xs); color: var(--muted); }
.issue .row { display: flex; gap: 6px; flex-wrap: wrap; }

/* esign */
.signers { display: grid; gap: 0; }
.signer { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.signer:last-child { border-bottom: 0; }
.signer .ord { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--panel-3); }
.signer .ord.done { background: var(--green); color: #06130c; }
.steps-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-bar span { flex: 1; height: 4px; border-radius: 99px; background: var(--panel-3); }
.steps-bar span.on { background: var(--accent); }

/* health */
.ring { --v: 82; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--panel-3) 0); flex: none; }
.ring > div { width: 108px; height: 108px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--font-serif); font-size: 40px; font-weight: 400; line-height: 1; }
.ring small { color: var(--faint); font-size: var(--fs-xs); }

/* cap table */
.own-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; }
.own-bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: var(--fs-xs); color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* integrations */
.int-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.int-card .top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.int-logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; flex: none; }
.code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre; color: var(--muted); }

/* todos */
.todo { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo .box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: transparent; }
.todo.done .box { background: var(--green); border-color: var(--green); color: #06130c; }
.todo.done .t { text-decoration: line-through; color: var(--faint); }
.todo .t { flex: 1; min-width: 0; font-size: var(--fs-sm); }

.empty { padding: 40px 20px; text-align: center; color: var(--faint); font-size: var(--fs-sm); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); font-size: var(--fs-sm); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 1100px) {
  .intel { grid-template-columns: 1fr; }
  .cites { display: none; position: fixed; inset: 56px 0 0 auto; width: min(380px, 100vw); z-index: 60; box-shadow: var(--shadow); }
  .cites.open { display: flex; }
  .redline { grid-template-columns: 1fr; }
  .g-main { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .content { margin: 0 8px 8px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 272px; z-index: 85; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .burger { display: inline-grid; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .role-pick .lbl { display: none; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 12px; gap: 6px; }
  .page { padding: 20px 16px 50px; }
  .page-head h1 { font-size: 30px; }
  .g-4 { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 28px; }
  .thread, .composer { padding-left: 12px; padding-right: 12px; }
  .msg-q { max-width: 90%; }
  .crumbs .ws-crumb { display: none; }
  .topbar .hide-sm { display: none; }
  .kv { grid-template-columns: 100px 1fr; }
  .searchbox { flex: 1 1 100%; }
}

/* data room: secondary nav + framed panel */
.content.dr-frame { background: transparent; border: 0; border-radius: 0; }
.dr { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 8px; height: 100%; min-height: 0; }
.dr.collapsed { grid-template-columns: minmax(0, 1fr); }
.dr.collapsed .dr-nav { display: none; }
.dr-nav, .dr-main { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; min-height: 0; }
.dr-nav { padding: 12px 10px; overflow-y: auto; }
.dr-nav-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 10px 8px; }
.dr-label { font-size: 11.5px; letter-spacing: .14em; color: var(--faint); font-weight: 500; }
.dr-nav .dr-label { display: block; padding: 18px 10px 8px; }
.dr-nav-head .dr-label { padding: 0; }
.dr-item { display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-size: var(--fs-sm); text-align: left; }
.dr-item:hover { background: var(--panel); color: var(--text); }
.dr-item.active { background: var(--panel-2); color: var(--text); }
.dr-item .n { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.dr-item .gd { width: 16px; height: 16px; flex: none; }
.dr-main { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.dr-tabs { display: flex; align-items: end; gap: 6px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); min-height: 46px; }
.dr-tab { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--panel); font-size: var(--fs-sm); font-weight: 500; margin-bottom: -1px; }
.dr-body { flex: 1; overflow-y: auto; padding: 26px 32px 40px; }
.dr-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; }
.dr-head h1 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.dr-head h1 .ico { width: 17px; height: 17px; color: var(--faint); }
.dr-head p { color: var(--muted); margin-top: 6px; font-size: var(--fs-sm); }
.btn-sq { border-radius: 9px; height: 40px; padding: 0 16px; }
.dr-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 26px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dr-search { position: relative; flex: 0 1 296px; min-width: 200px; }
.dr-search .ico { position: absolute; left: 13px; top: 12px; color: var(--faint); }
.dr-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); outline: none; }
.dr-search input:focus { border-color: var(--accent); }
.dr-ctrls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: relative; }
.dr-group { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); font-size: var(--fs-sm); color: var(--faint); }
.dr-group b { color: var(--text); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); padding: 3px; gap: 2px; }
.seg button { width: 34px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--faint); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); }
.rec-table { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; overflow-x: auto; }
.rec-table table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
.rec-table th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; padding: 0 16px; height: 38px; background: var(--panel); border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.rec-table th:first-child { padding-left: 42px; }
.rec-table th .ico { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; margin-left: 4px; opacity: .6; }
.rec-table td { padding: 0 16px; height: 42px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
.rec-table tr:last-child td { border-bottom: 0; }
.rec-table tbody tr { cursor: pointer; transition: background .15s; }
.rec-table tbody tr:hover { background: var(--panel); }
.rec-table tbody tr.filed { background: var(--green-soft); }
.rec-table td.nm { color: var(--text); }
.rec-table td.nm span.f { display: inline-flex; align-items: center; gap: 11px; }
.rec-table td.r, .rec-table th.r { text-align: right; }
.rec-table tr.grp td { height: 34px; background: var(--bg-2); color: var(--faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; cursor: default; }
.ftype { width: 16px; height: 18px; border-radius: 3px; display: inline-grid; place-items: center; font-size: 6.5px; font-weight: 700; color: #fff; flex: none; letter-spacing: 0; position: relative; }
.ftype.pdf { background: #e5484d; } .ftype.xlsx { background: #1f9d55; } .ftype.docx { background: #3b6fe0; } .ftype.other { background: #6c6f79; }
.reading { color: var(--amber); }
.rec-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rec-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; display: grid; gap: 10px; cursor: pointer; text-align: left; }
.rec-card:hover { border-color: var(--line-2); }
.rec-card .thumb { height: 92px; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; }
.rec-card .thumb .ftype { transform: scale(2); }
.rec-card b { font-weight: 500; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-card small { color: var(--faint); font-size: 12px; }
.dr-drop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); border: 2px dashed var(--accent); border-radius: 14px; display: none; place-items: center; z-index: 5; font-size: var(--fs-md); color: var(--accent); pointer-events: none; }
.dr-main.over .dr-drop { display: grid; }
.dr-toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: none; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: var(--fs-sm); white-space: nowrap; z-index: 6; max-width: calc(100% - 24px); }
.dr-toast.show { display: inline-flex; animation: toast .25s ease; }
.dr-toast .ok { width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #06130c; display: grid; place-items: center; flex: none; }
.dr-toast .ok .ico { width: 12px; height: 12px; stroke-width: 2.6; }
@media (max-width: 860px) {
  .dr { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dr-nav { display: flex; gap: 4px; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .dr-nav::-webkit-scrollbar { display: none; }
  .dr-nav .dr-label, .dr-nav-head, .dr-nav .add { display: none; }
  .dr-item { width: auto; flex: none; white-space: nowrap; }
  .dr-body { padding: 20px 16px 40px; }
  .dr-search { flex: 1 1 100%; }
}

/* tasks: list rows with stage track */
.task-list { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.task-row { display: flex; align-items: center; gap: 24px; width: 100%; text-align: left; padding: 18px 24px; border-bottom: 1px solid var(--line); min-height: 70px; transition: background .15s; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: var(--panel-2); }
.task-row .tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.task-row .tx b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row .tx small { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sla-note.red { color: var(--red); } .sla-note.amber { color: var(--amber); }
.track { display: inline-flex; align-items: center; flex: none; }
.track i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.track b { width: 36px; height: 1.5px; margin: 0 6px; background: var(--line); }
.track.s0 i:nth-of-type(1), .track.s1 i:nth-of-type(-n+2), .track.s2 i { background: var(--text); }
.track.s1 b:nth-of-type(1), .track.s2 b { background: var(--muted); }
.st { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); width: 104px; flex: none; }
.st i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.st1 i { background: var(--text); } .st2 i { background: var(--green); }
.req-modal { width: min(670px, calc(100vw - 32px)); }
.req-modal .textarea, .esc-modal .textarea { background: var(--panel); border-color: var(--line-2); font-size: 15px; padding: 14px 16px; min-height: 100px; }
.esc-modal .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.area-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.area-chips .chip { height: 34px; padding: 0 15px; font-size: 13.5px; }
.area-chips .chip.on { background: var(--panel-3); color: var(--text); border-color: var(--line-2); }
.attach { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 13.5px; cursor: pointer; padding: 0 14px; text-align: center; }
.attach:hover, .attach.over { border-color: var(--accent); color: var(--text); }
.attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .task-row { flex-wrap: wrap; gap: 10px 16px; padding: 16px; }
  .task-row .tx { flex: 1 1 100%; }
  .task-row .tx b, .task-row .tx small { white-space: normal; }
}

/* intelligence: toolbar, thread, grouped citations, composer */
.intel { grid-template-columns: minmax(0, 1fr) 350px; }
.intel.no-cites { grid-template-columns: minmax(0, 1fr); }
.intel.no-cites .cites { display: none; }
.ib-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.ib-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ib-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 13.5px; white-space: nowrap; }
.ib-btn:hover { background: var(--panel-2); }
.ib-btn.on { background: var(--panel-3); }
.ib-btn.icon { width: 34px; padding: 0; justify-content: center; border-color: transparent; background: transparent; color: var(--muted); }
.ib-btn .n { color: var(--faint); font-size: 12px; }
.ib-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--panel-3); margin-left: 4px; box-shadow: 0 0 0 3px var(--panel); }
.ib-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.thread-in { max-width: 780px; gap: 26px; }
.q-wrap { justify-self: end; display: grid; justify-items: end; gap: 6px; max-width: 80%; }
.msg-q { max-width: 100%; background: var(--panel-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-size: 16px; }
.ts { color: var(--faint); font-size: 12px; }
.msg-a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start; }
.ai-mark { width: 24px; height: 24px; margin-top: 2px; }
.a-col { display: grid; gap: 12px; min-width: 0; }
.msg-a .body { font-size: 16.5px; line-height: 1.75; }
.msg-a .body ul { padding-left: 22px; margin: 10px 0; }
.msg-a .body li { margin: 6px 0; }
.msg-a .body li::marker { color: var(--muted); }
.cite { background: var(--panel-3); color: var(--muted); border-radius: 5px; min-width: 20px; height: 22px; font-size: 12px; font-weight: 500; vertical-align: 2px; }
.cite:hover, .cite.on { border-color: var(--line-2); color: var(--text); background: var(--panel-3); }
.read-trail span { font-size: 11.5px; }
.cites { background: var(--bg); }
.cites-head { padding: 14px 16px; }
.cites-head b { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; font-size: 15px; }
.cites-body { padding: 6px 14px 20px; gap: 6px; }
.cg { display: grid; gap: 8px; padding-top: 10px; }
.cg-head { display: flex; gap: 8px; align-items: start; text-align: left; width: 100%; }
.cg-head > .ico { margin-top: 2px; color: var(--faint); transition: transform .15s; flex: none; }
.cg-head span { display: grid; min-width: 0; }
.cg-head b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-head small { color: var(--faint); font-size: 11.5px; }
.cg.closed .cg-items { display: none; }
.cg.closed .cg-head > .ico { transform: rotate(-90deg); }
.cg-items { display: grid; gap: 8px; }
.cite-card { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--panel); cursor: pointer; }
.cite-card .num { font-size: 13px; color: var(--muted); line-height: 1.55; }
.cite-card p { font-size: 13.5px; line-height: 1.6; }
.cite-card mark { background: transparent; color: inherit; padding: 0; }
.cite-card small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 8px; }
.composer { padding: 10px 20px 14px; }
.ib-compose { max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 8px 8px 8px 12px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); }
.ib-compose:focus-within { border-color: var(--muted); }
.ib-compose textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; font-size: 15.5px; line-height: 1.45; padding: 8px 8px; max-height: 160px; }
.ib-ic { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; flex: none; }
.ib-ic:hover { color: var(--text); background: var(--panel-2); }
.ib-model { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-size: 13px; flex: none; }
.ib-model:hover { background: var(--panel-2); }
.ib-model i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.ib-model .ico { width: 13px; height: 13px; }
.ib-send { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--text); flex: none; }
.ib-send:hover { background: var(--text); color: var(--bg); }
.ib-note { text-align: center; color: var(--faint); font-size: 12px; margin-top: 10px; }
@media (max-width: 1100px) {
  .intel, .intel.no-cites { grid-template-columns: minmax(0, 1fr); }
  .intel .cites { display: none; }
  .intel .cites.open { display: flex; position: fixed; top: 60px; right: 8px; bottom: 8px; width: min(370px, calc(100vw - 16px)); border: 1px solid var(--line-2); border-radius: 14px; z-index: 60; box-shadow: var(--shadow); }
}
@media (max-width: 600px) {
  .ib-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 10px 12px; }
  .ib-bar::-webkit-scrollbar { display: none; }
  .ib-group { flex-wrap: nowrap; }
  .ib-btn { padding: 0 10px; font-size: 12.5px; }
  .ib-compose textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ib-btn .lbl-hide { display: none; }
  .q-wrap { max-width: 92%; }
  .msg-a { grid-template-columns: 1fr; gap: 8px; }
  .msg-a .body { font-size: 15.5px; }
  .ib-model span { display: none; }
}

/* escalate modal */
.counsel-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.prio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.prio button { height: 38px; border-radius: 7px; color: var(--muted); font-size: 14px; }
.prio button:hover { color: var(--text); }
.prio button.on { background: var(--text); color: var(--bg); font-weight: 500; }
.esc-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.esc-check .ico { width: 13px; height: 13px; color: var(--muted); }

/* review clock mini bar, bell, rich tooltip */
.cmini { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cbar { width: 54px; height: 5px; border-radius: 99px; background: var(--panel-3); overflow: hidden; display: inline-block; flex: none; }
.cbar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.cmini.soon .cbar i { background: var(--amber); } .cmini.soon { color: var(--amber); }
.cmini.late .cbar i { background: var(--red); animation: pulse 1.2s infinite; } .cmini.late { color: var(--red); }
@keyframes pulse { 50% { opacity: .45; } }
.bell-btn { position: relative; }
.bell-n { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; }
.bell-pop { width: min(380px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 10px; }
.bell-row { display: flex !important; gap: 10px; align-items: start; padding: 9px 10px !important; }
.bell-row b { display: block; font-weight: 500; font-size: 13px; line-height: 1.35; }
.bell-row small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.bell-row small.cmini { display: flex; }
.rtip { position: fixed; z-index: 130; width: 290px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 12.5px; color: var(--muted); opacity: 0; pointer-events: none; transition: opacity .12s; }
.rtip.show { opacity: 1; }
.rtip b { color: var(--text); font-weight: 500; }
.rtip .row { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }

/* LegalConnect flows: tiles, confidence, brief workspace, stepper */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: grid; gap: 2px; transition: border-color .15s; }
.tile:hover { border-color: var(--line-2); }
.tile.on { border-color: var(--text); }
.tile .l { font-size: 12.5px; color: var(--muted); }
.tile .v { font-family: var(--font-serif); font-size: 30px; line-height: 1.1; }
.tile .d { font-size: 11.5px; color: var(--faint); }
.conf { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.conf .cbar { width: 40px; }
.conf.green .cbar i { background: var(--green); } .conf.amber .cbar i { background: var(--amber); } .conf.red .cbar i { background: var(--red); }
.bw-head { margin-bottom: 16px; }
.bw-top { display: flex; gap: 16px; align-items: start; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.bw-title { font-size: 32px; line-height: 1.15; }
.bw-meta { color: var(--muted); font-size: 12.5px; margin-top: 8px; line-height: 1.8; }
.btn.waiting { border: 1px dashed var(--line-2); color: var(--muted); cursor: not-allowed; opacity: 1; }
.stepper { display: flex; align-items: start; margin-top: 22px; padding: 16px 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow-x: auto; }
.stp { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 92px; font-size: 12.5px; color: var(--muted); text-align: center; position: relative; flex: none; outline: none; }
.stp > i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); font-style: normal; font-size: 12px; font-weight: 600; border: 1.5px solid var(--line-2); }
.stp > i .ico { width: 13px; height: 13px; stroke-width: 2.4; }
.stp.done > i { background: var(--green); border-color: var(--green); color: #06130c; }
.stp.now { color: var(--text); font-weight: 500; }
.stp.now > i { background: var(--text); border-color: var(--text); color: var(--bg); }
.stp.now.bad > i { background: var(--amber); border-color: var(--amber); color: #1a1205; }
.stp.skip > i { border-style: dashed; background: transparent; }
.turn { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.turn.soon { background: var(--amber-soft); color: var(--amber); } .turn.late { background: var(--red-soft); color: var(--red); }
.turn.wait { background: var(--panel-3); color: var(--muted); }
.stp-line { flex: 1; min-width: 70px; height: 6px; margin-top: 10px; border-radius: 99px; background: var(--panel-3); position: relative; outline: none; }
.stp-line b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--green); }
.stp-line.seg-late b { background: #f08c2c; }
.stp-line.seg-live b { background: var(--blue); } .stp-line.seg-live.soon b { background: var(--amber); } .stp-line.seg-live.late b { background: var(--red); animation: pulse 1.2s infinite; }
.stp-line.seg-skip { background: transparent; border-top: 2px dashed var(--line-2); height: 0; margin-top: 13px; border-radius: 0; }
.stp-line .knob { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--text); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--panel); }
.stp-line small { position: absolute; top: 12px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stp-line.seg-live.soon small { color: var(--amber); } .stp-line.seg-live.late small, .stp-line.seg-late small { color: var(--red); }
.stp-line.seg-skip small { top: 8px; }
.bw-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.bw-outline, .bw-side { position: sticky; top: 0; max-height: calc(100vh - 90px); overflow-y: auto; }
.ol-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 14px; font-size: 13px; }
.ol-item:hover { background: var(--panel-2); }
.ol-item .t { flex: 1; min-width: 0; }
.ol-item .n { font-size: 11px; color: var(--faint); }
.sd { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.sd.green { background: var(--green); } .sd.amber { background: var(--amber); } .sd.red { background: var(--red); }
.bw-legend { display: grid; gap: 4px; padding: 12px 14px; font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); margin-top: 8px; }
.bw-legend span { display: flex; gap: 8px; align-items: center; }
.bw-docbar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bw-docbar .seg button { height: 28px; font-size: 12.5px; }
.bw-doc { padding: 26px clamp(16px, 4vw, 48px) 40px; }
.paper { max-width: 720px; margin: 0 auto; font-family: var(--font-serif); font-size: 17px; line-height: 1.7; }
.bw-doc.hindi .paper { font-family: "Noto Serif Devanagari", var(--font-serif); }
.paper h2 { font-family: inherit; font-weight: 400; font-size: 28px; line-height: 1.2; text-align: center; margin: 8px 0 18px; letter-spacing: -.02em; }
.pmeta { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 12.5px; margin-bottom: 18px; }
.pmeta td { border: 1px solid var(--line); padding: 6px 10px; }
.pmeta td:nth-child(odd) { color: var(--faint); width: 22%; }
.psec { padding: 14px 0; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.psec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.psec-head h3 { font-family: inherit; font-weight: 500; font-size: 19px; }
.psec-tools { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.psec:hover .psec-tools, .psec:focus-within .psec-tools { opacity: 1; }
.sbody p + p { margin-top: 10px; }
.sbody ul, .sbody ol { padding-left: 22px; margin: 6px 0; }
.sbody[contenteditable="true"] { outline: 1px dashed var(--line-2); outline-offset: 6px; border-radius: 4px; }
.weak { display: flex; gap: 8px; align-items: start; font-family: var(--font-sans); font-size: 12.5px; color: var(--amber); margin-top: 8px; }
.gapbox { font-family: var(--font-sans); font-size: 13.5px; border: 1px dashed var(--red); background: var(--red-soft); border-radius: 10px; padding: 14px 16px; display: grid; gap: 8px; }
.gapbox b { display: flex; gap: 8px; align-items: center; color: var(--red); font-weight: 500; }
.gapbox ul { padding-left: 18px; margin: 0; color: var(--muted); }
.gapbox .row { display: flex; gap: 6px; flex-wrap: wrap; }
.md { white-space: pre-wrap; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.bw-sidebody { padding: 4px 16px 18px; }
.ring.warn { background: conic-gradient(var(--amber) calc(var(--v) * 1%), var(--panel-3) 0); }
.qi { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.qi b { font-weight: 500; font-size: 13px; } .qi span { color: var(--muted); } .qi a { color: var(--accent); font-size: 12px; }
.cmt { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; display: grid; gap: 4px; }
.cmt.resolved { opacity: .55; }
.cmt b { font-weight: 500; }
.cmt .pin { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--accent); }
.cmt .pin .ico { width: 12px; height: 12px; }
.cmt .row { display: flex; gap: 4px; }
.aibox { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); font-size: 13.5px; line-height: 1.6; }
.aibox .row { display: flex; gap: 6px; }
.warnbox { display: flex; gap: 8px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13px; margin-bottom: 14px; }
.optrow { display: flex; gap: 9px; align-items: center; font-size: 13.5px; padding: 6px 0; }
@media (max-width: 1200px) { .bw-grid { grid-template-columns: 210px minmax(0, 1fr); } .bw-side { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 860px) { .bw-grid { grid-template-columns: minmax(0, 1fr); } .bw-outline { position: static; max-height: none; } .bw-title { font-size: 26px; } }

/* templates, knowledge base, compliance timeline */
.tpl-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; align-items: start; }
.tpl-cards { display: grid; gap: 8px; }
.tpl-card { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px 16px; display: grid; gap: 4px; }
.tpl-card:hover { border-color: var(--line-2); }
.tpl-card.on { border-color: var(--text); }
.tpl-card b { font-weight: 500; }
.tpl-card .hi { font-family: "Noto Serif Devanagari", var(--font-serif); color: var(--muted); font-size: 13px; }
.tpl-card p { color: var(--muted); font-size: 12.5px; }
.tpl-card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tpl-card small { color: var(--faint); font-size: 11.5px; }
.tpl-pane { padding: 20px 22px; }
.tpl-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; flex-wrap: wrap; }
.tpl-paper { border: 1px solid var(--line); border-radius: 12px; padding: 26px clamp(14px, 3vw, 34px); max-width: none; }
.tpl-paper.hindi { font-family: "Noto Serif Devanagari", var(--font-serif); }
.ph { height: 8px; border-radius: 99px; background: var(--panel-3); margin-top: 8px; }
.spec { margin-bottom: 10px; }
.spec-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.spec-foot .faint { margin-right: auto; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 4px; border-radius: 99px; background: var(--panel-3); }
.pips i.on { background: var(--green); } .pips i.run { background: var(--blue); animation: pulse 1.2s infinite; } .pips i.bad { background: var(--red); }
.tree { font-size: 13px; display: grid; gap: 4px; }
.tree div { display: flex; gap: 6px; align-items: center; }
.tree .ico { width: 13px; height: 13px; color: var(--faint); }
.tl90 { position: relative; height: 46px; margin: 6px 6px 0; border-bottom: 2px solid var(--line-2); }
.tl90 i { position: absolute; bottom: -7px; width: 12px; height: 12px; border-radius: 50%; transform: translateX(-50%); background: var(--green); border: 2px solid var(--panel); }
.tl90 i.soon { background: var(--amber); } .tl90 i.dl { background: var(--blue); }
.tl90-axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--faint); white-space: nowrap; }
.tl90-axis span:first-child { transform: none; } .tl90-axis span:last-child { transform: translateX(-100%); }
.bw-side .tabs .tab { padding: 0 10px; font-size: 12.5px; }
@media (max-width: 1000px) { .tpl-grid { grid-template-columns: minmax(0, 1fr); } }

/* intelligence: LegalConnect answer flow */
.ib-modes { margin-left: 6px; }
.ib-modes button { width: auto; padding: 0 12px; font-size: 13px; height: 28px; white-space: nowrap; }
.ib-pickers, .ib-extra { max-width: 820px; margin: 0 auto 8px; }
.ib-pickers { display: flex; gap: 6px; flex-wrap: wrap; }
.pk { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 12px; color: var(--faint); }
.pk select { background: transparent; border: 0; outline: none; font-size: 12.5px; color: var(--text); max-width: 220px; }
.pk select option, .pk select optgroup { background: var(--panel); }
.ib-extra { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 14px; display: grid; gap: 6px; }
.finding { display: grid; grid-template-columns: 1fr 110px 34px; gap: 6px; align-items: center; }
.finding .input, .finding .select { height: 34px; }
.think { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 14px; font-size: 13px; }
.think ol { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.think li { color: var(--faint); padding-left: 22px; position: relative; }
.think li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.think li.run { color: var(--text); } .think li.run::before { border-color: var(--blue); background: var(--blue-soft); animation: pulse 1s infinite; }
.think li.done { color: var(--muted); } .think li.done::before { background: var(--green); border-color: var(--green); }
.pausebox { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 4px; }
.pausebox .row, .esc-card .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.a-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.a-head b { font-weight: 500; }
.a-head .faint { font-size: 12px; }
.why-btn { cursor: pointer; border: 0; }
.why { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); max-width: 420px; }
.medium-note { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13.5px; }
.esc-card { border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-soft); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; font-size: 13.5px; }
.esc-card > b { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--red); font-size: 14.5px; }
.similar { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); }
.brief-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.brief-card:hover { border-color: var(--text); }
.brief-card b { display: block; font-weight: 500; font-size: 14px; } .brief-card small { color: var(--faint); font-size: 12px; }
.msg-actions { align-items: center; }
@media (max-width: 600px) { .ib-modes button { padding: 0 8px; font-size: 12px; } .finding { grid-template-columns: 1fr 90px 30px; } .brief-card { flex-wrap: wrap; } }

/* home (reference layout): greeting, action cards over dusk skies, requests, spend dot matrix, recently, coming up */
.hm { padding-top: 34px; display: grid; gap: 22px; }
.hm-top { display: flex; justify-content: space-between; align-items: start; gap: 18px; flex-wrap: wrap; }
.hm-hello { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 5.6vw, 66px); line-height: 1.05; letter-spacing: -.03em; }
.hm-sum { color: var(--muted); font-size: 16.5px; margin-top: 12px; max-width: 78ch; }
.hm-sum b { color: var(--text); font-weight: 600; }
.hm-new { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 5px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); font-size: 14px; white-space: nowrap; }
.hm-new span { background: var(--text); color: var(--bg); padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.hm-new:hover { border-color: var(--muted); }
.hm-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.act { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); overflow: hidden; transition: border-color .15s, transform .15s; min-width: 0; }
.act:hover { border-color: var(--muted); }
.act-sky { height: 108px; margin: 6px 6px 0; border-radius: 11px; position: relative; overflow: hidden; display: flex; align-items: center; padding: 10px; isolation: isolate; }
.act-sky::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .25; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sky1 { background: radial-gradient(120% 70% at 30% 120%, #f08a4b 0%, #c2410c 18%, transparent 46%), linear-gradient(180deg, #1b2a4a 0%, #2a3d66 55%, #4a3b5c 100%); }
.sky2 { background: radial-gradient(90% 60% at 70% 115%, #ffb36b 0%, #e8590c 22%, transparent 50%), linear-gradient(180deg, #0f1730 0%, #24305a 60%, #5b3a4a 100%); }
.sky3 { background: radial-gradient(110% 70% at 50% 125%, #ff9a5a 0%, #d9480f 20%, transparent 48%), linear-gradient(180deg, #0c1a3a 0%, #1f3a78 55%, #47407a 100%); }
.sky4 { background: radial-gradient(100% 60% at 20% 120%, #f7b267 0%, #c05621 22%, transparent 50%), linear-gradient(180deg, #142036 0%, #2c3e5c 55%, #5c4a5a 100%); }
.sky5 { background: radial-gradient(120% 70% at 80% 120%, #ff8f5a 0%, #b4380f 22%, transparent 50%), linear-gradient(180deg, #101a33 0%, #263a66 60%, #523d5c 100%); }
.glass { width: 100%; display: grid; gap: 6px; padding: 9px 10px; border-radius: 10px; background: rgba(12,14,20,.62); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #eef0f4; font-size: 12.5px; }
.glass .ico { width: 14px; height: 14px; }
.glass-row { display: flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.glass-row .tag { margin-left: auto; font-size: 11px; color: rgba(238,240,244,.65); border: 1px solid rgba(255,255,255,.14); padding: 1px 7px; border-radius: 6px; font-weight: 400; }
.glass-row .ok { margin-left: auto; color: #51cf66; font-size: 10px; }
.glass-li { display: flex; align-items: center; gap: 8px; color: rgba(238,240,244,.78); white-space: nowrap; overflow: hidden; }
.glass-li i { width: 10px; height: 10px; border-radius: 50%; border: 1.3px dashed rgba(255,255,255,.4); flex: none; }
.glass-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.glass-seg b, .glass-seg span { text-align: center; padding: 5px 0; border-radius: 7px; border: 1px solid rgba(255,255,255,.18); font-weight: 500; }
.glass-seg b { border-color: #fff; } .glass-seg span { color: rgba(238,240,244,.7); }
.glass-ask { display: flex; align-items: center; gap: 6px; margin-left: 20%; padding: 4px 4px 4px 10px; border-radius: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.glass-ask input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font-size: 12.5px; }
.glass-ask input::placeholder { color: rgba(238,240,244,.6); }
.glass-ask button { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; flex: none; }
.glass-bar { display: grid; grid-template-columns: 1fr 70px; align-items: center; gap: 8px; color: rgba(238,240,244,.78); }
.glass-bar i { height: 5px; border-radius: 99px; background: rgba(255,255,255,.28); justify-self: end; }
.glass.mini { padding: 6px; gap: 5px; }
.glass.mini a { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.06); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glass.mini a:hover { background: rgba(255,255,255,.14); }
.act-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 13px 14px 15px; font-size: 15px; font-weight: 500; white-space: nowrap; text-align: left; width: 100%; }
.act-foot .go { margin-left: auto; color: var(--faint); }
.act:hover .act-foot .go { color: var(--text); }
.hm-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 22px; align-items: stretch; }
.hm-card { border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); padding: 22px 26px 24px; min-width: 0; display: flex; flex-direction: column; }
.hm-card > .hm-head { flex: none; }
.hm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hm-head h3 { font-size: 17px; font-weight: 500; }
.hm-ic { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); }
.hm-big { font-family: var(--font-serif); font-size: 28px; line-height: 1; }
.hm-amt { font-family: var(--font-serif); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.hm-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.hm-link:hover { color: var(--text); }
.hm-link .ico { width: 14px; height: 14px; }
.req-meter { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.req-bar { display: flex; gap: 3px; flex: 1 1 200px; height: 6px; max-width: 280px; }
.req-bar i { border-radius: 99px; min-width: 6px; }
.req-bar .p { background: var(--green); } .req-bar .r { background: var(--faint); } .req-bar .c { background: var(--text); }
.req-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.req-legend span { display: inline-flex; align-items: center; gap: 7px; }
.req-legend b { color: var(--text); font-weight: 500; }
.req-legend i { width: 6px; height: 6px; border-radius: 50%; }
.req-legend .p { background: var(--green); } .req-legend .r { background: var(--faint); } .req-legend .c { background: var(--text); }
.req-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.req-row .t { flex: 1; min-width: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-row:hover .t { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.ring-s { width: 24px; height: 24px; flex: none; transform: rotate(-90deg); }
.ring-s circle { fill: none; stroke: var(--line-2); stroke-width: 2.4; }
.ring-s .arc { stroke: var(--green); stroke-linecap: round; }
.ring-s.s0 .arc { stroke: var(--muted); } .ring-s.s2 .arc { stroke: var(--text); }
.req-row .st { width: auto; font-size: 13.5px; }
.req-row .st1 i { background: var(--green); }
.hm-more { display: inline-block; margin-top: auto; padding-top: 14px; font-size: 14px; }
.hm-range { margin-left: auto; }
.hm-range button { width: auto; padding: 0 13px; font-size: 13.5px; height: 32px; white-space: nowrap; }
.spend { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.sp-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--faint); padding: 2px 0 26px; text-align: right; font-variant-numeric: tabular-nums; }
.sp-plot { position: relative; padding-top: 36px; min-width: 0; }
.sp-cols { display: grid; gap: 3px; height: 150px; align-items: end; }
.sp-col { display: grid; grid-template-rows: repeat(8, 1fr); gap: 3px; height: 100%; padding: 0; justify-items: center; align-items: center; border-radius: 4px; }
.sp-col i { width: 100%; max-width: 9px; aspect-ratio: 1; border-radius: 50%; background: var(--panel-3); }
.sp-col i.on { background: color-mix(in srgb, var(--green) 78%, var(--panel)); }
.sp-col:hover i.on, .sp-col:focus-visible i.on, .sp-col.peak i.on { background: var(--green); }
.sp-col:focus-visible { outline: 1px solid var(--line-2); }
.sp-avg { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); pointer-events: none; margin-bottom: 26px; }
.sp-avg span { position: absolute; right: 0; top: -20px; font-size: 12px; color: var(--muted); background: var(--panel); padding: 0 4px; }
.sp-tip { position: absolute; top: 0; padding: 5px 10px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none; transition: left .12s, bottom .12s; }
.sp-x { display: grid; gap: 3px; height: 26px; align-items: end; font-size: 12px; color: var(--faint); }
.sp-x span { white-space: nowrap; }
.spend-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; font-size: 13.5px; }
.week { margin-left: auto; display: flex; gap: 9px; }
.week span { display: grid; gap: 3px; justify-items: center; }
.week i { width: 4px; height: 4px; border-radius: 50%; background: var(--panel-3); }
.week i.on { background: var(--green); }
.week b { font-size: 10px; color: var(--faint); font-weight: 500; margin-top: 2px; }
.rec { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); margin-top: 8px; }
.rec:hover { border-color: var(--line-2); }
.rec-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); flex: none; }
.rec-ic.soon { color: var(--amber); border-color: var(--amber); } .rec-ic.late { color: var(--red); border-color: var(--red); } .rec-ic.ok { color: var(--blue); border-color: var(--blue); }
.rec .tx { flex: 1; min-width: 0; display: grid; }
.rec .tx b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec .tx small { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec .when { font-size: 12.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec .when.soon { color: var(--amber); } .rec .when.late { color: var(--red); } .rec .when.ok { color: var(--blue); }
.hm-card.coming { padding: 0; overflow: hidden; }
.coming-sky { height: 150px; position: relative; display: grid; place-items: center; color: rgba(255,255,255,.55); background: radial-gradient(70% 90% at 50% 130%, #ff9a5a 0%, #b4380f 25%, transparent 55%), linear-gradient(180deg, #0e1a36 0%, #24386a 60%, #4c3e66 100%); }
.coming-sky .doc-art { width: 210px; height: auto; }
.coming-body { padding: 0 26px 22px; margin-top: -26px; position: relative; flex: 1; }
.coming-body::before { content: ""; position: absolute; inset: 0 12px auto; height: 26px; border-radius: 14px 14px 0 0; background: var(--panel); }
.coming-body > * { position: relative; }
.up { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.up .tx { flex: 1; min-width: 0; display: grid; }
.up .tx b { font-weight: 500; font-size: 15px; }
.up .tx small { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up .date-tile small { color: var(--muted); }
.pill { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.pill.soon { background: var(--amber-soft); color: var(--amber); } .pill.bad { background: var(--red-soft); color: var(--red); }
@media (max-width: 1180px) { .hm-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .hm-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .hm-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-card { padding: 18px 16px 20px; } .coming-body { padding: 0 16px 18px; } .hm-range { margin-left: 0; width: 100%; } .hm-range button { flex: 1; padding: 0 6px; } .sp-avg span { display: none; } }
@media (max-width: 440px) { .hm-actions { grid-template-columns: minmax(0, 1fr); } .act-sky { height: 96px; } .spend { grid-template-columns: 40px minmax(0, 1fr); } }

/* stacked columns side by side: the last card grows so both columns end on the same line */
.col-fill { display: flex; flex-direction: column; gap: 14px; }
.col-fill > .card:last-child { flex: 1; }
/* a side card that should end with its neighbour: takes the row's height and scrolls inside */
@media (min-width: 1101px) { .fit-row { contain: size; overflow-y: auto; } }

/* brand in the top bar, left of the breadcrumbs */
.top-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; flex: none; }
.top-brand .logo-mark { width: 22px; height: 22px; }
.top-brand em { font-style: normal; color: var(--faint); font-weight: 500; }
.top-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; flex: none; }
.ws-switch { margin-top: 12px; }
@media (max-width: 600px) { .top-brand span, .top-sep { display: none; } }

/* integrations: ask from wherever you work */
.ch { border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); padding: 24px 26px 26px; margin-bottom: 18px; display: grid; gap: 18px; }
.ch-head h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; margin-top: 6px; max-width: 30ch; }
.ch-head p.muted { margin-top: 6px; font-size: 15px; }
.ch-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-tab { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 9px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 14px; }
.ch-tab:hover { border-color: var(--muted); }
.ch-tab.on { border-color: var(--text); background: var(--panel-3); }
.ch-tab i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ch-tab i.on { background: var(--green); }
.ch-tile { display: inline-grid; place-items: center; border-radius: 7px; color: #fff; font-weight: 700; flex: none; letter-spacing: -.02em; }
.ch-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.ch-stage { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; place-items: center; min-height: 330px; }
.ch-side { display: grid; gap: 12px; align-content: start; padding: 4px 2px; }
.ch-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.ch-steps b { display: block; font-weight: 500; font-size: 13.5px; } .ch-steps span { color: var(--muted); }
.ch-steps li::marker { color: var(--faint); font-weight: 500; }
.mk { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; font-size: 13.5px; box-shadow: var(--shadow); }
.mk-bar { display: flex; gap: 10px; align-items: baseline; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.mk-bar b { font-weight: 600; } .mk-bar span { color: var(--faint); font-size: 12px; }
.mk-bar.center { justify-content: center; flex-direction: column; align-items: center; gap: 0; }
.mk-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.sl-msg { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 16px; }
.sl-msg .av { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; }
.sl-msg .logo-mark { width: 34px; height: 34px; padding: 5px; border-radius: 8px; background: var(--panel-3); }
.sl-msg b { font-weight: 600; } .sl-msg small { color: var(--faint); font-size: 11.5px; } .sl-msg p { margin-top: 2px; line-height: 1.5; }
.sl-msg .app { font-size: 10px; padding: 0 4px; border-radius: 3px; background: var(--panel-3); color: var(--muted); font-weight: 600; }
.sl-thread { margin: 0 16px 14px 60px; border-left: 2px solid var(--line-2); }
.sl-thread > p { padding: 0 12px; font-size: 12px; }
.sl-thread .sl-msg { padding: 8px 12px; }
.mk.phone { max-width: 340px; border-radius: 26px; }
.im { display: grid; gap: 6px; padding: 14px; }
.im p { max-width: 80%; padding: 8px 12px; border-radius: 18px; line-height: 1.4; font-size: 13.5px; }
.im-out { justify-self: end; background: #2f7bf6; color: #fff; border-bottom-right-radius: 5px; }
.im-in { justify-self: start; background: var(--panel-3); border-bottom-left-radius: 5px; }
.im-in.file { display: flex; gap: 8px; align-items: center; }
.im small { justify-self: end; font-size: 11px; }
.mail-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.mail-h > b { font-weight: 600; font-size: 15px; }
.kvm { display: grid; grid-template-columns: 44px 1fr; gap: 3px 10px; font-size: 12.5px; }
.kvm span:nth-child(odd) { color: var(--faint); }
.mail-b { padding: 14px 18px; display: grid; gap: 10px; line-height: 1.55; }
.mail-b blockquote { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid var(--line-2); color: var(--muted); font-size: 12.5px; }
.ai-b { padding: 16px; display: grid; gap: 10px; line-height: 1.6; }
.ai-q { justify-self: end; background: var(--panel-3); padding: 8px 14px; border-radius: 14px; max-width: 85%; }
.tool { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; justify-self: start; }
.tool .ico { width: 13px; height: 13px; }
.ch-src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ch-src .ch-tile { width: 18px; height: 18px; font-size: 8px; border-radius: 5px; }
@media (max-width: 900px) { .ch-body { grid-template-columns: minmax(0, 1fr); } .ch { padding: 18px 16px; } .ch-stage { padding: 12px; min-height: 0; } }
.ch-also { display: flex; gap: 6px 12px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--faint); }
.ch-also .ch-src:hover { color: var(--text); }
.sl-msg .av { background: linear-gradient(135deg, #f07c7c, #9a3434); }

/* intelligence, simplified: mode line, clean answer, one footer, hover actions */
.ib-bar { padding: 12px 16px 4px; }
.ib-modes button { height: 32px; padding: 0 14px; font-size: 13.5px; }
.mode-line { padding: 0 18px 8px; font-size: 13px; color: var(--muted); }
.mode-line b { color: var(--text); font-weight: 500; }
.a-head { gap: 10px; }
.a-head .faint { font-size: 12.5px; }
.a-work { display: grid; gap: 8px; justify-items: start; }
.a-work .brief-card { width: 100%; }
.approve.slim { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 12px; width: 100%; }
.approve.slim .grow { flex: 1; min-width: 200px; display: grid; }
.approve.slim b { font-size: 13.5px; font-weight: 500; }
.approve.slim small { font-size: 12px; }
.approve.slim .row { margin: 0; }
.a-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.why-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; }
.why-btn .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.a-foot .msg-actions { display: inline-flex; gap: 2px; opacity: .35; transition: opacity .15s; }
.msg-a:hover .a-foot .msg-actions, .a-foot .msg-actions:focus-within { opacity: 1; }
@media (hover: none) { .a-foot .msg-actions { opacity: 1; } }
.a-foot .icon-btn { width: 30px; height: 30px; font-size: 14px; }
.msg-a .suggest { margin-top: 0; }
.msg-a .suggest .chip .ico { width: 12px; height: 12px; }
.read-list { display: grid; gap: 4px; padding: 12px 2px 0; font-size: 12.5px; color: var(--muted); }
.read-list span { display: flex; gap: 7px; align-items: center; }
.read-list .ico { width: 12px; height: 12px; color: var(--green); }
.cites-body .similar { margin-top: 8px; }
.intro { text-align: center; padding: 30px 0 10px; }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; text-align: left; }
.mode-card { text-align: left; display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); font-size: 13px; color: var(--muted); }
.mode-card:hover { border-color: var(--muted); }
.mode-card.on { border-color: var(--text); background: var(--panel-2); }
.mode-card b { color: var(--text); font-size: 15px; font-weight: 500; }
.mode-card em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.mode-card small { color: var(--faint); font-size: 12px; margin-top: 2px; }
#tb-menu [data-view].on { background: var(--panel-3); }
@media (max-width: 700px) { .mode-cards { grid-template-columns: minmax(0, 1fr); } .mode-line { padding: 0 12px 8px; } .ib-bar { padding: 10px 12px 4px; } }
/* brief / eng pickers stay on one line; language sits in the toolbar */
.ib-pickers { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ib-pickers::-webkit-scrollbar { display: none; }
.ib-pickers .pk { flex: none; }
.lang-pk { height: 34px; border-radius: 8px; }
.lang-pk .ico { width: 14px; height: 14px; color: var(--faint); }

/* live logo: arms pulse outward one after another (a wave around the mark), the core breathes,
   a ripple leaves the core and fades before reaching the arms; hover speeds it up */
.tl-anim { --tl-speed: 2.8s; overflow: visible; flex: none; }
.tl-anim:hover, a:hover > .tl-anim { --tl-speed: 1.3s; }
.tl-anim .tl-arm, .tl-anim .tl-core, .tl-anim .tl-ripple { transform-box: view-box; transform-origin: 32px 32px; animation-duration: var(--tl-speed); animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.tl-anim .a-t { animation-name: tl-out-t; animation-delay: calc(var(--tl-speed) * 0); }
.tl-anim .a-r { animation-name: tl-out-r; animation-delay: calc(var(--tl-speed) * .25); }
.tl-anim .a-b { animation-name: tl-out-b; animation-delay: calc(var(--tl-speed) * .5); }
.tl-anim .a-l { animation-name: tl-out-l; animation-delay: calc(var(--tl-speed) * .75); }
.tl-anim .tl-core { animation-name: tl-breathe; }
.tl-anim .tl-ripple { animation-name: tl-ripple; opacity: 0; }
@keyframes tl-out-t { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 25% { transform: translateY(-4.5px); opacity: 1; } }
@keyframes tl-out-r { 0%, 60%, 100% { transform: translateX(0); opacity: .5; } 25% { transform: translateX(4.5px); opacity: 1; } }
@keyframes tl-out-b { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 25% { transform: translateY(4.5px); opacity: 1; } }
@keyframes tl-out-l { 0%, 60%, 100% { transform: translateX(0); opacity: .5; } 25% { transform: translateX(-4.5px); opacity: 1; } }
@keyframes tl-breathe { 0%, 100% { transform: scale(.86); } 50% { transform: scale(1.12); } }
/* r 8 → 14: the ripple fades out well before the arms (their inner caps sit at 20) */
@keyframes tl-ripple { 0% { transform: scale(1); opacity: .55; } 70% { opacity: 0; } 100% { transform: scale(1.75); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tl-anim .tl-arm, .tl-anim .tl-core, .tl-anim .tl-ripple { animation: none; } .tl-anim .tl-arm { opacity: 1; } }
.nav a .tl-anim { width: 17px; height: 17px; }
.nav a.active .tl-anim { --logo-ink: var(--bg); }
.intro-mark { width: 44px; height: 44px; margin: 0 auto 14px; display: block; }
/* sources panel: long document names must not push cards wider than the panel */
.cites-body > *, .cg, .cg-items, .cite-card, .cite-card > div, .cites-body .similar, .cites-body .li .grow { min-width: 0; }
.cite-card p { overflow-wrap: anywhere; }
/* brief / eng pickers: sources checklist and language preview */
.pk { cursor: pointer; }
.pk b { font-weight: 500; color: var(--text); font-size: 12.5px; }
.pk .ico { width: 13px; height: 13px; color: var(--faint); }
.pk.warn { border-color: var(--amber); } .pk.warn b { color: var(--amber); }
.pick-pop { width: min(380px, calc(100vw - 16px)); max-height: min(420px, 70vh); overflow-y: auto; padding: 6px; }
.pick-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 8px; font-size: 13px; }
.pick-head span { display: flex; gap: 2px; }
.pick-head span button { width: auto; padding: 3px 8px; font-size: 12px; color: var(--muted); }
.pick-row { display: flex; gap: 10px; align-items: start; padding: 8px; border-radius: 8px; cursor: pointer; }
.pick-row:hover { background: var(--panel-2); }
.pick-row input { margin-top: 3px; }
.pick-row b { display: block; font-weight: 500; font-size: 13px; }
.pick-row small { color: var(--faint); font-size: 11.5px; }
.pick-row em { font-style: normal; color: var(--green); }
.pick-foot { padding: 8px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line); margin-top: 4px; }
.pick-foot a { color: var(--accent); }
.lang-row { display: grid !important; gap: 2px; text-align: left; padding: 9px 10px !important; }
.lang-row b { font-weight: 500; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.lang-row b .ico { width: 12px; height: 12px; color: var(--green); }
.lang-row small { color: var(--faint); font-size: 12px; }
.lang-row small.hi { font-family: "Noto Serif Devanagari", var(--font-sans); }
.lang-row.on { background: var(--panel-2); }
.lang-row[disabled] { opacity: .5; cursor: not-allowed; }
.lang-pk b { font-size: 13px; }
.area-sel { height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-size: 12.5px; padding: 0 6px; max-width: 150px; flex: none; }
.ib-note .warnt, .warnt { color: var(--amber); }
@media (max-width: 600px) { .area-sel { max-width: 92px; } }

/* brief header: facts as a wrapped row of small items */
.bw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.bw-meta > span:not(.badge) { display: inline-flex; align-items: center; }
.bw-meta > span:not(.badge)::before { content: "·"; margin: 0 8px; color: var(--faint); }
.bw-meta > .badge { margin-right: 4px; }
.bw-meta > .badge + span::before { display: none; }
.stepper { gap: 0; padding: 18px 22px 26px; }
.stp-line { margin-left: 8px; margin-right: 8px; }
.bw-meta { gap: 6px; margin-top: 10px; }
.bw-meta > span:not(.badge) { height: 22px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: var(--panel); }
.bw-meta > span:not(.badge)::before { display: none; }
.bw-title { font-size: clamp(26px, 2.4vw, 32px); }
/* mode tabs appear only after the first use; until then the cards in the middle explain the modes */
.ib-modes.pre { visibility: hidden; }
.mode-line.pre { display: none; }
.mode-card.fly { position: fixed; z-index: 70; margin: 0; transform-origin: 0 0; pointer-events: none; box-shadow: var(--shadow); }
/* reset demo */
.reset-btn { height: 32px; gap: 6px; color: var(--muted); }
.reset-btn:hover { color: var(--text); }
.reset-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 600px) { .reset-btn span { display: none; } .reset-btn { width: 34px; padding: 0; } }

/* recent chats, profile menu, chats panel */
.recent-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { font-size: 11px; letter-spacing: 0; color: var(--faint); text-transform: none; }
.link-btn:hover { color: var(--text); }
.rc { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 12.5px; }
.rc:hover { background: var(--panel-2); color: var(--text); }
.rc .ico { width: 14px; height: 14px; color: var(--faint); }
.rc span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--faint); }
.rc-dot.green { background: var(--green); } .rc-dot.amber { background: var(--amber); } .rc-dot.red { background: var(--red); } .rc-dot.gold { background: var(--accent); }
.rc-empty { font-size: 12px; color: var(--faint); padding: 4px 10px; }
.me { width: 100%; border-radius: 10px; }
.me:hover { background: var(--panel-2); }
.me > .ico { margin-left: auto; color: var(--faint); flex: none; }
.me-menu { width: 260px; }
.me-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.me-head b { display: block; font-weight: 500; font-size: 13.5px; } .me-head small { color: var(--faint); font-size: 12px; }
.chat-row { display: flex; align-items: center; gap: 6px; border-radius: 10px; }
.chat-row:hover { background: var(--panel-2); }
.chat-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.chat-main .tx { flex: 1; min-width: 0; display: grid; }
.chat-main .tx b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main .tx small { color: var(--faint); font-size: 12px; }
.chat-acts { display: flex; opacity: 0; transition: opacity .15s; padding-right: 4px; }
.chat-row:hover .chat-acts, .chat-row:focus-within .chat-acts { opacity: 1; }
@media (hover: none) { .chat-acts { opacity: 1; } }
.chat-acts .icon-btn { width: 28px; height: 28px; }
.toast-undo { margin-left: 6px; font-weight: 600; text-decoration: underline; color: inherit; }
.bell-foot { display: flex !important; gap: 8px; align-items: center; justify-content: center; padding: 10px !important; margin-top: 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* sign in & registration */
body.auth { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px; color: #f2f1ec; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 60% at 30% 112%, #ff9a5a 0%, #c2410c 20%, transparent 50%), radial-gradient(60% 50% at 90% 10%, rgba(139,77,255,.35), transparent 60%), linear-gradient(180deg, #0b1430 0%, #1d2f5e 55%, #4a3b5c 100%); }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.auth-art { --logo-ink: #f4f2ec; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.auth-brand em { font-style: normal; opacity: .6; font-weight: 500; }
.auth-logo { width: 28px; height: 28px; }
.auth-pitch h1 { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.03em; }
.auth-pitch ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; max-width: 440px; }
.auth-pitch li { padding-left: 18px; position: relative; font-size: 14.5px; color: rgba(242,241,236,.78); line-height: 1.5; }
.auth-pitch li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #ffb36b; }
.auth-pitch li b { color: #fff; font-weight: 500; }
.auth-foot { font-size: 12px; color: rgba(242,241,236,.55); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card.in { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.auth-card h2 { font-family: var(--font-serif); font-weight: 400; font-size: 34px; letter-spacing: -.02em; line-height: 1.1; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.auth-card .sub b { color: var(--text); font-weight: 500; }
.auth-card .field label { font-size: 13px; }
.auth-card .input { height: 42px; background: var(--panel); }
.auth-card .input.bad { border-color: var(--red); }
.btn-block { width: 100%; height: 44px; border-radius: 10px; font-size: 14.5px; margin-top: 4px; }
.sso { display: grid; gap: 8px; }
.sso-btn { height: 44px; border-radius: 10px; font-size: 14px; gap: 10px; }
.sso-g { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px; background: var(--text); color: var(--bg); }
.sso-ms { display: grid; grid-template-columns: 7px 7px; gap: 2px; }
.sso-ms i { width: 7px; height: 7px; background: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pw { position: relative; }
.pw .input { padding-right: 42px; }
.pw-eye { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--faint); border-radius: 8px; }
.pw-eye:hover { color: var(--text); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 4px; align-items: center; margin-top: 6px; }
.meter i { height: 4px; border-radius: 99px; background: var(--panel-3); }
.meter span { font-size: 11.5px; color: var(--faint); min-width: 56px; text-align: right; }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--red); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--amber); }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--green); }
.meter[data-s="4"] i { background: var(--green); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 0 14px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 6px 0; }
.link { color: var(--accent); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.center { display: flex; justify-content: center; margin: 14px auto 0; }
.link .ico { width: 14px; height: 14px; }
.link:disabled { color: var(--faint); text-decoration: none; cursor: default; }
.switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 22px; }
.form-err { color: var(--red); font-size: 13px; margin: 4px 0 8px; }
.hint { color: var(--faint); font-size: 12px; text-align: center; margin-top: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--faint); margin-bottom: 18px; }
.back .ico { transform: rotate(180deg); width: 14px; height: 14px; }
.back:hover { color: var(--text); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp .input { height: 52px; text-align: center; font-size: 22px; font-family: var(--font-mono); padding: 0; }
.big-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.big-ic .ico { width: 24px; height: 24px; }
.steps-dots { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-dots i { width: 22px; height: 4px; border-radius: 99px; background: var(--panel-3); }
.steps-dots i.on { background: var(--text); }
.ws-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.ws-opt:hover { border-color: var(--text); }
.ws-opt span:nth-child(2) { flex: 1; display: grid; }
.ws-opt b { font-weight: 500; } .ws-opt small { color: var(--faint); font-size: 12.5px; }
.ws-opt > .ico { color: var(--faint); }
.ws-logo.new { background: var(--panel-3); color: var(--text); }
.connect { display: grid; gap: 2px; margin-bottom: 14px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-demo { width: min(400px, 100%); border-top: 1px solid var(--line); padding-top: 16px; }
.auth-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.role-chip { display: flex; gap: 8px; align-items: center; text-align: left; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.role-chip:hover { border-color: var(--line-2); background: var(--panel); }
.role-chip .avatar { width: 24px; height: 24px; font-size: 9.5px; }
.role-chip span:last-child { display: grid; min-width: 0; }
.role-chip b { font-weight: 500; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-chip small { color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-art { padding: 18px 20px; min-height: 0; }
  .auth-pitch, .auth-foot { display: none; }
  .auth-panel { justify-content: flex-start; padding: 28px 16px 40px; }
}
@media (max-width: 420px) { .auth-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .auth-card h2 { font-size: 28px; } }

/* ---------- My profile & account settings ---------- */
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-head { display: flex; gap: 18px; align-items: center; }
.pf-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line-2); }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-avatar .avatar { width: 100%; height: 100%; font-size: 26px; }
.pf-name { font-family: var(--font-serif); font-weight: 400; font-size: 24px; display: block; line-height: 1.2; }
.pf-save { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.pf-save > span { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; }
.input.bad { border-color: var(--red); }
.pf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-stats > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); }
.pf-stats b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.pf-stats span { font-size: 12px; color: var(--faint); }
.sig-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sig-font { border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px 8px; font-size: 26px; line-height: 1.2; background: var(--panel-2); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.sig-font small { display: block; font-family: var(--font-sans); font-style: normal; font-size: 11px; color: var(--faint); margin-top: 4px; }
.sig-font.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sig-pad { width: 100%; height: 150px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--panel-2); touch-action: none; cursor: crosshair; display: block; }
.sig-saved { height: 28px; vertical-align: middle; border-radius: 6px; background: var(--panel-2); padding: 0 4px; }
@media (max-width: 640px) { .sig-fonts { grid-template-columns: 1fr; } .pf-head { align-items: flex-start; } .pf-avatar { width: 60px; height: 60px; } }

.acc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.acc-nav { display: grid; gap: 2px; position: sticky; top: 12px; }
.acc-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: var(--fs-sm); }
.acc-nav a:hover { background: var(--panel-2); color: var(--text); }
.acc-nav a.on { background: var(--panel-3); color: var(--text); }
.acc-nav a.danger { color: var(--red); }
.acc-sec { scroll-margin-top: 16px; }
.acc-sec + .acc-sec { margin-top: 16px; }
.acc-row { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.acc-row:last-child { border-bottom: 0; }
.acc-row .grow { flex: 1; min-width: 0; }
.acc-row .t { font-weight: 500; font-size: var(--fs-sm); }
.acc-row .s { color: var(--faint); font-size: var(--fs-xs); margin-top: 2px; }
.nt { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.nt th { font-weight: 500; color: var(--faint); font-size: 12px; text-align: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.nt th:first-child, .nt td:first-child { text-align: left; padding-left: 18px; }
.nt td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.nt tr:last-child td { border-bottom: 0; }
.nt td small { display: block; color: var(--faint); font-size: 11.5px; }
.ck { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-2); display: inline-grid; place-items: center; background: var(--panel); color: transparent; }
.ck.on { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.ck .ico { width: 13px; height: 13px; }
.opt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.opt-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.opt-card b { display: block; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.opt-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.swatch { height: 34px; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--line); }
.danger-card { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.token { font-family: var(--font-mono); font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
@media (max-width: 860px) {
  .acc { grid-template-columns: 1fr; }
  .acc-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .acc-nav a { white-space: nowrap; }
  .opt-cards { grid-template-columns: 1fr; }
  .nt th, .nt td { padding-left: 3px; padding-right: 3px; }
  .acc-row { flex-wrap: wrap; }
}
[data-motion="reduce"] *, [data-motion="reduce"] *::before, [data-motion="reduce"] *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }

/* Integrations: brand marks and the clickable tiles that open a details modal */
.brand-ic { display: inline-grid; place-items: center; border-radius: 11px; flex: none; }
.int-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.int-tile { text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); display: grid; gap: 10px; transition: border-color .15s, transform .15s; cursor: pointer; color: inherit; font: inherit; }
.int-tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.int-tile.later { cursor: default; opacity: .62; }
.int-tile.later:hover { transform: none; border-color: var(--line); }
.int-tile .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.int-tile b { font-size: 14.5px; font-weight: 500; }
.int-tile p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.int-modal { width: min(620px, calc(100vw - 32px)); }
.int-modal .modal-head { gap: 12px; justify-content: flex-start; }
.int-modal .modal-head h2 { font-size: 24px; flex: 1; }
.int-addr { display: flex; gap: 8px; align-items: center; }
.int-addr code { flex: 1; min-width: 0; padding: 9px 12px; color: var(--text); white-space: normal; word-break: break-all; }

/* Data Room document reader */
.doc-view { position: fixed; inset: 20px; z-index: 96; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; opacity: 0; pointer-events: none; transform: scale(.985); transition: opacity .18s, transform .18s; }
.doc-view.open { opacity: 1; pointer-events: auto; transform: none; }
.doc-view .dv-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.doc-view .dv-title { flex: 1; min-width: 200px; }
.doc-view .dv-title h2 { font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.doc-view .dv-title p { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.doc-view .dv-body { flex: 1; min-height: 0; overflow: auto; background: var(--bg); }
.doc-view iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.doc-view .dv-text { max-width: 780px; margin: 0 auto; padding: 28px 24px 60px; font-family: var(--font-serif); font-size: 16px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-view .dv-page { font-family: var(--font-sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 28px 0 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.doc-view .dv-page:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.doc-view .dv-msg { display: grid; place-items: center; height: 100%; padding: 40px; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .doc-view { inset: 0; border-radius: 0; } }
.brand-ic .ico { width: 55%; height: 55%; }

/* Templates: Documents and Legal briefs tabs (app/documents.html, app/templates.html) */
.tpl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tpl-bar .tpl-actions { margin-left: auto; flex: none; }
.tpl-tabs button { white-space: nowrap; }
.tpl-bar > .tpl-tabs { flex: none; }
.tpl-actions, .tpl-actions > span { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-actions > span[hidden] { display: none; }
.tpl-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.tpl-tabs button { padding: 7px 14px; border-radius: 7px; font-size: 13.5px; color: var(--muted); }
.tpl-tabs button:hover { color: var(--text); }
.tpl-tabs button.on { background: var(--panel-3); color: var(--text); }
.tpl-filters { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; flex: 1 1 420px; min-width: 0; }
.tpl-filters[hidden] { display: none; }
.tpl-filters .dr-search { flex: 0 1 260px; min-width: 150px; }
.tpl-filters .tsel { flex: none; }
@media (max-width: 640px) { .tpl-filters { flex-wrap: wrap; } }
.tpl-actions .btn { white-space: nowrap; }
.tpl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: stretch; }
.tpl-tiles > .caps { grid-column: 1 / -1; margin: 10px 0 -4px; }
.tpl-tiles > .caps:first-child { margin-top: 0; }
.tpl-tiles .tpl-card { height: 100%; align-content: start; transition: border-color .15s, transform .15s; }
.tpl-tiles .tpl-card:hover { transform: translateY(-1px); }
.tpl-modal { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); }
.tpl-modal-body { padding: 26px 28px 28px; }
.tpl-modal .tpl-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
@media (max-width: 640px) { .tpl-modal-body { padding: 20px 16px; } }

/* Pagination (T.paginate in assets/app.js) */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 4px 4px; font-size: 13px; }
.pager .pg-btns { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); display: inline-grid; place-items: center; font-size: 13px; }
.pager button:hover:not(:disabled) { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.pager button.on { background: var(--text); color: var(--bg); border-color: transparent; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager button .ico { transform: rotate(180deg); }
.pager button.pg-next .ico { transform: none; }
.pager .pg-gap { color: var(--faint); padding: 0 4px; }
.tpl-modal-body > :first-child { padding-right: 44px; }

/* Tensor Intelligence: Ask / Brief dropdown inside the message box (themed by assets/select.js) */
.ib-compose .tsel.tsel-bare { flex: none; }
.ib-compose .tsel-bare .tsel-btn { height: 32px; padding: 0 24px 0 10px; border-radius: 8px; color: var(--text); font-size: 13px; }
.ib-compose .tsel-bare .tsel-btn:hover { background: var(--panel-2); }
.ib-compose .tsel-bare .tsel-chev { right: 6px; }
