/* Hearth: soft and light. Warm off-white canvas, white cards with gentle shadows, frosted chrome floating over the
   content, clay characters for the team, and 3D emoji for their badges and ideas. */

:root {
  color-scheme: light;
  --bg: #fbfaf8;
  --bg-2: #f5f3f0;
  --surface: #f2f0ec;
  --surface-2: #e9e6e1;
  --card: #ffffff;
  --line: #ebe8e3;
  --ink: #1d1b19;
  --ink-2: #3b3834;
  --muted: #8c8781;
  --blue: #2f6feb;
  --mention-bg: rgba(47, 111, 235, .1);
  --badge: #e5603e;
  --pink: #1d1b19;
  --purple-2: #1d1b19;
  --primary: #1d1b19;
  --primary-ink: #fff;
  --ok: #2f9e6b;
  --warn: #d98a1c;
  --danger: #d9534f;
  --glass: rgba(255, 255, 255, .8);
  --glass-line: rgba(30, 25, 20, .06);
  --shadow: 0 1px 2px rgba(40, 30, 20, .04), 0 8px 24px rgba(40, 30, 20, .07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@property --c { syntax: "<color>"; inherits: true; initial-value: #c8b8a4; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 17px/1.42 var(--font); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { opacity: .4; cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; }
h4 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
a { color: var(--blue); }
code { font-family: var(--mono); font-size: .86em; background: var(--surface); padding: 1px 5px; border-radius: 5px; color: #b5532d; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.left { text-align: left; }
.row { display: flex; align-items: center; gap: 12px; }
.gap { gap: 10px; }
[hidden] { display: none !important; }

/* ---------- frame ---------- */
.app { height: 100dvh; max-width: 760px; margin: 0 auto; position: relative; }
.screen { position: relative; height: 100dvh; overflow: hidden; }
.scroll { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(84px + var(--safe-t)) 0 calc(150px + var(--safe-b)); }
.glass { background: var(--glass); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
.chrome-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: calc(8px + var(--safe-t)) 14px 8px;
  background: linear-gradient(var(--bg) 40%, transparent); }
.toprow { display: flex; align-items: center; gap: 10px; }
.circle { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.titlepill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 999px; text-align: left; }
.titlepill .hash { font-size: 24px; font-weight: 700; }
.titlepill b { display: block; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlepill small { display: block; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -1px; }
.pillgroup { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 6px; border-radius: 999px; flex: none; }
.pillbtn { position: relative; height: 40px; min-width: 40px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; font-size: 14px; font-weight: 700; }
.pillbtn .dot, .tabicon .dot, .ti .dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-left: 8px; vertical-align: middle; }
.status.live { background: var(--ok); }
.status.connecting { background: var(--warn); animation: pulse 1.4s infinite; }
.status.offline { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

/* big title variant (Home, DMs, Activity) */
.toprow.big { height: 64px; }
.toprow.big h1 { flex: 1; font-size: 30px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 52px; height: 52px; border-radius: 50%; padding: 6px; background: var(--card); box-shadow: var(--shadow); flex: none; }
.logo img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.uavatar { --s: 40px; width: var(--s); height: var(--s); border-radius: 22%; display: inline-grid; place-items: center; flex: none;
  background: radial-gradient(circle at 34% 26%, #ffffff 0, #ece6dd 60%, #ddd4c7 100%); color: var(--ink); font-weight: 700; font-size: calc(var(--s) * .42);
  border-radius: 50%; box-shadow: inset 0 -2px 4px rgba(90, 65, 40, .12), 0 2px 6px rgba(90, 65, 40, .12); }
.uavatar.ghost { background: none; border: 1.5px dashed var(--line); color: var(--muted); }

/* Home: no colored band, just the canvas */
.screen.purple .scroll { padding-top: calc(96px + var(--safe-t)); }

/* ---------- bottom: composer, tab bar, FAB ---------- */
.chrome-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 14px calc(10px + var(--safe-b));
  display: flex; flex-direction: column; gap: 10px; background: linear-gradient(transparent, color-mix(in srgb, var(--bg) 85%, transparent) 40%); pointer-events: none; }
.chrome-bottom > * { pointer-events: auto; }
.tabbar { display: flex; align-items: center; gap: 12px; }
.tabs { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); height: 68px; padding: 6px; border-radius: 999px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tab.on { background: rgba(30, 25, 20, .06); color: var(--ink); }
.tab.on .icon { fill: rgba(30, 25, 20, .1); stroke: var(--ink); }
.tabicon { position: relative; }
.searchbtn { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.fab { align-self: flex-end; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--ink); box-shadow: 0 10px 28px rgba(30, 25, 20, .28); margin-right: 8px; }
.fab:active { transform: scale(.95); }

.composer-wrap { display: flex; flex-direction: column; }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px; border-radius: 30px; min-height: 58px; }
.composer:not(.glass) { background: var(--glass); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); border: 1px solid var(--glass-line); }
.composer.listening { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 25%, transparent); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; outline: none; padding: 11px 4px; font-size: 17px; line-height: 1.35; max-height: 140px; }
.composer textarea::placeholder { color: var(--muted); }
.plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(30, 25, 20, .06); color: var(--ink); }
.act { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink-2); touch-action: none; user-select: none; -webkit-user-select: none; }
.act.send { background: var(--primary); color: #fff; }
.rec { display: flex; align-items: center; gap: 12px; padding: 0 12px 8px; color: var(--ink-2); font-size: 15px; }
.rec .clock { font-variant-numeric: tabular-nums; color: var(--muted); }
.cancel { color: var(--muted); font-size: 15px; }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.wave b { width: 3px; height: 6px; border-radius: 2px; background: var(--danger); animation: wave 1s infinite ease-in-out; }
.wave b:nth-child(2) { animation-delay: .1s; } .wave b:nth-child(3) { animation-delay: .2s; } .wave b:nth-child(4) { animation-delay: .3s; } .wave b:nth-child(5) { animation-delay: .4s; }
@keyframes wave { 50% { height: 18px; } }
.attach-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 8px; }
.attach-chips:empty { display: none; }
.attach-chips .chip button { display: inline-grid; place-items: center; margin-left: 4px; color: var(--muted); }

