/* ---------- FORMS, SCHEDULING, AUTOMATIONS, PORTAL, INBOX · continued ---------- */
/* INBOX: page head on the scrim, threads as Linear rows with unread dots, the conversation in the middle, channel details as the inspector */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration.active { display: grid; gap: 16px; align-content: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-head { margin: 4px 0 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-head-copy { display: flex; flex-direction: column; min-width: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-head-copy > h1 { order: 0; margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-head .inbox-summary { order: 1; display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 15px; font-weight: 500; color: var(--at-ink); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-summary::before { content: ""; flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--at-green-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--at-green-text) 18%, transparent); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-summary[data-state="waiting"]::before { background: var(--at-amber); box-shadow: 0 0 0 3px var(--at-amber-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-head-copy > h1 + p { order: 2; margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration > .tool-guidance { margin: -6px 0 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration > p[role="alert"] { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--at-rose-soft); color: var(--at-rose); font-size: 14px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(240px, 290px); gap: 16px; align-items: stretch; min-height: min(640px, calc(100dvh - 300px)); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration :is(.collaboration-library, .collaboration-thread, .collaboration-context) { box-sizing: border-box; min-width: 0; margin: 0 !important; align-self: stretch !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context { background: var(--at-pane); border: 1px solid var(--at-line); border-radius: var(--at-r-lg); box-shadow: var(--at-sheen), var(--at-shadow); color: var(--at-ink); }
/* threads */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout > .collaboration-library { display: flex !important; flex-direction: column; gap: 10px; padding: 6px 8px 12px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library > h2 { display: flex; align-items: center; min-height: 52px; margin: 0 !important; padding: 6px 12px 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-count { margin-inline-start: 6px; font-size: 13px; font-weight: 500; color: var(--at-ink-3); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-create { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px !important; margin: 0 4px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-create > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-create > label > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-create > .rt-btn-primary:not(:disabled) { width: auto !important; justify-self: end !important; padding-inline: 14px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout:has(.collaboration-compose) .collaboration-create > .rt-btn-primary:not(:disabled) { background: var(--at-fill-2) !important; border: 1px solid var(--at-line) !important; box-shadow: var(--at-sheen) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library > p { margin: 0; padding: 8px 12px; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library nav { display: flex !important; flex-direction: column; gap: 0 !important; margin: 4px 0 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library nav:empty { display: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "avatar name time" "avatar preview unread"; align-items: center; gap: 2px 12px; min-height: 64px; padding: 10px 12px; border-radius: 12px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread + .inbox-thread::before { content: ""; position: absolute; top: 0; inset-inline: 12px; height: 1px; background: var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread:hover { background: var(--at-hover); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread:is(:hover, [data-current="true"])::before, html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread:is(:hover, [data-current="true"]) + .inbox-thread::before { opacity: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread[data-current="true"] { background: var(--at-green-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--at-green-text) 26%, transparent); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread[data-current="true"]::after { content: ""; position: absolute; inset-block: 12px; inset-inline-start: 0; inline-size: 3px; border-radius: 3px; background: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-avatar { grid-area: avatar; display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 10px; background: var(--at-fill-2); box-shadow: inset 0 0 0 1px var(--at-line); color: var(--at-ink-2); font-size: 14px; font-weight: 600; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread[data-current="true"] .inbox-avatar { color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library nav .inbox-thread > button:not(:disabled) { grid-area: name; position: static; display: block; justify-self: stretch; min-height: 0 !important; min-width: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; color: var(--at-ink) !important; font-size: 14px; font-weight: 600 !important; line-height: 1.35; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library nav .inbox-thread > button::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library nav .inbox-thread > button:focus-visible { outline: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library nav .inbox-thread > button:focus-visible::after { outline: 2px solid var(--at-green-text); outline-offset: -2px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread-time { grid-area: time; font-size: 12px; color: var(--at-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-thread-preview { grid-area: preview; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-unread { grid-area: unread; justify-self: end; display: grid; place-items: center; min-inline-size: 20px; block-size: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--at-green); color: var(--at-green-ink); font-size: 12px; font-weight: 700; }
/* conversation */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout > .collaboration-thread { display: flex !important; flex-direction: column; gap: 10px !important; padding: 18px 20px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout > .collaboration-thread > h3 { margin: 0 !important; padding: 0 !important; border: 0 !important; font-family: var(--at-serif) !important; font-size: 28px !important; font-weight: 400 !important; line-height: 1.15 !important; letter-spacing: -.01em !important; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout > .collaboration-thread > h3 { font-family: var(--at-sans) !important; font-size: 20px !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > h3 + p { margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--at-line); font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > p:not(.inbox-convo-meta) { margin: 0; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > p.inbox-convo-empty { padding: 24px 0; font-size: 14px; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > p:last-child { margin-top: 2px; font-size: 12px; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > p:last-child { font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > article.collaboration-comment { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; inline-size: fit-content; max-inline-size: min(78%, 620px); min-height: 0; padding: 10px 14px !important; border-radius: 16px 16px 16px 6px !important; background: var(--at-fill-2) !important; box-shadow: inset 0 0 0 1px var(--at-line-2) !important; }
html[dir="rtl"] body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > article.collaboration-comment { border-radius: 16px 16px 6px 16px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > article.collaboration-comment::before { display: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > article.collaboration-comment > p { flex: 1 1 100%; margin: 0; font-size: 14px; line-height: 1.6; color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > article.collaboration-comment > small { font-family: var(--at-sans); font-size: 12px; line-height: 1.5; color: var(--at-ink-3); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-assignee { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 7px; background: var(--at-blue-soft); color: var(--at-blue); font-size: 12px; font-weight: 500; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-assignee::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px !important; margin-top: auto !important; padding: 10px !important; border-radius: 14px; background: var(--at-fill-1); box-shadow: inset 0 0 0 1px var(--at-line); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose > label { display: flex; flex-direction: column; min-width: 0; inline-size: auto !important; flex-basis: auto !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose > label:first-child { grid-column: 1 / -1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose > label > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose textarea { min-height: 88px !important; resize: vertical; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose > button:not(:disabled) { inline-size: auto !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose > p[role="alert"] { grid-column: 1 / -1; margin: 0; font-size: 13px; }
/* channel details */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context > h2 { margin: 0; font-family: var(--at-sans) !important; font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0 !important; color: var(--at-ink); text-shadow: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context > p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context dl { display: grid; margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context dl > div:last-child { border-bottom: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context dt { font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context dd { margin: 0; font-size: 13px; font-weight: 500; color: var(--at-ink); text-align: end; font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-context-group { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-context-group > h3 { margin: 0; font-family: var(--at-sans) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--at-ink-3); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-context-group > h3 { font-size: 13px !important; letter-spacing: 0; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-context-group > ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-context-group > ul > li { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 8px; background: var(--at-fill-2); box-shadow: inset 0 0 0 1px var(--at-line); color: var(--at-ink-2); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .inbox-context-group > p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
@media (max-width: 1240px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); grid-template-areas: "library thread" "library context"; grid-template-rows: minmax(0, 1fr) auto; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-library { grid-area: library; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread { grid-area: thread; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-context { grid-area: context; }
}
@media (max-width: 800px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "library" "thread" "context"; grid-template-rows: auto; min-height: 0; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > article.collaboration-comment { max-inline-size: 92%; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-compose > button:not(:disabled) { inline-size: 100% !important; }
}
/* ---------- INBOX · bento r2 (work pages) ---------- */
/* With no channel open the three panes size to their content (they still end together); the 640px floor returns with a conversation. */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-layout:not(:has(.collaboration-compose)):not(#_) { min-height: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-collaboration .collaboration-thread > p.inbox-convo-empty:not(#_) { padding: 12px 0; }
