/* ================================================================ Relay — "Passes"
   Mac-grade craft, Relay's own identity: channels own rich pass hues, orange means "needs you". */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  /* attention: reserved for unread, mentions, urgent, live */
  --attn: #D64A0E;
  --attn-text: #B23C06;
  --attn-soft: #FFF1E7;
  --attn-line: #FFD3B8;
  /* graphite controls */
  --ink: #1D1D1F;
  --on-ink: #FFFFFF;
  --ink-hover: #3A3A3F;
  /* meaning colours */
  --link: #2148C9;
  --focus: #3D6BFF;
  --good: #1D7550;
  --good-soft: #E6F4EC;
  --danger: #C8302B;
  --danger-soft: #FDECEB;
  --warn: #8A5300;
  --warn-soft: #FFF4DC;
  /* legacy aliases used by markup */
  --accent: var(--ink);
  --accent-strong: var(--ink-hover);
  --accent-soft: rgba(29, 29, 31, .06);
  --urgent: var(--attn);
  --urgent-soft: var(--attn-soft);
  --decision: var(--good);
  --decision-soft: var(--good-soft);
  --mention: var(--attn-soft);
  --mention-text: var(--attn-text);

  --bg: #FFFFFF;
  --bg-2: #F5F5F7;
  --bg-3: #EBEBEF;
  --hover: rgba(0, 0, 0, .035);
  --press: rgba(0, 0, 0, .06);
  --text: #1D1D1F;
  --text-2: #55555C;
  --text-3: #6E6E78;
  --border: #E5E5EA;
  --hairline: rgba(0, 0, 0, .08);

  --ground: #F5F5F7;
  --wash: 22%;
  --side-bg: rgba(245, 245, 247, .62);
  --side-text: #1D1D1F;
  --side-text-2: #6A6A73;
  --side-active: rgba(0, 0, 0, .075);
  --side-hover: rgba(0, 0, 0, .04);

  --material: rgba(255, 255, 255, .78);
  --material-strong: rgba(255, 255, 255, .9);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .03);
  --shadow: 0 10px 30px -8px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-lg: 0 30px 60px -16px rgba(0, 0, 0, .28), 0 8px 20px rgba(0, 0, 0, .08);
  --radius: 12px;
  --msg-pad: 6px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 56px;
}
:root[data-theme="dark"] {
  --attn: #F2661F;
  --attn-text: #FF9A5C;
  --attn-soft: rgba(242, 102, 31, .13);
  --attn-line: rgba(242, 102, 31, .35);
  --ink: #F2F2F7;
  --on-ink: #161618;
  --ink-hover: #FFFFFF;
  --link: #8AA8FF;
  --focus: #6F8FFF;
  --good: #4CC98A;
  --good-soft: rgba(76, 201, 138, .12);
  --danger: #FF6B64;
  --danger-soft: rgba(255, 107, 100, .12);
  --warn: #F3B24B;
  --warn-soft: rgba(243, 178, 75, .12);
  --accent-soft: rgba(255, 255, 255, .08);

  --bg: #1C1C1E;
  --bg-2: #232326;
  --bg-3: #2C2C30;
  --hover: rgba(255, 255, 255, .04);
  --press: rgba(255, 255, 255, .07);
  --text: #F2F2F7;
  --text-2: #B4B4BC;
  --text-3: #93939D;
  --border: #323236;
  --hairline: rgba(255, 255, 255, .08);

  --ground: #121214;
  --wash: 26%;
  --side-bg: rgba(22, 22, 24, .6);
  --side-text: #ECECF1;
  --side-text-2: #92929C;
  --side-active: rgba(255, 255, 255, .09);
  --side-hover: rgba(255, 255, 255, .045);

  --material: rgba(28, 28, 30, .78);
  --material-strong: rgba(36, 36, 39, .92);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 12px 34px -8px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 70px -16px rgba(0, 0, 0, .75), 0 8px 24px rgba(0, 0, 0, .4);
}
:root[data-density="compact"] { --msg-pad: 2px; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.47 var(--font); letter-spacing: -.003em; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow: hidden; caret-color: var(--focus); }
svg { width: 16px; height: 16px; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; letter-spacing: inherit; }
input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--link); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
kbd { font: 600 11px var(--font); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--bg); color: var(--text-2); }
::selection { background: color-mix(in srgb, var(--focus) 26%, transparent); }
:focus-visible { outline: 2.5px solid color-mix(in srgb, var(--focus) 75%, transparent); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 18%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 16%, transparent); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text) 30%, transparent); }
.muted { color: var(--text-3); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code { font-family: var(--mono); }

/* ---------------------------------------------------------------- shell */
.shell { --w1: #2D55D8; --w2: #1D7550; --w3: #7B3FA0; display: grid; grid-template-columns: 272px minmax(0, 1fr) auto; height: 100vh; background: var(--ground); position: relative; isolation: isolate; }
.shell::before { content: ''; position: absolute; z-index: -1; left: -60px; top: -60px; bottom: -60px; width: 400px; pointer-events: none;
  background: radial-gradient(240px 260px at 30% 18%, color-mix(in srgb, var(--w1) var(--wash), transparent), transparent 70%),
              radial-gradient(260px 300px at 70% 55%, color-mix(in srgb, var(--w2) var(--wash), transparent), transparent 70%),
              radial-gradient(240px 260px at 25% 88%, color-mix(in srgb, var(--w3) var(--wash), transparent), transparent 70%);
  filter: blur(36px); }

/* ---------------------------------------------------------------- sidebar */
.sidebar { background: var(--side-bg); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); color: var(--side-text); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--hairline); }
.ws { padding: 16px 14px 10px 16px; display: flex; align-items: center; gap: 11px; }
.ws-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font: 700 14px var(--font-display); letter-spacing: -.02em; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.2); position: relative; }
.ws-logo.attn::after { content: ''; position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--attn); box-shadow: 0 0 0 2px var(--ground); }
.ws-name { font: 650 15px/1.2 var(--font-display); letter-spacing: -.012em; color: var(--side-text); }
.ws-sub { font-size: 12px; color: var(--side-text-2); margin-top: 1px; }
.ws .icon-btn { margin-left: auto; color: var(--side-text-2); }
.side-search { margin: 4px 12px 10px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 8px; background: var(--side-active); color: var(--side-text-2); font-size: 13.5px; width: calc(100% - 24px); text-align: left; transition: background .15s; }
.side-search:hover { color: var(--side-text); }
.side-search svg { width: 15px; height: 15px; }
.side-search kbd { margin-left: auto; background: transparent; border-color: var(--hairline); color: var(--side-text-2); font-size: 11px; }
.side-scroll { overflow-y: auto; flex: 1; padding: 2px 0 14px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: calc(100% - 16px); margin: 1px 8px; height: 32px; padding: 0 8px 0 9px; border-radius: 8px; color: var(--side-text); font-size: 14px; text-align: left; position: relative; transition: background .12s; }
.nav-item:hover { background: var(--side-hover); }
.nav-item.active { background: var(--side-active); font-weight: 600; }
.nav-item.unread { font-weight: 650; }
.nav-item.is-muted { color: var(--side-text-2); }
.nav-item .ico { width: 20px; height: 20px; display: grid; place-items: center; flex: none; color: var(--side-text-2); }
.nav-item .ico svg { width: 17px; height: 17px; }
.nav-item.active .ico { color: var(--side-text); }
.nav-item .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.nav-item .badge { background: var(--attn); color: #fff; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 0 6px; min-width: 19px; text-align: center; line-height: 19px; font-variant-numeric: tabular-nums; }
.nav-item .badge.soft { background: none; color: var(--side-text-2); font-weight: 600; min-width: 0; padding: 0; }
.nav-item .status-emoji { font-size: 13px; }
.nav-mark { display: inline-flex; color: var(--side-text-2); }
.nav-mark svg { width: 13px; height: 13px; }
.ch-tile { width: 20px; height: 20px; border-radius: 6px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 1px 1px rgba(0,0,0,.12); }
.ch-tile svg { width: 12px; height: 12px; stroke-width: 2.6; }
.ch-tile.md { width: 26px; height: 26px; border-radius: 8px; }
.ch-tile.md svg { width: 15px; height: 15px; }
.nav-item.is-muted .ch-tile { filter: saturate(.25); opacity: .7; }
.section-h { display: flex; align-items: center; gap: 6px; padding: 16px 16px 4px 18px; font-size: 12px; font-weight: 600; color: var(--side-text-2); }
.section-h button { color: var(--side-text-2); }
.section-h button:hover { color: var(--side-text); }
.section-h .grow { flex: 1; text-align: left; }
.side-foot { padding: 10px 12px 12px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 8px; }
.side-foot .who { flex: 1; min-width: 0; text-align: left; padding: 4px 6px; border-radius: 8px; }
.side-foot .who:hover { background: var(--side-hover); }
.side-foot .who b { display: block; color: var(--side-text); font-size: 13.5px; font-weight: 600; }
.side-foot .who span { display: block; font-size: 12px; color: var(--side-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .icon-btn { color: var(--side-text-2) !important; }
.focus-banner { margin: 10px 12px 4px; padding: 11px 12px; border-radius: 12px; background: var(--bg); color: var(--side-text); font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.focus-banner b { font-weight: 650; }
.focus-banner button { color: var(--link); font-weight: 600; margin-top: 6px; }

/* ---------------------------------------------------------------- avatars */
.av { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 650; font-size: 13.5px; letter-spacing: .01em; flex: none; position: relative; user-select: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.av.sm { width: 20px; height: 20px; font-size: 11px; }
.av.md { width: 28px; height: 28px; font-size: 11.5px; }
.av.lg { width: 72px; height: 72px; font-size: 26px; }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--bg); background: var(--text-3); }
.sidebar .av .dot { border-color: var(--ground); }
.av .dot.on { background: var(--good); }
.av.sm .dot { width: 9px; height: 9px; border-width: 2px; right: -2px; bottom: -2px; }
.dot-inline { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #A1A1AA; flex: none; }
.dot-inline.on { background: var(--good); }
.stack { display: inline-flex; }
.stack .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.stack .av:first-child { margin-left: 0; }

/* ---------------------------------------------------------------- main */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.header { position: absolute; inset: 0 0 auto 0; z-index: 10; height: var(--header-h); display: flex; align-items: center; gap: 10px; padding: 0 16px 0 22px; background: var(--material); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.header h1 { font: 650 17px/1 var(--font); letter-spacing: -.018em; margin: 0; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.header .topic { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; padding: 4px 8px; border-radius: 8px; text-align: left; }
.header .topic:hover { background: var(--hover); color: var(--text-2); }
.header .tools { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.icon-btn { height: 32px; min-width: 32px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 550; transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { background: var(--press); }
.icon-btn.on { color: var(--text); background: var(--press); }
.icon-btn svg { width: 17px; height: 17px; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 999px; border: 0; font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg-3); transition: background .15s, transform .15s var(--ease); white-space: nowrap; }
.pill-btn:hover { background: color-mix(in srgb, var(--bg-3) 70%, var(--text) 8%); }
.pill-btn:active { transform: scale(.97); }
.pill-btn.primary { background: var(--ink); color: var(--on-ink); }
.pill-btn.primary:hover { background: var(--ink-hover); }
.pill-btn svg { width: 15px; height: 15px; }
.tz-chip { font-size: 12px; font-weight: 550; color: var(--text-2); background: var(--bg-2); padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tz-chip.off { color: var(--warn); background: var(--warn-soft); }

.feed { flex: 1; overflow-y: auto; min-height: 0; padding: calc(var(--header-h) + 8px) 0 14px; }
.feed-intro { padding: 36px 28px 18px; max-width: 760px; }
.feed-intro h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font: 700 26px/1.15 var(--font-display); letter-spacing: -.022em; }
.feed-intro p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.feed-intro .stack .av.lg { box-shadow: 0 0 0 3px var(--bg); }
.day { display: flex; justify-content: center; margin: 16px 24px 8px; position: sticky; top: calc(var(--header-h) + 8px); z-index: 2; pointer-events: none; }
.day span { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 12px; border-radius: 999px; background: var(--material-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.new-divider { display: flex; align-items: center; gap: 10px; margin: 8px 24px; color: var(--attn-text); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.new-divider::after { content: ''; flex: 1; height: 1px; background: var(--attn); opacity: .45; }

/* ---------------------------------------------------------------- message */
.msg { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: var(--msg-pad) 24px; margin-top: 8px; transition: background .12s; }
.msg.cont { margin-top: 0; padding-top: 1px; }
.msg:hover { background: var(--hover); }
.msg.flash { animation: flash 2.2s var(--ease); }
@keyframes flash { 0%, 35% { background: var(--attn-soft); } 100% { background: transparent; } }
.msg .gutter { font-size: 11px; color: var(--text-3); text-align: right; padding-top: 4px; opacity: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg.cont:hover .gutter { opacity: 1; }
.msg.mentioned { background: color-mix(in srgb, var(--attn-soft) 70%, transparent); }
.msg.urgent { background: var(--attn-soft); }
.msg.decision { background: color-mix(in srgb, var(--good-soft) 60%, transparent); }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.3; margin-bottom: 2px; }
.msg-head .name { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.msg-head .name:hover { text-decoration: underline; text-underline-offset: 2px; }
.msg-head time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.msg-head .status-emoji { font-size: 13px; }
.tag { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 6px; letter-spacing: .01em; }
.tag.urgent { background: var(--attn); color: #fff; }
.tag.decision { color: var(--good); box-shadow: inset 0 0 0 1.5px currentColor; border-radius: 6px; transform: rotate(-2deg); display: inline-block; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; font-weight: 800; padding: 0 6px; }
.tag.pinned { background: var(--warn-soft); color: var(--warn); }
.tag.sched { background: var(--bg-3); color: var(--text-2); }
.body { word-wrap: break-word; overflow-wrap: anywhere; font-size: 15px; }
.body p { margin: 0; }
.body b { font-weight: 650; }
.body .edited { font-size: 12px; color: var(--text-3); }
.body .deleted { color: var(--text-3); font-style: italic; }
.body blockquote { margin: 4px 0; padding: 2px 0 2px 12px; border-left: 1px solid color-mix(in srgb, var(--text) 25%, transparent); color: var(--text-2); }
.body code.inline { font: 13px var(--mono); padding: 1.5px 6px; border-radius: 6px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--text); }
.code { position: relative; margin: 8px 0; max-width: 760px; }
.code pre { margin: 0; font: 13px/1.6 var(--mono); padding: 14px 16px; border-radius: 12px; background: #16171B; color: #E6E8EE; overflow-x: auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.code .copy { position: absolute; top: 9px; right: 9px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: rgba(255,255,255,.1); color: #E6E8EE; opacity: 0; transition: opacity .15s; }
.code:hover .copy { opacity: 1; }
.code .lang { position: absolute; top: 11px; right: 70px; font-size: 11px; color: #93939D; opacity: 0; }
.code:hover .lang { opacity: 1; }
.mention { background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); padding: 0 4px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.mention.me { background: var(--attn-soft); color: var(--attn-text); box-shadow: inset 0 0 0 1px var(--attn-line); }
.chan-link { color: var(--link); font-weight: 600; cursor: pointer; }
.big-emoji { font-size: 32px; line-height: 1.25; }

.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.reaction { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--bg-2); font-size: 12.5px; font-weight: 650; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--hairline); font-variant-numeric: tabular-nums; transition: transform .15s var(--ease), box-shadow .15s; }
.reaction:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 25%, transparent); }
.reaction:active { transform: scale(.94); }
.reaction.mine { background: color-mix(in srgb, var(--link) 11%, var(--bg)); color: var(--link); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--link) 55%, transparent); }
.reaction.add { color: var(--text-3); opacity: 0; }
.msg:hover .reaction.add { opacity: 1; }

.thread-sum { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 10px 4px 5px; border-radius: 10px; font-size: 13px; transition: background .12s, box-shadow .12s; }
.thread-sum:hover { background: var(--bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.thread-sum b { color: var(--link); font-weight: 650; }
.thread-sum .muted { font-size: 12px; }
.thread-sum .unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--attn); }
.also { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.also a { color: var(--text-2); }
.seen { font-size: 11.5px; color: var(--text-3); text-align: right; padding: 0 24px; margin-top: 3px; }

.task-chip { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: var(--bg); max-width: 520px; font-size: 13.5px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.task-chip .check { width: 20px; height: 20px; border-radius: 50%; border: 1.75px solid color-mix(in srgb, var(--text) 30%, transparent); display: grid; place-items: center; flex: none; color: transparent; font-size: 12px; font-weight: 800; transition: background .15s, border-color .15s, transform .2s var(--ease); }
.task-chip .check:hover { border-color: var(--good); }
.task-chip .check:active { transform: scale(.88); }
.task-chip.done .check { background: var(--good); border-color: var(--good); color: #fff; }
.task-chip.done .t { color: var(--text-3); }
.task-chip .t b { font-weight: 650; }
.task-chip .meta { color: var(--text-2); font-size: 12px; margin-top: 1px; }
.task-chip .overdue { color: var(--danger); font-weight: 650; }
.stamp { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--good); box-shadow: inset 0 0 0 1.75px currentColor; border-radius: 6px; padding: 1px 7px; transform: rotate(-6deg); animation: stamp .35s var(--ease); flex: none; }
@keyframes stamp { from { transform: rotate(-6deg) scale(1.6); opacity: 0; } }

.poll { margin-top: 8px; border-radius: 14px; padding: 14px 16px; max-width: 520px; background: var(--bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.poll h4 { margin: 0 0 8px; font: 650 15px/1.3 var(--font); letter-spacing: -.01em; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); margin-top: 6px; text-align: left; overflow: hidden; transition: box-shadow .15s; }
.poll-opt:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 25%, transparent); }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--link) 14%, transparent); z-index: 0; transition: width .6s var(--ease); }
.poll-opt > *:not(.bar) { position: relative; z-index: 1; }
.poll-opt .txt { flex: 1; font-weight: 550; font-size: 14px; }
.poll-opt .n { font-size: 12px; color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.poll-opt.voted { box-shadow: inset 0 0 0 1.5px var(--link); }
.poll-opt.voted .txt::after { content: '  ✓'; color: var(--link); }
.poll .foot { margin-top: 10px; font-size: 12px; color: var(--text-3); display: flex; gap: 12px; }

.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-img { max-width: 380px; max-height: 280px; border-radius: 12px; cursor: zoom-in; display: block; box-shadow: var(--shadow-sm); }
.att-file { display: flex; align-items: center; gap: 11px; padding: 10px 14px 10px 10px; border-radius: 12px; background: var(--bg); min-width: 230px; color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.att-file:hover { text-decoration: none; box-shadow: var(--shadow), inset 0 0 0 1px var(--hairline); }
.att-file .fi { width: 36px; height: 36px; border-radius: 8px; background: var(--bg-2); color: var(--text-2); display: grid; place-items: center; font-weight: 800; font-size: 11px; letter-spacing: .04em; }
.att-file small { display: block; color: var(--text-3); font-size: 12px; }
.att-audio { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.att-audio audio { height: 32px; max-width: 280px; }

.hover-bar { position: absolute; top: -18px; right: 22px; display: none; background: var(--material-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 10px; box-shadow: var(--shadow), inset 0 0 0 1px var(--hairline); padding: 3px; z-index: 5; }
.msg:hover .hover-bar, .hover-bar.open { display: flex; animation: rise .14s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(3px); } }
.hover-bar button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); font-size: 15px; }
.hover-bar button:hover { background: var(--hover); color: var(--text); }
.hover-bar button svg { width: 16px; height: 16px; }
.hover-bar .sep { width: 1px; background: var(--hairline); margin: 6px 3px; }

/* ---------------------------------------------------------------- composer */
.composer-wrap { padding: 0 24px 18px; flex: none; position: relative; }
.panel .composer-wrap { padding: 0 14px 14px; }
.typing { height: 20px; font-size: 12px; color: var(--text-2); padding: 0 6px 3px; display: flex; align-items: center; }
.typing .dots { display: inline-flex; gap: 3px; margin-right: 6px; }
.typing .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; }
.typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px 14px 0 0; font-size: 13px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.banner.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.banner .grow { flex: 1; }
.banner button { font-weight: 650; color: inherit; text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; }
.composer { border-radius: 16px; background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px var(--hairline), 0 8px 24px -12px rgba(0,0,0,.12); transition: box-shadow .2s; }
.banner + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--focus) 55%, transparent), 0 0 0 4px color-mix(in srgb, var(--focus) 14%, transparent), 0 10px 28px -12px rgba(0,0,0,.18); }
.composer.urgent { box-shadow: 0 0 0 1.5px var(--attn), 0 0 0 4px color-mix(in srgb, var(--attn) 15%, transparent); }
.composer.editing { box-shadow: 0 0 0 1.5px var(--warn), 0 0 0 4px var(--warn-soft); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: 13px 16px 4px; min-height: 46px; max-height: 280px; line-height: 1.47; font-size: 15px; display: block; }
.composer textarea::placeholder { color: var(--text-3); }
.c-toolbar { display: flex; align-items: center; gap: 1px; padding: 4px 8px 8px; }
.c-toolbar .icon-btn { height: 30px; min-width: 30px; padding: 0 6px; color: var(--text-3); }
.c-toolbar .icon-btn:hover { color: var(--text); }
.c-toolbar .icon-btn.on { color: var(--attn); background: var(--attn-soft); }
.c-toolbar .sep { width: 1px; height: 18px; background: var(--hairline); margin: 0 5px; }
.c-toolbar .grow { flex: 1; }
.send-group { display: flex; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.send-btn { height: 32px; padding: 0 13px; background: var(--ink); color: var(--on-ink); display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13px; transition: background .15s; }
.send-btn:hover { background: var(--ink-hover); }
.send-btn[disabled] { background: var(--bg-3); color: var(--text-3); cursor: default; }
.send-btn.caret { padding: 0 8px; border-left: 1px solid color-mix(in srgb, var(--on-ink) 22%, transparent); }
.send-btn svg { width: 15px; height: 15px; }
.composer.urgent .send-btn { background: var(--attn); color: #fff; }
.pending-atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 0; }
.pending-att { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 30px 6px 8px; border-radius: 10px; font-size: 12.5px; max-width: 240px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.pending-att img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.pending-att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-att button { position: absolute; top: 5px; right: 8px; color: var(--text-3); }
.pending-att.uploading { opacity: .6; }
.c-hint { font-size: 11.5px; color: var(--text-3); padding: 6px 6px 0; display: flex; gap: 14px; }
.c-hint b { color: var(--text-2); font-weight: 600; }
.edit-hint { font-size: 12px; color: var(--warn); padding: 8px 16px 0; }
.recording { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: var(--attn-text); font-weight: 600; font-size: 13px; }
.recording .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--attn); animation: blink 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; }
.sched-note { font-size: 12.5px; color: var(--text-2); padding: 6px 6px 0; }
.sched-note button { color: var(--link); font-weight: 650; }

.ac { position: absolute; bottom: calc(100% - 10px); left: 24px; right: 24px; max-height: 300px; overflow-y: auto; background: var(--material-strong); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border-radius: 14px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hairline); padding: 6px; z-index: 30; animation: rise .14s var(--ease); }
.panel .ac { left: 14px; right: 14px; }
.ac-h { font-size: 11.5px; font-weight: 650; color: var(--text-3); padding: 6px 10px 6px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ac-item.sel { background: var(--ink); color: var(--on-ink); }
.ac-item.sel .muted { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.ac-item .em { font-size: 17px; width: 22px; text-align: center; }

/* ---------------------------------------------------------------- right panel */
.panel { width: 420px; border-left: 1px solid var(--hairline); display: flex; flex-direction: column; min-height: 0; background: var(--bg); position: relative; }
.panel-h { height: var(--header-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 20px; border-bottom: 1px solid var(--hairline); }
.panel-h h3 { margin: 0; font: 650 15px var(--font); letter-spacing: -.015em; white-space: nowrap; }
.panel-h .sub { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.panel-body { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: 8px; }
.panel .msg { padding-left: 18px; padding-right: 18px; }
.panel .hover-bar { right: 14px; }
.replies-sep { display: flex; align-items: center; gap: 10px; margin: 10px 18px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.replies-sep::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.also-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); padding: 6px 4px 0; cursor: pointer; }
.empty { text-align: center; color: var(--text-2); padding: 56px 24px; max-width: 420px; margin: 0 auto; }
.empty .big { font-size: 32px; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.empty h4 { margin: 0 0 6px; font: 650 17px var(--font); letter-spacing: -.012em; color: var(--text); }
.empty p { margin: 0; font-size: 14px; line-height: 1.5; }
.list-item { padding: 13px 18px; border-bottom: 1px solid var(--hairline); cursor: pointer; transition: background .12s; }
.list-item:hover { background: var(--hover); }
.list-item .li-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.list-item .li-meta b { color: var(--text); font-weight: 600; }
.member-row { display: flex; align-items: center; gap: 11px; padding: 8px 18px; cursor: pointer; }
.member-row:hover { background: var(--hover); }
.member-row .grow { flex: 1; min-width: 0; }
.member-row b { font-weight: 600; }
.member-row small { color: var(--text-3); display: block; font-size: 12px; }
.profile-card { padding: 30px 22px 22px; text-align: center; border-bottom: 1px solid var(--hairline); }
.profile-card h2 { margin: 14px 0 2px; font: 700 22px var(--font-display); letter-spacing: -.02em; }
.profile-card .row { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.kv { padding: 16px 22px; display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }

/* ---------------------------------------------------------------- catch up: passes (signature) */
.digest { padding: 16px; }
.digest-card { border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; background: var(--bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.digest-card h3 { margin: 0; font: 650 15px var(--font); letter-spacing: -.012em; display: flex; align-items: center; gap: 10px; }
.digest-card h3 .grow { flex: 1; }
.digest-card .summary { color: var(--text-2); font-size: 13.5px; margin: 4px 0 10px; }
.hl { display: flex; gap: 12px; padding: 8px 0; font-size: 13.5px; border-top: 1px solid var(--hairline); cursor: pointer; }
.hl:hover .hl-t { text-decoration: underline; text-underline-offset: 2px; }
.hl .k { flex: none; width: 96px; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; padding-top: 1px; color: var(--text-3); }
.hl .k.urgent, .hl .k.mention, .hl .k.task { color: var(--attn-text); }
.hl .k.decision { color: var(--good); }
.hl-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hl-t b { font-weight: 650; }
.digest-card .actions { display: flex; gap: 8px; margin-top: 14px; }

/* the pass: a channel-coloured card in a fanned stack */
.passes { display: flex; flex-direction: column; padding-bottom: 8px; }
.digest-card.pass { --c: #4A5568; color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff) 0%, var(--c) 58%, color-mix(in srgb, var(--c) 86%, #000) 100%); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 18px 36px -18px rgba(0,0,0,.45), 0 3px 10px rgba(0,0,0,.12); padding: 18px 22px 44px; margin-bottom: -26px; position: relative; transition: transform .45s var(--ease), margin .45s var(--ease), box-shadow .3s; }
.digest-card.pass::before { content: ''; position: absolute; left: 22px; right: 22px; top: 56px; border-top: 1.5px dashed rgba(255,255,255,.28); }
.digest-card.pass:last-child { margin-bottom: 0; padding-bottom: 18px; }

.digest-card.pass.closed:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 26px 44px -18px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.14); z-index: 3; }
.digest-card.pass h3 { font: 700 19px var(--font-display); letter-spacing: -.015em; color: #fff; height: 26px; }
.digest-card.pass h3 .grow { color: #fff; }
.digest-card.pass .pass-count { font-size: 12.5px; font-weight: 650; color: rgba(255,255,255,.88); font-variant-numeric: tabular-nums; }
.digest-card.pass .stack .av { box-shadow: 0 0 0 2px var(--c); }
.digest-card.pass .summary { color: rgba(255,255,255,.9); margin: 18px 0 8px; }
.digest-card.pass .summary .muted { color: rgba(255,255,255,.8); }
.digest-card.pass .hl { border-top-color: rgba(255,255,255,.16); }
.digest-card.pass .hl .k { color: rgba(255,255,255,.8); }
.digest-card.pass .hl .k.urgent, .digest-card.pass .hl .k.mention, .digest-card.pass .hl .k.task { color: #FFE4CF; }
.digest-card.pass .hl .k.urgent::before, .digest-card.pass .hl .k.mention::before, .digest-card.pass .hl .k.task::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--attn); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.digest-card.pass .hl .k.decision { color: #D8F5E5; }
.digest-card.pass .muted { color: rgba(255,255,255,.8); }
.digest-card.pass .pill-btn { background: rgba(255,255,255,.18); color: #fff; }
.digest-card.pass .pill-btn:hover { background: rgba(255,255,255,.28); }
.digest-card.pass .pill-btn.primary { background: #fff; color: var(--c); }

/* full-page views */
.page { flex: 1; overflow-y: auto; min-height: 0; padding-top: var(--header-h); }
.page-inner { max-width: 880px; margin: 0 auto; padding: 36px 32px 72px; }
.page-hero { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-hero h2 { margin: 0; font: 700 32px/1.1 var(--font-display); letter-spacing: -.028em; }
.page-hero p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; max-width: 62ch; }
.page-hero p b { color: var(--text); }
.page-hero .grow { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 26px; border-radius: 14px; overflow: hidden; background: var(--hairline); box-shadow: inset 0 0 0 1px var(--hairline); }
.stat { padding: 14px 16px; background: var(--bg-2); }
.stat[data-act] { transition: background .12s; }
.stat[data-act]:hover { background: var(--bg-3); }
.stat b { font: 700 24px/1.1 var(--font); display: block; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--text-2); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); margin-bottom: 18px; }
.tab { padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); border-radius: 8px; transition: background .15s, color .15s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); background: var(--bg); box-shadow: var(--shadow-sm); }
.tab .n { font-size: 11.5px; color: var(--text-3); margin-left: 5px; font-variant-numeric: tabular-nums; }
.card-list { border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.card-list .list-item:last-child { border-bottom: 0; }
.row-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.row-actions .pill-btn { height: 27px; font-size: 12px; padding: 0 11px; }
.search-box { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 0 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); margin-bottom: 12px; }
.search-box:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--focus) 55%, transparent), 0 0 0 4px color-mix(in srgb, var(--focus) 14%, transparent); background: var(--bg); }
.search-box input { flex: 1; border: 0; outline: 0; padding: 12px 0; background: transparent; font-size: 15px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font-size: 12px; font-weight: 550; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--text-2); font-family: var(--mono); }
.chip:hover { background: var(--bg-3); color: var(--text); }
mark { background: var(--warn-soft); color: inherit; border-radius: 6px; padding: 0 1px; }

/* ---------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); display: grid; place-items: start center; padding-top: 11vh; z-index: 100; animation: fade .15s ease; }
:root[data-theme="dark"] .overlay { background: rgba(0, 0, 0, .5); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, calc(100vw - 32px)); background: var(--material-strong); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); border-radius: 20px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hairline); animation: pop .22s var(--ease); max-height: 80vh; display: flex; flex-direction: column; }
.modal.wide { width: min(680px, calc(100vw - 32px)); }
@keyframes pop { from { transform: translateY(8px) scale(.97); opacity: 0; } }
.modal-h { padding: 20px 22px 6px 24px; display: flex; align-items: center; }
.modal-h h3 { margin: 0; font: 700 19px var(--font); letter-spacing: -.018em; flex: 1; }
.modal-b { padding: 10px 24px; overflow-y: auto; }
.modal-f { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--text-3); font-size: 12px; margin-top: 5px; }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm); outline: 0; transition: box-shadow .15s; }
textarea.input { height: auto; padding: 10px 12px; }
.input:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--focus) 70%, transparent), 0 0 0 4px color-mix(in srgb, var(--focus) 16%, transparent); }
.input::placeholder { color: var(--text-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin-bottom: 10px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--ink); width: 16px; height: 16px; }
.btn { height: 36px; padding: 0 16px; border-radius: 10px; font-weight: 650; font-size: 14px; background: var(--bg-3); color: var(--text); transition: background .15s, transform .15s var(--ease); }
.btn:hover { background: color-mix(in srgb, var(--bg-3) 70%, var(--text) 8%); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink-hover); }
.btn.danger { color: var(--danger); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.seg button { padding: 5px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); border-radius: 8px; }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.pick-list { max-height: 300px; overflow-y: auto; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); }
.pick-row { display: flex; align-items: center; gap: 11px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--hairline); }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: var(--hover); }
.pick-row .grow { flex: 1; min-width: 0; }
.pick-row b { font-weight: 600; }
.pick-row small { display: block; color: var(--text-3); font-size: 12px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.quick { text-align: left; padding: 11px 13px; border-radius: 12px; font-size: 13.5px; font-weight: 550; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s; }
.quick:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.quick small { display: block; color: var(--text-3); font-size: 12px; font-weight: 400; margin-top: 1px; }
.pw-box summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }

/* command palette — Spotlight-grade */
.palette { width: min(640px, calc(100vw - 32px)); background: var(--material-strong); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); border-radius: 20px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hairline); overflow: hidden; animation: pop .2s var(--ease); }
.palette input { width: 100%; border: 0; outline: 0; padding: 20px 22px; font-size: 19px; letter-spacing: -.012em; background: transparent; border-bottom: 1px solid var(--hairline); }
.palette input::placeholder { color: var(--text-3); }
.palette .results { max-height: 430px; overflow-y: auto; padding: 6px; }
.p-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 14.5px; }
.p-item .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); background: var(--bg-2); flex: none; }
.p-item .ico .av { box-shadow: none; }
.p-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-item small { color: var(--text-3); font-size: 12px; }
.p-item.sel { background: var(--ink); color: var(--on-ink); }
.p-item.sel .ico { background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink); }
.p-item.sel small { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
:root[data-theme="dark"] .p-item.sel, :root[data-theme="dark"] .menu button:hover, :root[data-theme="dark"] .ac-item.sel { background: rgba(255,255,255,.12); color: var(--text); }
:root[data-theme="dark"] .p-item.sel .ico { background: rgba(255,255,255,.1); color: var(--text); }
:root[data-theme="dark"] .p-item.sel small, :root[data-theme="dark"] .menu button:hover small, :root[data-theme="dark"] .menu button:hover .m-ico, :root[data-theme="dark"] .ac-item.sel .muted { color: var(--text-2); }
:root[data-theme="dark"] .menu button.danger:hover { background: var(--danger); color: #fff; }
.p-group { font-size: 11.5px; font-weight: 650; color: var(--text-3); padding: 10px 12px 4px; }
.palette .foot { border-top: 1px solid var(--hairline); padding: 9px 16px; font-size: 12px; color: var(--text-3); display: flex; gap: 16px; }

/* popover menu */
.menu { position: fixed; min-width: 230px; background: var(--material-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border-radius: 12px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hairline); padding: 5px; z-index: 120; animation: pop .14s var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 14px; text-align: left; }
.menu .m-ico { width: 18px; display: grid; place-items: center; color: var(--text-2); }
.menu button:hover, .menu button.sel { background: var(--ink); color: var(--on-ink); }
.menu button:hover .m-ico, .menu button:hover small { color: color-mix(in srgb, var(--on-ink) 75%, transparent); }
.menu button.danger { color: var(--danger); }
.menu button.danger .m-ico { color: var(--danger); }
.menu button.danger:hover { background: var(--danger); color: #fff; }
.menu button.danger:hover .m-ico { color: #fff; }
.menu button small { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.menu .m-sep { height: 1px; background: var(--hairline); margin: 5px 8px; }
.menu .m-h { font-size: 11.5px; font-weight: 650; color: var(--text-3); padding: 7px 10px 4px; }
.emoji-pop { width: 330px; padding: 8px; }
.emoji-pop input { width: 100%; margin-bottom: 6px; height: 34px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.emoji-grid button { font-size: 19px; height: 36px; border-radius: 8px; padding: 0; justify-content: center; }
.emoji-grid button:hover { background: var(--bg-3); color: inherit; }

/* toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: flex-start; gap: 11px; width: 350px; background: var(--material-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border-radius: 16px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hairline); padding: 12px 14px; font-size: 13.5px; cursor: pointer; animation: slide .3s var(--ease); }
.toast.error { box-shadow: var(--shadow-lg), inset 0 0 0 1.5px var(--danger); }
.toast.urgent { box-shadow: var(--shadow-lg), inset 0 0 0 1.5px var(--attn); }
.toast.reminder { box-shadow: var(--shadow-lg), inset 0 0 0 1.5px var(--ink); }
.toast b { display: block; font-size: 13.5px; font-weight: 650; }
.toast .t-body { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast .grow { flex: 1; min-width: 0; }
@keyframes slide { from { transform: translateY(10px) scale(.98); opacity: 0; } }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: grid; place-items: center; z-index: 150; cursor: zoom-out; animation: fade .2s; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 10px; box-shadow: var(--shadow-lg); }

/* ---------------------------------------------------------------- calls */
.call-pill { background: var(--good); color: #fff; }
.call-pill:hover { background: color-mix(in srgb, var(--good) 88%, #000); }
.call-pill.in { background: var(--good-soft); color: var(--good); }
.call-pill svg, .call-card svg, .ring-btn svg, .call-ind svg { width: 14px; height: 14px; }
.call-ind { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; }
.call-card { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 11px 14px; border-radius: 14px; background: var(--bg); max-width: 540px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.call-card.live { box-shadow: var(--shadow-sm), inset 0 0 0 1.5px color-mix(in srgb, var(--good) 55%, transparent); }
.cc-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--text-2); flex: none; }
.call-card.live .cc-ico { background: var(--good); color: #fff; animation: pulse 2.2s infinite; }
.cc-main { flex: 1; min-width: 0; font-size: 13.5px; }
.cc-main b { font-weight: 650; }
.cc-main .muted { font-size: 12.5px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.call-dock { position: fixed; right: 20px; top: calc(var(--header-h) + 14px); width: 324px; z-index: 90; background: rgba(22, 22, 24, .86); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%); color: #F2F2F7; border-radius: 22px; box-shadow: 0 30px 60px -16px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.09); padding: 12px; display: flex; flex-direction: column; gap: 12px; animation: pop .25s var(--ease); }
.call-top { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 4px 0 6px; }
.call-top .call-title { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.call-top .call-title:hover { text-decoration: underline; }
.call-top .grow { flex: 1; }
.call-timer { color: #93939D; font-variant-numeric: tabular-nums; font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4CC98A; box-shadow: 0 0 0 3px color-mix(in srgb, #4CC98A 24%, transparent); flex: none; }
.call-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #B4B4BC; }
.call-icon:hover { background: rgba(255,255,255,.1); }
.call-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.tile { position: relative; width: 70px; height: 70px; border-radius: 14px; background: #26262A; overflow: hidden; display: grid; place-items: center; transition: box-shadow .2s; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.tile.has-video video { display: block; }
.tile.has-video .tile-av { visibility: hidden; }
.tile.mirror video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; }
.tile .av.lg { width: 44px; height: 44px; font-size: 15px; }
.tile .av .dot { display: none; }
.tile-name { position: absolute; left: 4px; right: 4px; bottom: 4px; font-size: 11px; line-height: 1.3; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tile-name .muted { color: #B4B4BC; }
.tile.speaking { box-shadow: 0 0 0 2.5px #4CC98A, 0 6px 16px -6px rgba(0,0,0,.6); }
.tile.hand { box-shadow: 0 0 0 2.5px var(--attn), 0 6px 18px -6px rgba(0,0,0,.4); }
.tile.hand.speaking { box-shadow: 0 0 0 2.5px #4CC98A, 0 6px 16px -6px rgba(0,0,0,.6); }
.call-controls { display: flex; justify-content: center; gap: 10px; }
.call-btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; transition: background .15s, transform .15s var(--ease); }
.call-btn:hover { background: rgba(255,255,255,.2); }
.call-btn:active { transform: scale(.92); }
.call-btn svg { width: 19px; height: 19px; }
.call-btn.off { background: #fff; color: #161618; }
.call-btn.on { background: var(--attn); }
.call-btn.leave { background: #C8302B; width: 58px; border-radius: 22px; }
.call-btn.leave:hover { background: color-mix(in srgb, #C8302B 86%, #000); }
.call-dock.expanded { inset: 0 0 0 272px; width: auto; border-radius: 0; padding: 16px 20px 22px; z-index: 95; background: rgba(14, 14, 16, .94); }
.call-dock.expanded .call-top { font-size: 15px; }
.call-dock.expanded .call-grid { flex: 1; min-height: 0; display: grid; gap: 12px; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.call-dock.expanded .call-grid[data-n="2"] { grid-template-columns: 1fr 1fr; }
.call-dock.expanded .call-grid[data-n="3"], .call-dock.expanded .call-grid[data-n="4"] { grid-template-columns: 1fr 1fr; }
.call-dock.expanded .call-grid[data-n="5"], .call-dock.expanded .call-grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
.call-dock.expanded .call-grid[data-n="7"], .call-dock.expanded .call-grid[data-n="8"] { grid-template-columns: repeat(4, 1fr); }
.call-dock.expanded .call-grid.has-screen { grid-template-columns: 1fr 230px; grid-auto-rows: minmax(0, 1fr); }
.call-dock.expanded .call-grid.has-screen .tile.screen { grid-row: 1 / span 8; }
.call-dock.expanded .tile { width: auto; height: auto; min-height: 0; border-radius: 20px; }
.call-dock.expanded .tile .av.lg { width: 104px; height: 104px; font-size: 32px; }
.call-dock.expanded .tile-name { left: 14px; right: auto; bottom: 12px; font-size: 13px; text-align: left; background: rgba(0,0,0,.5); padding: 4px 10px; border-radius: 8px; max-width: calc(100% - 28px); }
.call-dock.expanded .call-btn { width: 52px; height: 52px; }
.call-dock.expanded .call-btn.leave { width: 70px; border-radius: 22px; }
.ring-card { position: fixed; top: 18px; right: 18px; z-index: 210; width: 350px; background: rgba(22, 22, 24, .88); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%); color: #F2F2F7; border-radius: 22px; padding: 18px; box-shadow: 0 30px 60px -16px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.09); animation: slide .3s var(--ease); }
.ring-who { display: flex; align-items: center; gap: 13px; }
.ring-who b { font-weight: 650; font-size: 15px; }
.ring-who .av.lg { width: 50px; height: 50px; font-size: 17px; animation: pulse 1.6s infinite; }
.ring-who .muted { color: #93939D; font-size: 13px; }
.ring-actions { display: flex; gap: 8px; margin-top: 16px; }
.ring-btn { flex: 1; height: 38px; border-radius: 12px; font-weight: 650; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #1D7550; color: #fff; transition: filter .15s, transform .15s var(--ease); }
.ring-btn:hover { filter: brightness(1.08); }
.ring-btn:active { transform: scale(.97); }
.ring-btn.decline { background: #C8302B; }
.ring-btn.video { background: rgba(255,255,255,.16); }

/* ---------------------------------------------------------------- sign in */
.login { height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--bg); }
.login-art { background: #F1F1F4; color: #1D1D1F; padding: 44px 56px; display: flex; flex-direction: column; gap: 30px; overflow: hidden; position: relative; border-right: 1px solid var(--hairline); }
:root[data-theme="dark"] .login-art { background: #141416; color: #F2F2F7; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px var(--font-display); letter-spacing: -.02em; }
.login-copy h1 { font: 700 clamp(34px, 3.6vw, 50px)/1.04 var(--font-display); letter-spacing: -.035em; margin: 18px 0 14px; max-width: 13ch; text-wrap: balance; }
.login-copy p { color: var(--text-2); font-size: 17px; line-height: 1.45; max-width: 40ch; margin: 0; }
.login-passes { display: flex; flex-direction: column; max-width: 470px; margin-top: 4px; }
.lp { --c: #2D55D8; color: #fff; border-radius: 16px; padding: 16px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 86%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 20px 40px -20px rgba(0,0,0,.45), 0 3px 10px rgba(0,0,0,.12); margin-bottom: -22px; position: relative; animation: deal .8s var(--ease) both; }
.lp:nth-child(2) { margin-left: 18px; animation-delay: .08s; }
.lp:nth-child(3) { margin-left: 36px; animation-delay: .16s; margin-bottom: 0; }
@keyframes deal { from { transform: translateY(24px) rotate(-1.5deg); opacity: 0; } }
.lp-h { display: flex; align-items: center; font-size: 15px; padding-bottom: 12px; }
.lp-h b { font: 700 17px var(--font-display); letter-spacing: -.015em; }
.lp-h span { margin-left: auto; font-size: 12.5px; font-weight: 600; opacity: .9; }
.lp-f { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.16); font-size: 13.5px; }
.lp-k { width: 76px; flex: none; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; opacity: .85; padding-top: 1px; }
.lp-k.attn { opacity: 1; color: #FFE4CF; }
.login-points { list-style: none; padding: 0; margin: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-size: 13.5px; color: var(--text-2); max-width: 520px; }
.login-points li { display: flex; gap: 8px; align-items: baseline; }
.login-points li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; transform: translateY(-1px); }
.login-note { font-size: 12.5px; color: var(--text-3); margin: 0; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--bg); overflow-y: auto; }
.login-card { width: min(380px, 100%); }
.login-card h2 { margin: 0 0 6px; font: 700 26px var(--font-display); letter-spacing: -.025em; }
.login-card > p { margin: 0 0 22px; color: var(--text-2); }
.login-card .btn.primary { height: 42px; font-size: 15px; border-radius: 12px; }
.user-pick { display: grid; gap: 6px; margin-bottom: 10px; }
.user-pick button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; text-align: left; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s, transform .15s var(--ease); }
.user-pick button:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.user-pick button:active { transform: scale(.99); }
.user-pick b { font-weight: 600; }
.user-pick small { display: block; color: var(--text-3); font-size: 12px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 22px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.auth-msg { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; }
.auth-msg.error { background: var(--danger-soft); color: var(--danger); }
.auth-msg.warn { background: var(--warn-soft); color: var(--warn); }
.btn[disabled] { opacity: .6; cursor: default; }

.conn { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; z-index: 300; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- responsive */
.menu-toggle { display: none !important; }
.panel .c-toolbar { flex-wrap: wrap; row-gap: 4px; }
.panel .c-toolbar [data-c="fmt"][data-w="~"], .panel .c-toolbar [data-c="link"], .panel .c-toolbar [data-c="mention"] { display: none; }
.panel .also-check { font-size: 12px; white-space: nowrap; }

@media (max-width: 1100px) {
  .panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 50; box-shadow: var(--shadow-lg); width: min(420px, 100vw); }
  .login-art { padding: 36px; }
  .login-points { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 288px; z-index: 60; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .shell.side-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-flex !important; }
  .header { padding: 0 8px; gap: 6px; }
  .header h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .header .topic, .tz-chip { display: none; }
  .header .tools [data-type="files"], .header .tools [data-type="decisions"], .header .tools [data-act="star"], .header .tools [data-type="members"] .stack, .header .tools [data-video] { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .composer-wrap { padding: 0 10px 10px; }
  .c-toolbar [data-c="fmt"], .c-toolbar [data-c="link"], .c-toolbar [data-c="mention"], .c-toolbar .sep { display: none; }
  .c-hint { display: none; }
  .msg { padding-left: 14px; padding-right: 14px; }
  .page-inner { padding: 22px 16px 56px; }
  .page-hero h2 { font-size: 26px; }
  .page-hero { flex-wrap: wrap; }
  .hl .k { width: 80px; }
  .tabs { display: flex; overflow-x: auto; }
  .call-dock { left: 10px; right: 10px; width: auto; }
  .call-dock.expanded { inset: 0; }
  .call-dock.expanded .call-grid.has-screen { grid-template-columns: 1fr; }
  .ring-card { left: 10px; right: 10px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* dark mode: elevation stays neutral — coloured shadows read as glow on dark grounds */
:root[data-theme="dark"] .digest-card.pass, :root[data-theme="dark"] .lp { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 18px 36px -18px rgba(0,0,0,.8), 0 3px 10px rgba(0,0,0,.35); }
:root[data-theme="dark"] .digest-card.pass:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 26px 44px -18px rgba(0,0,0,.85), 0 4px 12px rgba(0,0,0,.4); }

/* ---------------------------------------------------------------- wallet stack + catch up layout */
.digest-card.pass.closed { padding-top: 16px; padding-bottom: 40px; cursor: pointer; }
.digest-card.pass.closed::before { display: none; }
.digest-card.pass.closed > :not(h3) { display: none; }
.digest-card.pass.closed h3 { cursor: pointer; }
.digest-card.pass.closed:last-child { padding-bottom: 16px; }
.digest-card.pass.open + .digest-card.pass { margin-top: 10px; }
.digest-card.pass.open > :not(h3) { animation: unfold .45s var(--ease) both; }
.digest-card.pass.open { z-index: 2; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.digest-card.pass h3[data-act="pass-open"]:focus-visible { outline-color: #fff; outline-offset: 6px; }
.digest-card.held h3 svg { width: 17px; height: 17px; color: var(--text-2); }
.i-ico { display: inline-flex; vertical-align: -1px; margin-right: 1px; }
.i-ico svg { width: .9em; height: .9em; stroke-width: 2.4; }
.t-ico { display: grid; place-items: center; width: 22px; height: 22px; color: var(--text-2); flex: none; }
.t-ico svg { width: 18px; height: 18px; }
.empty .big svg { width: 26px; height: 26px; color: var(--text-2); }
.tz-chip svg { width: 12px; height: 12px; vertical-align: -1px; }
.banner svg { width: 15px; height: 15px; }
.li-meta svg { width: 13px; height: 13px; }

.page:has(.home-grid) .page-inner { max-width: 1180px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 36px; align-items: start; }
.home-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.rm-card { border-radius: 16px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); padding: 6px 16px 10px; }
.rm-card header { display: flex; align-items: center; height: 44px; }
.rm-card h3 { margin: 0; flex: 1; font: 700 15px var(--font); letter-spacing: -.012em; }
.rm-link { font-size: 13px; font-weight: 600; color: var(--link); }
.rm-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hairline); align-items: flex-start; }
.rm-check { width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 1px; box-shadow: inset 0 0 0 1.75px var(--c); transition: background .2s, transform .2s var(--ease); }
.rm-check:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.rm-check:active { transform: scale(.86); background: var(--c); }
.rm-ico { width: 20px; height: 20px; display: grid; place-items: center; color: var(--text-3); flex: none; margin-top: 1px; }
.rm-ico.due { color: var(--attn); }
.rm-body { flex: 1; min-width: 0; cursor: pointer; }
.rm-body:hover .rm-t { text-decoration: underline; text-underline-offset: 2px; }
.rm-t { font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rm-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.rm-meta .overdue, .rm-meta .due-t { color: var(--attn-text); font-weight: 600; }
.rm-empty { margin: 0; padding: 10px 0 8px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--text-3); line-height: 1.45; }
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; gap: 24px; }
  .home-side { position: static; }
}

.ch-tile.lg { width: 40px; height: 40px; border-radius: 12px; }
.ch-tile.lg svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- Relay AI panel */
.panel-h h3 { display: flex; align-items: center; gap: 8px; }
.panel-h h3 svg { width: 17px; height: 17px; color: var(--text-2); }
.ai-empty { padding: 36px 24px; text-align: center; }
.ai-empty h4 { margin: 14px 0 6px; font: 650 17px var(--font); }
.ai-empty p { color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
.ai-orb { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); }
.ai-orb svg { width: 26px; height: 26px; }
.ai-orb.sm { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.ai-orb.sm svg { width: 20px; height: 20px; }
.ai-hello { text-align: center; padding: 30px 20px 10px; color: var(--text-2); font-size: 14px; }
.ai-thread { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.ai-msg.me { align-items: flex-end; }
.ai-bubble { padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.47; max-width: 92%; overflow-wrap: anywhere; }
.ai-msg.me .ai-bubble { background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.ai-msg.bot .ai-bubble { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hairline); border-bottom-left-radius: 6px; }
.ai-bubble.thinking { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.ai-bubble.thinking .dots { display: inline-flex; gap: 3px; }
.ai-bubble.thinking .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.ai-bubble.thinking .dots i:nth-child(2) { animation-delay: .2s; }
.ai-bubble.thinking .dots i:nth-child(3) { animation-delay: .4s; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-tools span { font-size: 11px; font-weight: 600; color: var(--text-3); background: var(--bg-2); border-radius: 999px; padding: 2px 8px; }
.ai-action { border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); padding: 10px 12px; max-width: 92%; }
.ai-action.pending { box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--attn-line); }
.aa-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.aa-h svg { width: 14px; height: 14px; }
.aa-body { font-size: 14px; margin: 6px 0 2px; max-height: 220px; overflow: auto; }
.aa-btns { display: flex; gap: 6px; margin-top: 8px; }
.aa-state { font-size: 12px; font-weight: 650; color: var(--text-3); margin-top: 6px; }
.ai-action.done .aa-state { color: var(--good); }
.ai-chips { display: flex; flex-direction: column; gap: 6px; padding: 6px 16px 14px; }
.chip-btn { text-align: left; font-size: 13.5px; padding: 9px 12px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s; }
.chip-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
#aiInput .composer textarea { min-height: 44px; max-height: 200px; }
.hero-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- integrations dialog */
.int-sec { padding: 16px 0; border-top: 1px solid var(--hairline); }
.int-sec:first-child { border-top: 0; padding-top: 4px; }
.int-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.int-h b { font-size: 15px; font-weight: 650; display: block; }
.int-h small { font-size: 12.5px; color: var(--text-3); }
.int-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.int-ico svg { width: 18px; height: 18px; }
.int-ico.ai { background: var(--ink); color: var(--on-ink); }
.int-ico.mail { background: #2D55D8; }
.int-ico.cal { background: #1D7550; }
.int-p { font-size: 13.5px; color: var(--text-2); margin: 0; line-height: 1.5; }
.feed-out { margin-top: 12px; }
.feed-out small { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.45; }
a.pill-btn { text-decoration: none; }

/* ---------------------------------------------------------------- admin, apps, push */
.tag.app { background: var(--bg-3); color: var(--text-2); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; font-weight: 750; }
.role-tag { font-size: 12px; font-weight: 650; color: var(--text-2); background: var(--bg-2); border-radius: 999px; padding: 2px 10px; text-transform: capitalize; }
.role-tag.owner { color: var(--attn-text); background: var(--attn-soft); }
.input.sm { height: 30px; width: auto; padding: 0 8px; font-size: 13px; }
.pick-row.deact { opacity: .55; }
.hook-curl { margin: 8px 0 0; font: 12px/1.55 var(--mono); background: var(--code-ground, #16171B); color: #E6E8EE; border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; }
.push-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- password reset */
.pw-label { display: flex !important; align-items: baseline; justify-content: space-between; }
.forgot-link { font-size: 12.5px; font-weight: 600; color: var(--link); }
.forgot-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.login.single { grid-template-columns: 1fr; }
.auth-msg.ok { background: var(--good-soft); color: var(--good); }
.pw-rules { list-style: none; padding: 0; margin: -6px 0 14px; display: grid; gap: 5px; font-size: 12.5px; color: var(--text-3); }
.pw-rules li { display: flex; align-items: center; gap: 8px; transition: color .15s; }
.pw-rules li.ok { color: var(--good); }
.pw-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; display: grid; place-items: center; flex: none; }
.pw-rules li.ok .pw-dot { background: var(--good); box-shadow: none; color: #fff; }
.pw-dot svg { width: 10px; height: 10px; stroke-width: 3.2; }
#authErr { margin: 4px 0 12px; }