/* ---------- Home ---------- */
.tiles { display: flex; gap: 12px; overflow-x: auto; padding: 10px 16px 20px; scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
.tilebtn { flex: none; width: 128px; padding: 14px 14px 12px; border-radius: 20px; border: 0; background: var(--card); box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; gap: 2px; }
.tilebtn .ti { position: relative; width: fit-content; margin-bottom: 8px; color: var(--ink); }
.tilebtn .ti .dot { top: -3px; right: -6px; }
.tilebtn b { font-size: 17px; font-weight: 800; }
.tilebtn small { font-size: 15px; color: var(--ink-2); }
.tilebtn:not(.hot) b, .tilebtn:not(.hot) small, .tilebtn:not(.hot) .ti { color: var(--muted); }
.hsec { padding: 6px 0; }
.hsec-head { display: flex; align-items: center; gap: 6px; padding: 12px 10px 6px 18px; }
.hsec-title { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 800; text-align: left; }
.hsec-title .icon { color: var(--ink-2); }
.chev { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-2); border-radius: 50%; }
.chev.down .icon { transform: rotate(180deg); }
.hrow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 18px; text-align: left; font-size: 18px; color: var(--ink-2); }
.hrow:active { background: var(--surface); }
.hrow .hicon { width: 30px; text-align: center; font-size: 26px; font-weight: 500; color: var(--ink-2); flex: none; line-height: 1; }
.hrow.unread { color: var(--ink); font-weight: 800; }
.hrow.unread .hicon { color: var(--ink); font-weight: 700; }
.udot { width: 9px; height: 9px; border-radius: 50%; background: var(--badge); flex: none; align-self: center; }
.fromchip { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.hrow .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow small { color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.hrow.dim { color: var(--muted); }
.badge { font-style: normal; min-width: 30px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; flex: none; }
.hempty { color: var(--muted); font-size: 15px; padding: 4px 18px 12px; margin: 0; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface-2); border-top-color: var(--ink); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- DMs & Activity lists ---------- */
.dmrow, .actmain { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px; text-align: left; }
.dmrow:active, .actmain:active { background: var(--surface); }
.dmrow .l1, .actmain .l1 { display: flex; align-items: baseline; gap: 8px; }
.dmrow b, .actmain b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmrow time, .actmain time { margin-left: auto; color: var(--muted); font-size: 13px; flex: none; }
.dmrow small { display: block; color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmrow small.warn { color: var(--warn); }
.actrow { border-bottom: 1px solid var(--line); }
.actrow.hot { background: color-mix(in srgb, var(--badge) 10%, transparent); }
.actmain small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.actmain .l2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.actbtns { display: flex; gap: 8px; padding: 0 18px 12px 72px; }

/* ---------- messages (Slack rows) ---------- */
.msgs { padding: 0 0 8px; }
.daydiv { font-size: 17px; font-weight: 800; padding: 16px 16px 8px; margin-top: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.mrow { display: flex; gap: 12px; padding: 8px 16px; }
.mrow.grouped { padding-top: 2px; }
.mav { width: 40px; flex: none; display: flex; justify-content: center; }
.mav .gtime { font-size: 11px; color: transparent; padding-top: 4px; }
.mrow.grouped:active .gtime { color: var(--muted); }
.mbody { flex: 1; min-width: 0; }
.mhead { display: flex; align-items: baseline; gap: 8px; line-height: 1.2; margin-bottom: 3px; }
.mhead b { font-size: 17px; font-weight: 800; }
.mhead time { font-size: 13px; color: var(--muted); }
.apptag { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.jobmeta { font-size: 12.5px; color: var(--muted); }
.mtext, .rich { font-size: 17px; line-height: 1.42; overflow-wrap: anywhere; color: var(--ink-2); white-space: pre-wrap; }
.rich { white-space: normal; }
.rich p { margin: 0 0 6px; }
.rich p:last-child { margin: 0; }
.rich ul, .rich ol { margin: 2px 0 6px; padding-left: 22px; }
.rich a { color: var(--blue); text-decoration: none; }
.mrow.err .rich { color: var(--danger); }
.mention { color: var(--blue); background: var(--mention-bg); padding: 0 3px; border-radius: 4px; font: inherit; }
.proline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.whybtn { font-size: 13px; color: var(--muted); margin-top: 4px; }
.why { font-size: 14px; color: var(--ink-2); border-left: 4px solid var(--line); padding: 2px 10px; margin-top: 6px; }
.ttitle { display: flex; align-items: center; gap: 4px; width: 100%; text-align: left; font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 3px; }
.ttitle span { flex: 1; min-width: 0; }
.ttitle .icon { color: var(--muted); flex: none; }
.mbody .typing { display: flex; margin-top: 2px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.short { -webkit-line-clamp: 2; text-align: left; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chipx { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }
.tfoot { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.tfoot b { color: var(--blue); font-weight: 700; }
.brief .mtext { font-size: 15px; color: var(--muted); }
.tline { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 2px 0; text-align: left; font-size: 15px; }
.tline.col { flex-direction: column; align-items: flex-start; gap: 6px; }

.tline .replies { color: var(--blue); font-weight: 700; }
.tline .warn { color: var(--warn); }
.typing { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 15px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.typing span { margin-left: 6px; }
.typing.small i { width: 4px; height: 4px; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.repdiv { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 6px 16px; }
.repdiv::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.did-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.linkbtn { color: var(--blue); font-size: 14px; font-weight: 600; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn + .linkbtn { margin-left: 16px; }
.tilelink { display: block; width: 100%; text-align: left; }
/* Slack block-kit style buttons and blocks */
.block { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 8px; }
.blockhead { display: flex; align-items: center; gap: 8px; }
.blockhead .icon { color: var(--warn); }
.block p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.blockbtns { display: flex; gap: 8px; margin-top: 8px; }
.sbtn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 15px; font-weight: 700; color: var(--ink); background: var(--bg); }
.sbtn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.hello { padding: 30px 16px; }
.hello h2 { font-size: 26px; font-weight: 800; }
.hello p { color: var(--muted); margin: 8px 0 20px; }
.starters { display: flex; flex-direction: column; gap: 8px; }
.starters button { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
.dmhero { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 16px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dmhero h2 { font-size: 24px; font-weight: 800; margin-top: 12px; }
.dmhero p { color: var(--muted); margin: 4px 0 0; font-size: 15.5px; }
.routines { width: 100%; margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.routines > small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.routine { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 15px; text-align: left; }
.routine > span:not(.face) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.routine small { color: var(--muted); font-size: 12.5px; }
.routine.paused { opacity: .55; }

/* split view on wide screens: thread beside the channel */
.threadside { display: none; }
@media (min-width: 980px) {
  .app { max-width: 820px; }
  .app.split { max-width: 1280px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; }
  .threadside { display: flex; flex-direction: column; height: 100dvh; border-left: 1px solid var(--line); background: var(--bg); }
  .threadside-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 8px 18px; font-size: 18px; }
  .threadside .msgs { flex: 1; overflow-y: auto; }
  .threadside .composer-wrap { padding: 10px 14px 14px; }
}

/* ---------- files ---------- */
.filecard { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 10px 10px 10px 12px; border-radius: 10px; border: 1px solid var(--line); max-width: 440px; width: 100%; }
.filecard .ficon { width: 38px; height: 38px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.filecard b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filecard small { display: block; color: var(--muted); font-size: 13px; }
.filecard .btn.ghost { width: auto; margin: 0; }
.filerow { display: flex; align-items: center; gap: 6px; }
.file-preview { width: 100%; max-height: 70vh; border-radius: 12px; display: block; background: #000; object-fit: contain; }
.file-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 18px 0 8px; }
.file-audio audio { width: 100%; }
.ficon.big { width: 64px; height: 64px; border-radius: 18px; }
.doc { font-size: 16px; line-height: 1.55; padding-bottom: 8px; }
.tablewrap { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
.tablewrap table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.tablewrap th, .tablewrap td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: top; }
.tablewrap th { position: sticky; top: 0; background: var(--surface-2); font-weight: 700; }
.events { display: flex; flex-direction: column; gap: 10px; }
.event { padding: 12px 14px; border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.event small { color: var(--muted); font-size: 13.5px; }
.event p { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; }
.rich h3, .rich h4, .rich h5, .rich h6 { margin: 14px 0 6px; line-height: 1.25; }
.rich h3 { font-size: 1.2em; } .rich h4 { font-size: 1.08em; } .rich h5, .rich h6 { font-size: 1em; }
.rich blockquote { margin: 8px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--muted); }
.rich hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.rich li.task { list-style: none; margin-left: -18px; display: flex; gap: 8px; align-items: baseline; }
.rich .box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--muted); flex: none; transform: translateY(2px); }
.rich .box.on { background: var(--ink); border-color: transparent; }
.rich pre.code { margin: 8px 0; }

/* ---------- sheets, lists, forms (menu screens) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0); z-index: 50; display: flex; align-items: flex-end; justify-content: center; transition: background .25s; }
.scrim.open { background: rgba(30, 25, 20, .28); }
.sheet { width: 100%; max-width: 680px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--bg-2); border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b)); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .9, .3, 1); }
.scrim.open .sheet { transform: none; }
.grab { width: 36px; height: 5px; border-radius: 3px; background: var(--surface-2); margin: 4px auto 8px; }
.sheethead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.sheethead h2 { font-size: 20px; font-weight: 800; }
.sheetbody { overflow-y: auto; padding-bottom: 8px; }
@media (min-width: 720px) { .scrim { align-items: center; } .sheet { border-radius: 22px; max-width: 540px; } }
.drawer-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0); transition: background .2s; }
.drawer-scrim.open { background: rgba(30, 25, 20, .25); }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(84vw, 340px); background: var(--bg-2); border-right: 1px solid var(--line);
  padding: calc(16px + var(--safe-t)) 12px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; transform: translateX(-100%); transition: transform .22s cubic-bezier(.2, .9, .3, 1); }
.drawer-scrim.open .drawer { transform: none; }
.hubcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); }
.hubicon { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.hubcard b, .mi b { display: block; font-weight: 700; }
.hubcard small, .mi small { display: block; color: var(--muted); font-size: 13px; }
.drawer nav { display: flex; flex-direction: column; margin-top: 6px; }
.mi { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; }
.mi:active { background: var(--surface); }
.mi em { font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: var(--badge); padding: 2px 8px; border-radius: 999px; }
.foot { margin-top: auto; color: var(--muted); font-size: 12px; text-align: center; }
.list { display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; overflow: hidden; margin: 10px 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; border-bottom: 1px solid var(--line); text-align: left; }
.item:last-child { border-bottom: 0; }
button.item:active, .item > button.grow:active { background: var(--surface-2); }
.item b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.item b.light { font-weight: 500; }
.item .sub, .item small { display: block; color: var(--muted); font-size: 14px; margin-top: 1px; }
.item.paused, .item.done { opacity: .55; }
.hicon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); padding: 2px 7px; border-radius: 4px; }
.tag.warn { color: var(--warn); }
.tick { color: var(--ok); }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); flex: none; position: relative; }
.iconbtn .badge { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; min-width: 0; padding: 0; }
.empty { color: var(--muted); text-align: center; padding: 20px 10px; }
.facts { display: grid; grid-template-columns: 70px 1fr; gap: 10px 12px; margin: 6px 0 8px; font-size: 15px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; }
.snoozes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.days { display: flex; gap: 6px; }
.days .day { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: 14px; display: grid; place-items: center; margin: 0; color: var(--ink-2); }
.days .day.on { background: var(--primary); color: #fff; }
.segmented { display: flex; background: var(--surface); border-radius: 10px; padding: 3px; gap: 2px; margin: 8px 0; }
.segmented button { flex: 1; padding: 8px 6px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.segmented button.on { background: var(--surface-2); color: var(--ink); }
.brain { padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: var(--surface); color: var(--muted); margin: 6px 0; }
.search input { flex: 1; border: 0; background: none; padding: 12px 0; outline: none; color: var(--ink); }
.star { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); opacity: .5; flex: none; }
.star.on { color: var(--warn); opacity: 1; }
.star.on .icon { fill: currentColor; }
.evidence { margin: 12px 0; padding: 4px 12px; border-left: 4px solid var(--line); font-size: 14px; color: var(--ink-2); }
.history .old { font-size: 14px; color: var(--muted); padding: 4px 0; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-2); position: relative; flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch.on { background: var(--ok); }
.switch.on i { transform: translateX(18px); }
.stepper { display: inline-flex; align-items: center; gap: 18px; background: var(--surface); border-radius: 999px; padding: 4px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); font-size: 20px; text-align: center; }
.stepper b { min-width: 24px; text-align: center; font-size: 18px; }
.paircode { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; margin: 14px 0; border-radius: 14px; background: var(--surface); text-align: center; }
.paircode b { font-family: var(--mono); font-size: 30px; letter-spacing: .08em; }
.paircode small { color: var(--muted); }
.paircode .qr { background: #fff; padding: 8px; border-radius: 10px; margin-bottom: 8px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, transparent); font-size: 14px; margin: 10px 0; }
.notice .icon { color: var(--warn); margin-top: 2px; }
pre.code, pre.output { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; background: var(--surface); padding: 12px; border-radius: 10px; overflow: auto; max-height: 46vh; white-space: pre; }
pre.output { white-space: pre-wrap; }
.activity { display: flex; flex-direction: column; gap: 10px; }
.activity .act { display: flex; gap: 12px; font-size: 14px; color: var(--ink-2); }
.acttime { color: var(--muted); width: 110px; flex: none; font-size: 13px; }
.link { color: var(--blue); font-size: 14px; font-weight: 600; padding: 8px 0; }
.link.danger { color: var(--danger); }
label, .label { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
label > span, .label > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: none; font-size: 17px; appearance: none; }
.field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--mention-bg); }
textarea.field { resize: vertical; line-height: 1.4; }
.field.code { font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; font-size: 20px; text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-weight: 650; font-size: 16px; }
.btn.big { width: 100%; padding: 15px; margin-top: 12px; border-radius: 18px; }
.btn.small { padding: 7px 12px; font-size: 14px; white-space: nowrap; flex: none; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { background: var(--surface); width: 100%; margin-top: 6px; }
.btn.small.ghost { width: auto; margin-top: 0; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { color: var(--danger); }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.error { color: var(--danger); font-size: 14px; margin: 4px 0 0; }
.error:empty { display: none; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(170px + var(--safe-b)); transform: translate(-50%, 16px); opacity: 0; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 100; transition: all .25s; max-width: 90%; text-align: center; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.err { background: var(--danger); color: #fff; }
.jump-results { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.jump-results > small { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 12px 4px 4px; }
.jump-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; text-align: left; }
.jump-row:active, .jump-row:hover { background: var(--surface); }
.jump-row .hash { width: 28px; text-align: center; color: var(--muted); font-size: 20px; font-weight: 600; }
.jump-row b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump-row small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- pairing ---------- */
.pairing { padding: calc(40px + var(--safe-t)) 24px 40px; max-width: 440px; margin: 0 auto; }
.pairing .mark img { border-radius: 18px; }
.pairing h1 { font-size: 34px; font-weight: 800; margin: 18px 0 6px; }
.lede { font-size: 17px; color: var(--ink-2); margin: 0 0 22px; }
.promises { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.promises li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.promises b { color: var(--ink); }
.pairform { background: var(--bg-2); border: 1px solid var(--line); padding: 6px 18px 18px; border-radius: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================================================================
   Faces: simple shapes, expressive eyes. The face acts out the state:
   idle (blinks), thinking (glances around), working (busy bob + scanning),
   waiting (looks at you, warm ring), blocked (sleepy, faded), done (happy).
   ====================================================================== */
.face {
  /* clay: the teammate's color, softened toward warm sand, lit from the top left */
  --s: 44px; --clay: color-mix(in oklab, var(--c) 42%, #e9dccb); position: relative; width: var(--s); height: var(--s); flex: none;
  display: inline-grid; place-items: center; color: #fff; border-radius: 50% 50% 46% 46% / 56% 56% 44% 44%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, .7) 0, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 50% 120%, color-mix(in oklab, var(--clay) 70%, #5a4632) 0, transparent 60%),
    var(--clay);
  box-shadow: inset 0 -3px 6px rgba(90, 65, 40, .16), inset 0 2px 3px rgba(255, 255, 255, .5), 0 3px 8px rgba(90, 65, 40, .14);
  transition: --c .6s ease, filter .3s;
}
.face::after { /* a small smile */
  content: ""; position: absolute; left: 50%; top: 56%; width: calc(var(--s) * .12); height: calc(var(--s) * .05); transform: translateX(-50%);
  border-bottom: max(1.5px, calc(var(--s) * .028)) solid #3b2d22; border-radius: 0 0 50% 50%; opacity: .75;
}
.face.ghost { background: none; border: 1.5px dashed var(--line); color: var(--muted); box-shadow: none; }
.face.ghost::after { display: none; }
.eyes { display: flex; gap: calc(var(--s) * .17); transform: translateY(calc(var(--s) * -.03)); }
.eye { width: calc(var(--s) * .075); height: calc(var(--s) * .095); border-radius: 50%; background: #2a211a; display: block; transform-origin: center; }

.face.idle .eye { animation: blink 5.5s infinite; }

/* The prop: a little badge with what the teammate does. Now and then it shows off; while working it goes for it. */
.prop {
  position: absolute; right: calc(var(--s) * -.2); bottom: calc(var(--s) * -.16); width: calc(var(--s) * .56); height: calc(var(--s) * .56);
  display: grid; place-items: center; pointer-events: none;
}
.prop .em { width: 100%; height: 100%; display: grid; place-items: center; font-size: calc(var(--s) * .4); line-height: 1;
  animation: var(--pa, none) 5s ease-in-out infinite; transform-origin: 50% 60%; filter: drop-shadow(0 2px 2px rgba(60, 40, 20, .22)); }
.prop .em img { width: 100%; height: 100%; object-fit: contain; display: block; }
.face.working .prop .em, .face.thinking .prop .em { animation-duration: 1.1s; }
.face.blocked .prop { filter: grayscale(1) opacity(.7); }
.face.blocked .prop .em, .face.waiting .prop .em { animation: none; }
.m-lift { --pa: lift; } .m-sweep { --pa: sweep; } .m-fly { --pa: fly; } .m-flip { --pa: flip; } .m-ring { --pa: ring; }
.m-flick { --pa: flick; } .m-flicker { --pa: flicker; } .m-hop { --pa: hop; } .m-beat { --pa: beat; } .m-wiggle { --pa: wiggle; }
.m-flicker .em { animation-duration: 1.6s; }
@keyframes lift { 0%, 34%, 100% { transform: translateY(14%) rotate(0); } 8%, 12% { transform: translateY(-22%) rotate(-8deg); } 20%, 24% { transform: translateY(-22%) rotate(8deg); } }
@keyframes sweep { 0%, 40%, 100% { transform: translate(0, 0); } 10% { transform: translate(-14%, -12%); } 20% { transform: translate(14%, -12%); } 30% { transform: translate(10%, 12%); } }
@keyframes fly { 0%, 45%, 100% { transform: translate(0, 0); opacity: 1; } 20% { transform: translate(90%, -90%); opacity: 0; } 21% { transform: translate(-90%, 90%); opacity: 0; } 35% { transform: translate(0, 0); opacity: 1; } }
@keyframes flip { 0%, 30%, 100% { transform: rotateY(0); } 15% { transform: rotateY(180deg); } }
@keyframes ring { 0%, 30%, 100% { transform: rotate(0); } 5% { transform: rotate(18deg); } 10% { transform: rotate(-16deg); } 15% { transform: rotate(12deg); } 20% { transform: rotate(-8deg); } }
@keyframes flick { 0%, 30%, 100% { transform: scaleX(1); } 10% { transform: scaleX(-.2); } 20% { transform: scaleX(1); } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(.94, 1.1); } 50% { transform: scale(1.05, .95); } 75% { transform: scale(.97, 1.06); } }
@keyframes hop { 0%, 30%, 100% { transform: translateY(0); } 10% { transform: translateY(-24%); } 20% { transform: translateY(0); } 25% { transform: translateY(-8%); } }
@keyframes beat { 0%, 30%, 100% { transform: scale(1); } 8% { transform: scale(1.22); } 16% { transform: scale(1); } 22% { transform: scale(1.15); } }
@keyframes wiggle { 0%, 30%, 100% { transform: rotate(0); } 8% { transform: rotate(-14deg); } 16% { transform: rotate(12deg); } 24% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .prop .em { animation: none !important; } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.face.thinking .eyes { animation: glance 2.6s ease-in-out infinite; }
@keyframes glance { 0%, 100% { transform: translate(0, calc(var(--s) * -.04)); } 30% { transform: translate(calc(var(--s) * -.07), calc(var(--s) * -.1)); } 65% { transform: translate(calc(var(--s) * .07), calc(var(--s) * -.1)); } }

.face.working { animation: bob .9s ease-in-out infinite; }
.face.working .eyes { animation: scan 1.1s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6%) rotate(-3deg); } }
@keyframes scan { 0%, 100% { transform: translate(calc(var(--s) * -.06), calc(var(--s) * -.02)); } 50% { transform: translate(calc(var(--s) * .06), calc(var(--s) * -.02)); } }

.face.waiting { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--warn); animation: ask 1.8s ease-in-out infinite; }
.face.waiting .eye { transform: scale(1.18); }
@keyframes ask { 50% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 7px color-mix(in srgb, var(--warn) 40%, transparent); } }

.face.blocked { filter: saturate(.25) brightness(.85); }
.face.blocked .eye { height: calc(var(--s) * .04); border-radius: 2px; margin-top: calc(var(--s) * .06); }

.face.done .eye { background: none; border: max(1.5px, calc(var(--s) * .03)) solid #2a211a; border-bottom: 0; border-radius: 50% 50% 0 0; height: calc(var(--s) * .06); width: calc(var(--s) * .11); }
.face.done { animation: pop .5s ease-out 1; }
@keyframes pop { 40% { transform: scale(1.12); } }


/* ---------- tiles ---------- */
.tile { margin: 6px 0 4px; padding: 14px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); max-width: 420px; }
.tile .tt, .tile small { color: var(--muted); font-size: 12.5px; }
.tile .big { font-size: 44px; font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
.tile.weather { background: linear-gradient(160deg, color-mix(in srgb, #5B8CFF 22%, var(--surface)), var(--surface)); }
.wtop { display: flex; justify-content: space-between; gap: 12px; }
.wsum { color: var(--ink-2); font-size: 15px; }
.wside { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--ink-2); padding-top: 18px; white-space: pre; }
.tile.weather.compact .big { font-size: 30px; }
.hours { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; }
.hour { flex: 1; min-width: 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 35%, transparent); }
.hour b { font-size: 14px; font-weight: 600; }
.hour i { width: 18px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #5B8CFF var(--r), var(--surface-2) var(--r)); }
.hour i.dry { background: var(--surface-2); }
.tile.places { padding: 8px; }
.tile.places .tt { display: block; padding: 6px 8px 2px; }
.place { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; text-decoration: none; color: inherit; }
a.place:active { background: var(--surface-2); }
.place .n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.place b { display: block; font-weight: 600; font-size: 15px; }
.place small { display: block; }
.ci { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.ci .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--muted); display: grid; place-items: center; flex: none; }
.ci.done { color: var(--muted); text-decoration: line-through; }
.ci.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.tile.stat span { color: var(--ink-2); font-size: 14px; }

.face.waiting { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--warn); }
.tile { border-radius: 20px; }

/* ---------- mini apps ---------- */
.appicon { width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; border-radius: calc(var(--s) * .28);
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 70%, #000)); color: #fff; font-weight: 800; font-size: calc(var(--s) * .45); }
.appcard { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; margin: 6px 0 2px; padding: 10px 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.appcard b { display: block; font-size: 16px; }
.appcard small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13px; }
.openpill { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.appscreen { background: #1a1d21; }
.appframe { position: absolute; inset: 0; padding-top: calc(var(--safe-t) + 68px); display: flex; }
.appframe iframe { flex: 1; width: 100%; border: 0; background: #1a1d21; }
.appframe p { margin: auto; }
/* Pinned apps: iPhone-style widgets under the shortcut tiles. The app fills the rounded box; its title sits underneath. */
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; padding: 4px 16px 18px; container-type: inline-size; }
#htiles:has(+ #pins .widgets) .tiles { border-bottom: 0; padding-bottom: 14px; }
.widget { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.widget.wide, .widget.large { grid-column: 1 / -1; }
.wbody { aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); display: flex; }
.widget.wide .wbody { aspect-ratio: auto; height: calc((100cqw - 14px) / 2); }
.widget.large .wbody { aspect-ratio: auto; height: min(100cqw, 380px); }
.wbody iframe { flex: 1; width: 100%; height: 100%; border: 0; background: transparent; }
.wbody p { margin: auto; font-size: 13px; }
.wcap { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }

/* In-app notifications (a teammate finished while you were elsewhere). */
#banners { position: fixed; top: calc(var(--safe-t) + 8px); left: 50%; transform: translateX(-50%); width: min(94vw, 440px); z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.banner { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 20px; text-align: left;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 12px 34px rgba(30, 25, 20, .16); border: 1px solid var(--line); transform: translateY(-120%); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), opacity .25s; }
.banner.show { transform: translateY(0); opacity: 1; }
.banner b { display: block; font-size: 15px; }
.banner small { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.facebtn { padding: 0; border-radius: 30%; }
.badgepreview { display: grid; place-items: center; padding: 8px 0 18px; }
.emojigrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 14px; }
.emojibtn { font-size: 24px; aspect-ratio: 1; border-radius: 12px; background: var(--surface); display: grid; place-items: center; }
.emojibtn:active { background: var(--surface-2); transform: scale(.94); }
.emojifield { font-size: 26px; text-align: center; }

/* ---------- the stage: the teammate who's talking, centered at the top (morphs when someone else takes over) ---------- */
.toprow.stagerow { position: relative; align-items: flex-start; justify-content: space-between; height: 108px; }
.stage { position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; max-width: 58%; }
.stage .face { z-index: 1; }
.stagepill { display: inline-flex; align-items: center; gap: 6px; margin-top: -8px; padding: 7px 14px 6px; border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow); font-size: 15.5px; white-space: nowrap; max-width: 100%; }
.stagepill b { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.stagepill .minis { display: inline-flex; margin-right: 2px; }
.stagepill .minis .face { margin-left: -5px; box-shadow: 0 0 0 1.5px var(--card); }
.stagepill .minis .face::after { display: none; }
.stage small { margin-top: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.screen:has(.stagerow) .scroll { padding-top: calc(132px + var(--safe-t)); }
.chrome-top:has(.stagerow) { background: linear-gradient(var(--bg) 88%, color-mix(in srgb, var(--bg) 0%, transparent)); padding-bottom: 26px; }
.screen:has(.stagerow) .scroll { padding-top: calc(146px + var(--safe-t)); }
.face.morph { animation: morph .7s cubic-bezier(.3, 1.4, .5, 1) 1; }
@keyframes morph { 0% { transform: scale(1); } 25% { transform: scale(1.18, .78) translateY(8%); } 55% { transform: scale(.9, 1.12) translateY(-6%); } 100% { transform: scale(1); } }

/* ---------- 3D emoji ---------- */
.e3d { display: inline-grid; place-items: center; width: 100%; height: 100%; line-height: 1; }
.e3d img { width: 100%; height: 100%; object-fit: contain; display: block; }
.emojibtn .e3d { width: 30px; height: 30px; font-size: 24px; }

/* ---------- Ideas (Home) ---------- */
.bigtitle { font-size: 30px; font-weight: 700; letter-spacing: -.02em; padding: 6px 18px 4px; }
.ideas { padding-bottom: 10px; }
.idea { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.idea:last-child { border-bottom: 0; }
.ideaicon { width: 46px; height: 46px; flex: none; font-size: 36px; display: inline-grid; place-items: center; filter: drop-shadow(0 3px 4px rgba(60, 40, 20, .18)); }
.ideaicon img { width: 100%; height: 100%; object-fit: contain; }
.ideaicon.small { width: 28px; height: 28px; font-size: 22px; }
.idea b { display: block; font-size: 18px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.idea p { margin: 4px 0 0; font-size: 16px; line-height: 1.45; color: var(--muted); }
.ideabtns { display: flex; gap: 8px; margin-top: 10px; }
.aboutcard { background: var(--card); box-shadow: var(--shadow); border-radius: 20px; padding: 14px 16px; margin: 4px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.aboutcard .row b { font-size: 17px; }
.abouttext .rich { font-size: 15.5px; }
.ideabtns .btn { width: auto; flex: none; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 650; }

/* several teammates at work: they share the stage */
.stage.crowd { gap: 0; }
.crowdfaces { display: flex; align-items: flex-end; }
.crowdface { padding: 0; margin: 0 3px; border-radius: 50%; }
.crowdface .face { --s: 46px; }
.crowdface:nth-child(2) .face { animation-delay: .15s; } .crowdface:nth-child(3) .face { animation-delay: .3s; }
.stage.crowd .stagepill { margin-top: -6px; }
/* threads in this ramble, at the top of a thread */
.threadtabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; scrollbar-width: none; }
.threadtabs::-webkit-scrollbar { display: none; }
.threadtab { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600; color: var(--ink-2); max-width: 70vw; }
.threadtab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threadtab.on { background: var(--ink); color: #fff; }
.threadtab .face::after { display: none; }
.tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.tdot.working, .tdot.queued { background: var(--ok); animation: pulse 1.4s infinite; }
.tdot.waiting, .tdot.blocked { background: var(--warn); }
.tdot.failed { background: var(--danger); }

.typing.live { width: 100%; text-align: left; }
.typing.live span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.typing.live time { flex: none; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }

/* ---------- people map ---------- */
.pmap { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; margin: 18px auto 34px; }
.plines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pspoke { stroke-width: .5; opacity: .45; }
.plink { stroke-width: .4; stroke-dasharray: 1.4 1.2; opacity: .8; }
.pnode { position: absolute; transform: translate(-50%, -26%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; padding: 0; }
.pnode b { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.pnode small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; margin-top: -2px; }
.pnode.you { transform: translate(-50%, -36%); }
.pnode.you small { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.pdot { --s: 40px; --c: #a99d90; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none; overflow: visible;
  background: radial-gradient(circle at 34% 26%, color-mix(in oklab, var(--c) 25%, #fff) 0, color-mix(in oklab, var(--c) 55%, #f3ebe1) 60%, color-mix(in oklab, var(--c) 70%, #c9b8a3) 100%);
  box-shadow: inset 0 -2px 4px rgba(90, 65, 40, .14), 0 3px 8px rgba(90, 65, 40, .14); }
.pdot b { font-size: calc(var(--s) * .42); font-weight: 700; color: color-mix(in oklab, var(--c) 60%, #2a211a); }
.pdot .e3d { width: 70%; height: 70%; font-size: calc(var(--s) * .5); }
.plegend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 2px 0 14px; font-size: 12.5px; color: var(--muted); }
.plegend span { display: inline-flex; align-items: center; gap: 5px; }
.plegend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.phero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 10px; }
.phero b { font-size: 22px; }
.phero small { color: var(--muted); font-size: 15px; }
.pnotes { margin: 0 0 8px; padding-left: 20px; color: var(--ink-2); line-height: 1.5; }
.pempty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 10px; color: var(--muted); }
.pempty .ideaicon { width: 64px; height: 64px; }

.steps { padding-left: 20px; margin: 4px 0 12px; color: var(--ink-2); line-height: 1.55; }
.steps li { margin-bottom: 4px; }
p.err { color: var(--danger); margin: 6px 2px 0; }

/* ---------- boards ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 24px; scrollbar-width: none; align-items: flex-start; }
.board::-webkit-scrollbar { display: none; }
.bcol { flex: none; width: min(78vw, 300px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; background: var(--bg-2); border-radius: 22px; padding: 12px 10px 12px; }
.bhead { display: flex; align-items: center; gap: 8px; padding: 0 4px 2px; }
.bhead b { flex: 1; font-size: 16px; }
.bhead em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--card); border-radius: 999px; padding: 1px 9px; }
.bcard { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; background: var(--card); border-radius: 16px; padding: 11px 12px; box-shadow: var(--shadow); }
.bcard:active { transform: scale(.985); }
.btop { display: flex; align-items: flex-start; gap: 8px; }
.btop .face { margin-top: 1px; }
.btop .face::after { display: none; }
.btop b { font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.bline { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.bline span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bline time { font-variant-numeric: tabular-nums; }
.bline.warn { color: var(--warn); }
.bcard.failed b { color: var(--danger); }
.bcard.done b { color: var(--ink-2); }
.bcol.needsYou .bcard { box-shadow: var(--shadow), inset 3px 0 0 var(--warn); }
.bcol.working .bcard { box-shadow: var(--shadow), inset 3px 0 0 var(--ok); }
.bempty { margin: 6px 6px 4px; font-size: 13.5px; color: var(--muted); }
.badd { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 14px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; border: 1.5px dashed var(--surface-2); }
@media (min-width: 980px) { .bcol { width: 300px; } }
@media (max-width: 699px) {
  .board { flex-direction: column; overflow: visible; scroll-snap-type: none; align-items: stretch; }
  .bcol { width: 100%; }
}

/* ---------- dictation (Wispr Flow style): a panel where the keyboard would be ---------- */
.dictate { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 10px; padding: 14px 16px 18px; border-radius: 28px;
  background: var(--bg-2); box-shadow: var(--shadow); transform: translateY(16px); opacity: 0; transition: transform .25s ease, opacity .2s; }
.dictate.open { transform: none; opacity: 1; }
.drow { display: flex; justify-content: space-between; width: 100%; }
.dbtn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.dbtn.done { background: var(--ink); color: #fff; }
.dwave { display: flex; align-items: center; gap: 6px; height: 64px; margin-top: -8px; }
.dwave i { --h: .15; width: 7px; height: calc(64px * var(--h)); border-radius: 4px; background: var(--ink); transition: height .08s linear; }
.dlabel { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.dclock { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.composer textarea.cleaning { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 8%, transparent), transparent); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .dwave i { transition: none; } }

.wbody { position: relative; }
.wframe { flex: 1; display: flex; }
.wtap { position: absolute; inset: 0; border-radius: inherit; }
.wtap:active { background: rgba(30, 25, 20, .06); }

/* a fresh ramble: what's going on */
.nowsec h4 { margin: 18px 4px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nowcard { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.nowrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.nowrow:last-child { border-bottom: 0; }
.nowrow:active { background: var(--bg-2); }
.nowrow b { display: block; font-size: 15.5px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrow small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrow > .icon { color: var(--muted); }
.nowrow .face::after { display: none; }

/* ---------- maps: one stop at a time ---------- */
.tile.map { padding: 0; overflow: hidden; }
.tile.map > .tt { display: block; padding: 12px 14px 0; }
.tile.places .mapwrap { margin: 4px 0 8px; }
.mapbox { position: relative; height: 210px; overflow: hidden; background: #e9ecef; }
.tile.map .mapbox { margin-top: 10px; }
.tile.places .mapbox { border-radius: 14px; }
.mstage { position: absolute; inset: 0; touch-action: pan-y; }
.mstage.in { animation: mfade .45s ease; }
@keyframes mfade { from { opacity: .3; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.mtile { position: absolute; width: 256px; height: 256px; user-select: none; pointer-events: none; filter: saturate(.5) contrast(.95) brightness(1.05); }
.mpinbig { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -88%); animation: mdrop .5s cubic-bezier(.3, 1.5, .5, 1); filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
@keyframes mdrop { from { transform: translate(-50%, -160%); opacity: 0; } }
.mroute { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.mroute path { fill: none; stroke: #1d1b19; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.mpin { position: absolute; transform: translate(-50%, -50%); padding: 0; }
.mpin span { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); border: 2px solid var(--ink); }
.mpin.cur span { background: var(--ink); color: #fff; }
.mtoggle { position: absolute; left: 10px; top: 10px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.95); font-size: 12.5px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.mattr { position: absolute; right: 6px; bottom: 6px; font-size: 9px; color: rgba(0,0,0,.5); background: rgba(255,255,255,.7); padding: 0 4px; border-radius: 3px; }
.mcardline { display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px; }
.mlabel { flex: 1; min-width: 0; }
.mlabel small { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.mlabel b { display: block; font-size: 16.5px; line-height: 1.3; color: var(--ink); margin-top: 1px; }
.mopenlink { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; }
.mnav { display: flex; align-items: center; gap: 6px; flex: none; }
.mnav .mcount { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.mbtn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); }
.mdots { display: flex; justify-content: center; gap: 6px; padding: 2px 0 12px; }
.mdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-2); cursor: pointer; transition: width .2s, background .2s; }
.mdots i.on { width: 16px; border-radius: 3px; background: var(--ink); }
/* ---------- artifacts: one-off interactive pieces inside an answer ---------- */
.artifact { margin: 8px 0 4px; border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); max-width: 720px; }
.artframe iframe { display: block; width: 100%; height: 320px; border: 0; background: transparent; transition: height .2s ease; }
.artframe p { padding: 30px 0; margin: 0; }
.artfoot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.artfoot b { font-weight: 650; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artfoot small { color: var(--muted); }
.artfoot .linkbtn { margin-top: 0; font-size: 13.5px; color: var(--ink); }
.mleg { position: absolute; transform: translate(-50%, -50%); padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.18); z-index: 1; }
.mlegline { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* ---- Linked computers: where work runs ---- */
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.bars i { width: 4px; border-radius: 1.5px; background: var(--line); }
.bars i:nth-child(1) { height: 25%; } .bars i:nth-child(2) { height: 50%; } .bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }
.bars.online i.on { background: var(--ok); }
.bars.asleep i.on { background: var(--warn); }
.linkstrip { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 4px 16px 2px; padding: 10px 14px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; font-size: 14px; color: var(--ink-2); }
.linkstrip b { color: var(--ink); font-weight: 650; }
.linkstrip .lsicon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none; }
.linkstrip.online .lsicon { background: color-mix(in oklab, var(--ok) 14%, transparent); color: var(--ok); }
.linkstrip.asleep .lsicon, .linkstrip.offline .lsicon { background: var(--surface); color: var(--muted); }
.linkstrip > svg:last-child { color: var(--muted); flex: none; }
.linkstrip.signedout { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in oklab, var(--danger) 45%, transparent); }
.linkstrip.signedout .lsicon { background: color-mix(in oklab, var(--danger) 14%, transparent); color: var(--danger); }
.linkstrip.signedout .btn { flex: none; pointer-events: none; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.cchead { display: flex; align-items: center; gap: 12px; }
.cchead .grow { display: flex; flex-direction: column; gap: 1px; }
.cchead b { font-size: 16px; }
.ccicon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); flex: none; }
.cdot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--card); background: var(--muted); }
.cdot.online { background: var(--ok); }
.cdot.asleep { background: var(--warn); }
.cstate { font-size: 12px; font-weight: 650; color: var(--muted); }
.cstate.online { color: var(--ok); }
.cstate.asleep { color: var(--warn); }
.ccsub { margin: 0; font-size: 13px; color: var(--ink-2); }
.ccard.offline .ccsub { color: var(--muted); }
.ccbrains { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ccbrains small, .cclabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cccopy { display: flex; flex-direction: column; gap: 6px; }
.cccopy .list { margin: 0; }
.copyrow { width: 100%; text-align: left; }
.copyrow:disabled { opacity: .6; }
.ccard > .btn { align-self: flex-start; }
.ccinfo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.codeline { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; }
.codeline code { flex: 1; font: 12.5px var(--mono); overflow-x: auto; white-space: nowrap; }
.ccbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.ccard .ccsub.err { color: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 96px; gap: 8px; }
.field.mono { font: 13px/1.4 var(--mono); }
.sheetbody > .field, .sheetbody > .row2, .sheetbody > select.field { margin: 6px 0; }

/* A webhook plan's secret URL wraps instead of running off the sheet. */
.hookurl { min-width: 0; }
.hookurl .codeline { max-width: 100%; }
.hookurl .codeline code { white-space: normal; word-break: break-all; text-align: left; }
.hookurl small { display: block; margin-top: 4px; }

/* Connectors: app-store style list of things teammates can read (Gmail, Calendar…). */
.connectors .search { margin-bottom: 4px; }
.ctile { display: inline-grid; place-items: center; flex: none; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(30, 25, 20, .08); }
.ctile-pair { display: inline-flex; gap: 8px; margin-bottom: 6px; }
.crow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.crow:last-child { border-bottom: 0; }
.crow b { display: block; font-weight: 700; }
.crow small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.clink { color: var(--blue); font-weight: 700; font-size: 16px; padding: 6px 2px; }
.csoon { color: var(--muted); font-size: 13px; font-weight: 600; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
.cfeatured { display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; overflow: hidden; margin: 10px 0; }
.cfeat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.cfeat:last-child { border-bottom: 0; }
.cfeat b { display: block; font-size: 18px; font-weight: 700; }
.cfeat small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.okline { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; margin: 6px 0; }
.crow small.err { color: var(--danger); }

.auditlog { margin: 6px 0; }
.auditlog summary { cursor: pointer; padding: 6px 2px; }
.auditlog .list { margin-top: 6px; }

/* The connector grid (connectors.ts): brains, keys and accounts as tiles you tap to add. */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.cgtile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; min-height: 148px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-align: left; box-shadow: var(--shadow); }
.cgtile:active { transform: scale(.98); }
.cgtile b { font-weight: 700; margin-top: 4px; }
.cgtile small { color: var(--muted); font-size: 13px; line-height: 1.3; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cgstate { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--surface); color: var(--ink); }
.cgstate.connected { background: rgba(47, 158, 107, .12); color: var(--ok); }
.cgstate.needs-you { background: rgba(217, 138, 28, .14); color: var(--warn); }
.cgstate.not-installed { color: var(--muted); }
.cgtile.not-installed { opacity: .6; }
.cgrisk { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: rgba(217, 138, 28, .16); color: var(--warn);
  font: 800 12px/18px var(--font); text-align: center; }
.riskbox { background: rgba(217, 138, 28, .1); border-radius: 14px; padding: 12px 14px; margin: 10px 0; color: #7a5313; }
.riskbox p { margin: 4px 0 0; font-size: 14px; }
.ubars { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 10px; }
.ubar-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; }
.ubar-track { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; margin: 5px 0 3px; }
.ubar-track i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.ubar-track i.warm { background: var(--warn); } .ubar-track i.hot { background: var(--danger); }
.waqr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; width: 260px; margin: 8px auto; }
.waqr img { width: 100%; display: block; image-rendering: pixelated; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 13.5px; }
.chipx { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--muted); }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input { width: 20px; height: 20px; accent-color: var(--ink); }

/* "Finish setting up": grouped white rows on the sheet, like a settings page. Quiet type, one accent. */
.wlede { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 2px 2px 4px; }
.wlede b { color: var(--ink-2); font-weight: 600; }
.wsec { font-size: 13px; font-weight: 600; color: var(--muted); margin: 22px 4px 8px; }
.wcard { background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.wrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.wrow:first-child { border-top: 0; }
div.wrow { cursor: default; }
button.wrow:hover { background: var(--bg); }
.wrow b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.wrow small { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow .grow { min-width: 0; }
.wrow .ctile { border-radius: 9px; flex: none; }
.wdev { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); flex: none; }
.wdev.plus { background: none; border: 1.5px dashed var(--surface-2); color: var(--ink-2); }
.wst { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wst.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.wst.warn { color: var(--warn); }
.wadd { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.wcode:not(:empty) { margin-top: 10px; }
.wdone { width: 100%; margin-top: 24px; }

/* WhatsApp, linked: your chat list with Ignore on each row (like WhatsApp Web), rules under "More". */
.wa-head { display: flex; align-items: center; gap: 12px; padding: 2px 2px 4px; }
.wa-head .ctile { border-radius: 10px; flex: none; }
.wa-head b { display: block; font-size: 16px; font-weight: 650; }
.wa-head small { display: block; font-size: 13px; color: var(--muted); }
.wa-note { font-size: 13px; color: var(--muted); margin: 8px 2px 12px; }
.wa-search { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 15px; outline: none; appearance: none; }
.wa-search:focus { border-color: var(--surface-2); box-shadow: 0 0 0 3px var(--surface); }
.wa-tabs { display: flex; gap: 6px; margin: 10px 0; }
.wa-tab { font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.wa-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.wa-list { background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); max-height: 52dvh; overflow: auto; }
.wa-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-top: 1px solid var(--line); }
.wa-row:first-child { border-top: 0; }
.wa-row .grow { min-width: 0; }
.wa-top { display: flex; align-items: baseline; gap: 8px; }
.wa-top b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-top time { font-size: 12px; color: var(--muted); flex: none; }
.wa-row small { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.wa-row.off b, .wa-row.off .wa-av { opacity: .45; }
.wa-av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: 15px; }
.wa-av.g { background: var(--surface-2); }
.wa-btn { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; }
.wa-btn:hover { background: var(--bg); }
.wa-btn.on { background: var(--surface); border-color: transparent; color: var(--muted); }
.wa-link { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
a.item { color: inherit; text-decoration: none; }
.wa-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 14px; margin: 0; }
.wa-more { margin-top: 14px; }
.wa-more summary { font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; padding: 6px 2px; list-style: none; }
.wa-more summary::-webkit-details-marker { display: none; }
.wa-more summary::before { content: "›"; display: inline-block; width: 14px; transition: transform .15s; }
.wa-more[open] summary::before { transform: rotate(90deg); }
.wa-more .wcard { margin-top: 6px; }
.wa-rule { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.wa-rule:first-child { border-top: 0; }
.wa-rule b { display: block; font-size: 15px; font-weight: 600; } .wa-rule small { display: block; font-size: 13px; color: var(--muted); }
.wa-switch { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--surface-2); position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.wa-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.wa-switch:checked { background: var(--ok); } .wa-switch:checked::after { transform: translateX(16px); }
.wa-words { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.wa-unlink { font: inherit; font-size: 14px; font-weight: 600; color: var(--danger); background: none; border: 0; padding: 14px 2px 4px; cursor: pointer; }
.wa-relink { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; margin: 0 0 12px; }
.wa-relink b { display: block; font-size: 15px; font-weight: 650; } .wa-relink small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.wa-btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- desktop: sidebar + full-width main (wide windows, the Mac app) ---------- */
@media (min-width: 980px) {
  .app.desk { max-width: none; margin: 0; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .app.desk.split { max-width: none; grid-template-columns: 252px minmax(0, 1fr) 440px; }
  .app.desk .tabbar { display: none; }
  .app.desk .screen .scroll > * { max-width: 1040px; margin-left: auto; margin-right: auto; padding-left: 28px; padding-right: 28px; }
  .app.desk .chrome-top { padding-left: 28px; padding-right: 28px; }
  .app.desk .chrome-bottom { padding-left: 28px; padding-right: 28px; }
  .app.desk .chrome-bottom .composer-wrap { max-width: 1040px; width: 100%; margin: 0 auto; }
  .app.desk .fab { align-self: flex-end; }
}
.side { height: 100dvh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line); padding: 14px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sbrand { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px 12px; text-align: left; border-radius: 10px; }
.sbrand b { display: block; font-size: 16px; font-weight: 750; } .sbrand small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbrand .status { margin: 0 4px 0 0; }
.sbrains { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 12px; margin-top: -6px; }
.sbrain { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 12px; color: var(--ink-2); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.sbrain .bdot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.sbrain.ok .bdot { background: var(--ok); }
.sbrain.unknown .bdot { animation: pulse 1.4s infinite; }
.sbrain.bad { color: var(--danger); background: color-mix(in oklab, var(--danger) 10%, transparent); }
.sbrain.bad .bdot { background: var(--danger); }
.sbrain em { font-style: normal; font-weight: 650; }
.ssearch { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--muted); font-size: 14px; text-align: left; }
.ssearch kbd { font: 11px var(--font); color: var(--muted); background: var(--surface); padding: 1px 6px; border-radius: 5px; }
.sgroup { display: flex; flex-direction: column; gap: 1px; }
.snav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-align: left; }
.snav:hover { background: rgba(30, 25, 20, .04); }
.snav.on { background: rgba(30, 25, 20, .07); color: var(--ink); font-weight: 600; }
.snav .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snav em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--badge); border-radius: 999px; padding: 1px 7px; }
.snav svg { flex: none; opacity: .8; }
.shash { width: 18px; text-align: center; color: var(--muted); font-weight: 600; flex: none; }
.slabel { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); padding: 16px 10px 4px; }
.sadd { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.sadd:hover { background: rgba(30, 25, 20, .06); color: var(--ink); }
.snone { font-size: 13px; color: var(--muted); padding: 2px 10px; margin: 0; }
.sfoot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.snav.nested { padding-left: 34px; font-size: 14px; }
.semoji { width: 18px; text-align: center; font-size: 15px; flex: none; }
.scount { font-size: 12px; color: var(--muted); }
@media (min-width: 980px) { .app.desk .chrome-top [aria-label="Menu"] { visibility: hidden; } }

/* a project's page */
.pproj { padding-top: 8px; }
.phead { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; }
.phead h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.phead small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.phead .sbtn { display: inline-flex; align-items: center; gap: 6px; }
.pemoji { width: 52px; height: 52px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 28px; flex: none; color: var(--ink-2); }
.psec { margin-top: 26px; }
.psec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; }
.psec-head h3 { font-size: 15px; font-weight: 700; margin: 0; }
.shash.big { font-size: 18px; width: 22px; }
.wrow b.plain { font-weight: 500; white-space: normal; }

/* Activity sections: Working now / Needs you / Earlier */
.actsec h4 { display: flex; align-items: center; gap: 8px; margin: 18px 18px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.actsec h4 em { font-style: normal; font-size: 12px; background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; }
.actsec:first-child h4 { margin-top: 4px; }
.actmain .l2.live { display: flex; align-items: center; gap: 8px; }

/* shared links */
.notice { background: var(--surface); border-left: 3px solid var(--warn); padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 8px 0; }
.hicon.emoji { font-size: 22px; width: 30px; text-align: center; }
.sharelink { background: var(--surface); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.sharelink code { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.sharecard { background: var(--surface); border-radius: 12px; padding: 12px 14px; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.sharecard .title { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.sharecard p { margin: 0; }
.sharecard .files { display: flex; flex-direction: column; gap: 2px; }
.mono { font-family: var(--mono); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.dplus { color: #2f8f4e; } .dminus { color: var(--danger); }
pre.diff .add { color: #2f8f4e; } pre.diff .del { color: var(--danger); } pre.diff .hunk { color: var(--muted); }
.row.wrap { flex-wrap: wrap; }
.flabel { display: block; margin: 8px 0; }
.flabel > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 4px 2px; }
.dmhero .sharebtn { width: auto; margin: 10px auto 0; display: inline-flex; gap: 6px; align-items: center; }
.item.clickable { cursor: pointer; }
.switchbtn { padding: 4px; flex: none; display: flex; }
.item.clickable > .grow { min-width: 0; }
details.advanced { margin: 6px 0 4px; }
details.advanced summary { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 8px 2px; cursor: pointer; }
.linkcard { background: var(--surface); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; margin: 4px 0 10px; }
.linkhead { display: flex; align-items: center; gap: 12px; }
.linkhead .grow { min-width: 0; display: flex; flex-direction: column; }
.linkurl { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; }
.linkurl .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.stattiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 6px; }
.stattiles > div { background: var(--surface); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.stattiles b { font-size: 22px; line-height: 1.1; }
.stattiles small { color: var(--muted); font-size: 13px; }
.stattiles .hot b { color: var(--danger); }
.facticon { width: 24px; text-align: center; font-size: 17px; flex: none; }
.danger-text b { color: var(--danger); }
.mintstep { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 14px; margin: 8px 0; }
.mintstep > b { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; font-size: 14px; }

