/* John's Hub — design system. Warm paper / ink, one signal-orange accent, Funnel Display + Funnel Sans.
   Light + dark themes, motion that respects prefers-reduced-motion, mobile adjustments at the bottom. */

@font-face {
  font-family: 'Funnel Display';
  src: url('/fonts/display.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Funnel Sans';
  src: url('/fonts/text.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Funnel Sans';
  src: url('/fonts/text-ext.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #f2f0ea;
  --surface: #fbfaf7;
  --surface-2: #f4f2ec;
  --surface-3: #e9e6de;
  --glass: rgba(251, 250, 247, 0.74);
  --line: #e4e0d6;
  --line-strong: #d3cec1;
  --text: #121210;
  --text-2: #57544c;
  --text-3: #8c887d;
  --ink: #121210;
  --ink-text: #fbfaf7;
  --accent: #ff5b1f;
  --accent-text: #c2410c;
  --accent-soft: #ffeadf;
  --accent-line: #ffcdb5;
  --glow: rgba(255, 110, 50, 0.16);
  --good: #16a34a;
  --good-ink: #15803d;
  --good-soft: #e2f3e7;
  --critical: #e5484d;
  --critical-ink: #c42a30;
  --critical-soft: #fde7e7;
  --p1: #e5484d;
  --p2: #f97316;
  --p3: #3b82f6;
  --p4: #a8a499;
  --mention: #1f5fd6;
  --mention-soft: rgba(47, 111, 237, 0.16);
  --warn: #b45309;
  --warn-soft: #fdf0dc;
  /* Sleep stages (checked for colour-blind separation on --surface in each theme) */
  --sleep-deep: #4a40bf;
  --sleep-light: #2a88d6;
  --sleep-rem: #c0479a;
  --sleep-awake: #e0622c;
  --grain: 0.05;
  --shadow-sm: 0 1px 2px rgba(18, 16, 10, 0.05);
  --shadow: 0 1px 2px rgba(18, 16, 10, 0.04), 0 12px 32px -18px rgba(18, 16, 10, 0.22);
  --shadow-pop: 0 30px 70px -24px rgba(18, 16, 10, 0.38), 0 2px 8px rgba(18, 16, 10, 0.08);
  --r-xl: 30px;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 13px;
  --r-xs: 9px;
  --font: 'Funnel Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Funnel Display', 'Funnel Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --page-max: 1320px;
  --top-h: 74px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0d0d0c;
    --surface: #161614;
    --surface-2: #1d1d1a;
    --surface-3: #272723;
    --glass: rgba(22, 22, 20, 0.72);
    --line: #262622;
    --line-strong: #38372f;
    --text: #f3f1ea;
    --text-2: #b9b5a9;
    --text-3: #7f7c72;
    --ink: #f3f1ea;
    --ink-text: #121210;
    --accent: #ff6a2b;
    --accent-text: #ff8d5a;
    --accent-soft: #33190d;
    --accent-line: #5c2a14;
    --glow: rgba(255, 106, 43, 0.13);
    --good: #34c46a;
    --good-ink: #5ad48a;
    --good-soft: #10291a;
    --critical: #f0595e;
    --critical-ink: #ff8589;
    --critical-soft: #341518;
    --p1: #f0595e;
    --p2: #fb8c3c;
    --p3: #5b9bff;
    --p4: #6c6a62;
    --mention: #82adff;
    --mention-soft: rgba(110, 156, 255, 0.24);
    --warn: #f5b041;
    --warn-soft: #33250d;
    --sleep-deep: #5a52d6;
    --sleep-light: #3192d6;
    --sleep-rem: #c95aa8;
    --sleep-awake: #d95926;
    --grain: 0.07;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -18px rgba(0, 0, 0, 0.7);
    --shadow-pop: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d0d0c;
  --surface: #161614;
  --surface-2: #1d1d1a;
  --surface-3: #272723;
  --glass: rgba(22, 22, 20, 0.72);
  --line: #262622;
  --line-strong: #38372f;
  --text: #f3f1ea;
  --text-2: #b9b5a9;
  --text-3: #7f7c72;
  --ink: #f3f1ea;
  --ink-text: #121210;
  --accent: #ff6a2b;
  --accent-text: #ff8d5a;
  --accent-soft: #33190d;
  --accent-line: #5c2a14;
  --glow: rgba(255, 106, 43, 0.13);
  --good: #34c46a;
  --good-ink: #5ad48a;
  --good-soft: #10291a;
  --critical: #f0595e;
  --critical-ink: #ff8589;
  --critical-soft: #341518;
  --p1: #f0595e;
  --p2: #fb8c3c;
  --p3: #5b9bff;
  --p4: #6c6a62;
  --mention: #82adff;
  --mention-soft: rgba(110, 156, 255, 0.24);
  --warn: #f5b041;
  --warn-soft: #33250d;
  --sleep-deep: #5a52d6;
  --sleep-light: #3192d6;
  --sleep-rem: #c95aa8;
  --sleep-awake: #d95926;
  --grain: 0.07;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -18px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Film grain + a warm glow behind everything (fixed, painted once). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  pointer-events: none;
  top: -35vh;
  right: -15vw;
  width: 75vw;
  height: 80vh;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; font-weight: 650; }
p { margin: 0; }
img { max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.display { font-family: var(--display); letter-spacing: -0.03em; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--ink); animation: breathe 1.1s var(--ease) infinite alternate; }
@keyframes breathe { from { opacity: 0.35; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 650; font-size: 18px; letter-spacing: -0.03em; white-space: nowrap; }
.brand-mark {
  position: relative; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--ink);
  transition: transform 0.5s var(--spring);
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 7px;
  background:
    radial-gradient(circle at 22% 22%, var(--accent) 0 3.3px, transparent 3.8px),
    radial-gradient(circle at 78% 22%, var(--ink-text) 0 3.3px, transparent 3.8px),
    radial-gradient(circle at 22% 78%, var(--ink-text) 0 3.3px, transparent 3.8px),
    radial-gradient(circle at 78% 78%, var(--ink-text) 0 3.3px, transparent 3.8px);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 17px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform 0.25s var(--spring), background-color 0.2s, border-color 0.2s, box-shadow 0.3s var(--ease), color 0.2s;
}
.btn:hover { border-color: var(--text-3); text-decoration: none; }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(18, 16, 10, 0.55); }
.btn.primary:active { transform: scale(0.96); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn.danger { color: var(--critical-ink); }
.btn.danger:hover { background: var(--critical-soft); border-color: var(--critical); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; gap: 6px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.sm svg { width: 15px; height: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-3); cursor: pointer; flex: none;
  transition: background-color 0.2s, color 0.2s, transform 0.25s var(--spring);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 17px; height: 17px; }

.input, .field input, .field select, .field textarea, textarea.input, select.input {
  width: 100%; min-height: 42px; padding: 9px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  outline: none; transition: border-color 0.2s, box-shadow 0.25s var(--ease), background-color 0.2s;
}
select.input, .field select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.input, .field textarea { resize: vertical; line-height: 1.5; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-3); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.input::placeholder, textarea::placeholder, input::placeholder { color: var(--text-3); }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { font-weight: 400; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.fields { align-items: flex-end; }
.row.end.reverse { flex-direction: row-reverse; justify-content: flex-start; }
/* Grid containers get shrinkable columns, so long unbreakable lines (URLs, keys) scroll instead of overflowing. */
.stack, .field, .section-body, .platform-body, .auth-card, .modal, .news-empty, .steps { grid-template-columns: minmax(0, 1fr); }
.stack { display: grid; gap: 16px; }
.stack.tight { gap: 9px; }
.grow { flex: 1; min-width: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip:active { transform: scale(0.95); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1;
}
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 650; white-space: nowrap; letter-spacing: 0.005em;
}
.tag.critical { background: var(--critical-soft); color: var(--critical-ink); }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }
.tag.good { background: var(--good-soft); color: var(--good-ink); }
.tag.outline { background: transparent; border: 1px solid var(--line-strong); }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.seg button {
  border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 13px; color: var(--text-2); white-space: nowrap; transition: background-color 0.25s var(--ease), color 0.2s, box-shadow 0.25s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

.switch {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--surface-3); transition: background-color 0.25s var(--ease);
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.35s var(--spring);
}
.switch[aria-checked='true'] { background: var(--accent); }
.switch[aria-checked='true']::after { transform: translateX(18px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow.live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); animation: beacon 2.4s var(--ease) infinite;
}
@keyframes beacon { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 6%, transparent); } }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; padding: 14px 24px; view-transition-name: topbar;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), -webkit-backdrop-filter 0.35s, backdrop-filter 0.35s;
}
.topbar.scrolled {
  background-color: color-mix(in srgb, var(--bg) 78%, transparent); box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.topbar-inner { max-width: var(--page-max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.topbar .brand { justify-self: start; }
.nav {
  position: relative; display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
}
.nav a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px;
  border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; transition: color 0.3s var(--ease);
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--ink-text); }
.nav a svg { display: none; }
.nav .badge { margin-left: 1px; }
.nav-indicator {
  position: absolute; z-index: 0; top: 5px; left: 0; height: 36px; width: 0; border-radius: 999px; background: var(--ink);
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), opacity 0.2s;
}
.top-actions {
  justify-self: end; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
}
.presence-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px 0 5px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 600; transition: background-color 0.2s;
}
.presence-btn:hover { background: var(--surface-2); color: var(--text); }
.presence-btn > svg { width: 18px; height: 18px; margin-left: 5px; }
.presence-btn .label { display: inline-flex; align-items: center; gap: 6px; }
.presence-btn.is-live .label { color: var(--good-ink); }
/* One pulsing dot for the whole group instead of a dot on every overlapping face. */
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.live-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--good); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.avatar-stack { display: inline-flex; padding-left: 7px; }
.avatar-stack .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
/* The first (most recent) face sits on top. */
.avatar-stack .avatar:nth-child(1) { z-index: 6; }
.avatar-stack .avatar:nth-child(2) { z-index: 5; }
.avatar-stack .avatar:nth-child(3) { z-index: 4; }
.avatar-stack .avatar:nth-child(4) { z-index: 3; }
.avatar-stack .avatar:nth-child(5) { z-index: 2; }
.presence-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 11px; background: transparent;
  font: inherit; font-size: 14px; color: var(--text); text-decoration: none; text-align: left; cursor: pointer;
}
.presence-row:hover { background: var(--surface-2); text-decoration: none; }
.presence-row > svg { width: 18px; height: 18px; color: var(--text-3); margin: 0 3px; }
.presence-row .who { display: grid; min-width: 0; line-height: 1.25; }
.presence-row .who b { font-weight: 600; }
.presence-row .who small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.presence-row .when { margin-left: auto; padding-left: 16px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.main { min-width: 0; padding: 6px 24px 90px; }
.page { max-width: var(--page-max); margin: 0 auto; }
.page.fill { padding-bottom: 0; }
.tabbar { display: none; }

/* ---------- avatars ---------- */
.avatar {
  --c: var(--accent);
  --s: 28px;
  position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--c); color: #fff; font-size: 11.5px; font-weight: 700; flex: none; letter-spacing: 0; user-select: none;
}
.avatar.dark-ink { color: #1a1a19; }
.avatar.xs { --s: 20px; font-size: 9px; }
.avatar.sm { --s: 24px; font-size: 10.5px; }
.avatar.lg { --s: 36px; font-size: 13.5px; }
.avatar.xl { --s: 72px; font-size: 26px; }
/* Generated pictures: a soft gradient of the agent's colour with its glyph. */
.avatar.glyph { background: radial-gradient(circle at 30% 24%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 68%); }
.avatar.glyph > svg { width: 58%; height: 58%; }
.avatar.emoji { background: color-mix(in srgb, var(--c) 20%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.avatar.emoji .emo { font-size: calc(var(--s) * 0.56); line-height: 1; font-weight: 400; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.avatar.image { background: var(--surface-2); }
.avatar.image img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar[data-profile] { cursor: pointer; transition: transform 0.25s var(--spring), box-shadow 0.2s; }
.avatar[data-profile]:hover { transform: scale(1.08); }
[data-profile]:not(.avatar) { cursor: pointer; }
.msg-head .who[data-profile]:hover, .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.avatar.owner { background: var(--ink); color: var(--ink-text); }
.avatar.system { background: var(--surface-3); color: var(--text-2); }
.avatar.live::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: calc(var(--s) * 0.3); height: calc(var(--s) * 0.3); min-width: 7px; min-height: 7px; max-width: 14px; max-height: 14px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--surface); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.live { background: var(--good); }
.dot.accent { background: var(--accent); }
.dot.critical { background: var(--critical); }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 0 28px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5.2vw, 64px); line-height: 0.95; letter-spacing: -0.045em; margin-top: 12px; }
.page-head .sub { color: var(--text-2); margin-top: 12px; max-width: 560px; font-size: 15.5px; }

/* ---------- home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding: 34px 0 34px; }
.hero h1 {
  font-family: var(--display); font-weight: 600; font-size: clamp(46px, 7.4vw, 104px); line-height: 0.92;
  letter-spacing: -0.05em; margin-top: 16px; text-wrap: balance;
}
.hero h1 .name { color: var(--accent); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 550;
  text-decoration: none; transition: border-color 0.2s, transform 0.3s var(--spring), color 0.2s;
}
.pill strong { color: var(--text); font-weight: 650; }
a.pill:hover { border-color: var(--line-strong); color: var(--text); transform: translateY(-1px); text-decoration: none; }
.pill .avatar { margin-left: -4px; }
.pill > svg { width: 15px; height: 15px; color: var(--accent); margin-left: -1px; }

.weather {
  width: 340px; padding: 18px 20px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); display: grid; gap: 14px;
}
.weather.muted { display: flex; align-items: center; min-height: 120px; color: var(--text-3); font-size: 14px; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-temp { font-family: var(--display); font-size: 58px; font-weight: 500; letter-spacing: -0.06em; line-height: 0.85; }
.wx-icon { display: inline-flex; }
.wx-icon svg { width: 26px; height: 26px; }
.wx-desc { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.wx-desc strong { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14.5px; font-weight: 650; margin-bottom: 2px; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.wx-day { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--text-3); }
.wx-day b { color: var(--text); font-weight: 650; font-size: 13px; }
.wx-day svg { width: 24px; height: 24px; }
.wx-cloud { color: var(--text-3); }

/* ---------- needs-you ---------- */
.needs { display: grid; gap: 10px; margin-bottom: 30px; }
.needs > .eyebrow { margin: 4px 0 2px; }
.question-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--accent-soft), var(--surface) 70%); border: 1px solid var(--accent-line);
}
.question-card .q-who { font-size: 12.5px; font-weight: 650; color: var(--accent-text); }
.question-card .q-text { font-family: var(--display); font-weight: 550; font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; margin: 3px 0 4px; }
.question-card .q-ctx { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; }
.question-card form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.question-card .input { flex: 1; min-width: 200px; background: var(--surface); }
.question-card .opts { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.check-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); cursor: pointer; }
.check-label input { accent-color: var(--accent); }
.more-link svg { width: 14px; height: 14px; }
.more-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 650; color: var(--accent-text);
  background: none; border: 0; padding: 0; cursor: pointer;
}

/* ---------- board ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; scroll-margin-top: calc(var(--top-h) + 8px); }
.toolbar h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.035em; }
.toolbar h2 small { font-family: var(--font); font-size: 13px; font-weight: 550; letter-spacing: 0; color: var(--text-3); margin-left: 8px; }
/* The board: a 12-column grid laid out in JS (public/js/views/board.js) — it sets each card's width and
   `translate`, and the grid's height. Cards keep their natural height. */
.grid { position: relative; min-height: 80px; }
.card {
  --i: 0;
  min-width: 0; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.4s var(--ease), opacity 0.3s;
}
.grid > .card { position: absolute; top: 0; left: 0; width: 100%; }
.grid.animate > .card { transition: translate 0.45s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease), opacity 0.3s; }
.grid.is-skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; height: auto !important; }
.grid.is-skel > .card { position: static; width: auto; }
.board-empty { display: grid; gap: 8px; justify-items: start; padding: 26px; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card { scroll-margin-top: calc(var(--top-h) + 14px); }
.card.enter { animation: rise-in 0.7s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
.card-head { display: flex; align-items: center; gap: 6px; padding: 16px 12px 6px 20px; min-height: 54px; }
.card-head h2 { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.025em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-head .count { color: var(--text-3); font-family: var(--font); font-size: 14px; font-weight: 550; letter-spacing: 0; }
.card-body { padding: 4px 20px 18px; flex: 1; min-width: 0; }
.card-foot {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px 11px 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3);
}
.card-foot .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot a { font-weight: 650; }
.card-foot .icon-btn { width: 30px; height: 30px; }
.empty { padding: 18px 0 8px; color: var(--text-3); font-size: 14px; }
.empty .btn { margin-top: 12px; }

/* ---------- arranging the board ---------- */
.toolbar-title { display: grid; gap: 2px; min-width: 0; }
.edit-hint { font-size: 13px; color: var(--text-2); }
[data-board='lg'] .hint-narrow, [data-board='md'] .hint-wide, [data-board='sm'] .hint-wide { display: none; }
.toolbar.editing {
  position: sticky; top: calc(var(--top-h) + 2px); z-index: 25; padding: 10px 10px 10px 20px; border-radius: 24px;
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); animation: rise-in 0.35s var(--ease) both;
}
.toolbar.editing h2 { font-size: 20px; }
.tray { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.tray-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.tray-label svg, .tray .chip svg { width: 15px; height: 15px; }
/* Column guides behind the cards, so it's clear where they snap. */
.grid.editing.mode-lg::before {
  content: ''; position: absolute; inset: -10px 0; pointer-events: none; border-radius: var(--r);
  background: repeating-linear-gradient(to right, color-mix(in srgb, var(--accent) 7%, transparent) 0 var(--col), transparent var(--col) calc(var(--col) + var(--gap)));
  animation: fade-in 0.4s var(--ease) both;
}
.grid.editing > .card { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.grid.editing > .card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.grid.editing .card-body, .grid.editing .card-foot { pointer-events: none; }
/* On a phone the board becomes a short list while arranging: just each card's title bar. */
.grid.editing.mode-sm > .card > :not(.card-head) { display: none; }
.grid.editing.mode-sm > .card .card-head { padding-bottom: 14px; }
.grid.editing.mode-sm .card-width { display: none; }
.card-grip {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 34px; margin-left: -10px; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-3); cursor: grab; touch-action: none; transition: background-color 0.2s, color 0.2s;
}
.card-grip:hover, .card-grip:focus-visible { background: var(--surface-2); color: var(--text); }
.card-grip svg { width: 18px; height: 18px; stroke-width: 3.2; }
.card-width { flex: none; font-variant-numeric: tabular-nums; }
.grid.editing > .card.dragging {
  z-index: 30; cursor: grabbing; scale: 1.025; rotate: 0.5deg; border-color: var(--accent-line); box-shadow: var(--shadow-pop);
  transition: scale 0.2s var(--ease), rotate 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.grid.editing > .card.dropping { z-index: 30; transition: translate 0.32s var(--ease), scale 0.32s var(--ease), rotate 0.32s var(--ease), box-shadow 0.32s var(--ease); }
.grid.editing > .card.resizing { z-index: 25; border-color: var(--accent); box-shadow: var(--shadow); }
.grid-ph {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; border-radius: var(--r-lg);
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent);
  transition: translate 0.3s var(--ease), width 0.2s var(--ease), height 0.2s var(--ease);
}
.card-resize {
  display: none; position: absolute; z-index: 2; top: 50%; right: -9px; width: 16px; height: 52px; margin-top: -26px; padding: 0;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-sm); cursor: ew-resize; touch-action: none;
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}
.card-resize::before { content: ''; position: absolute; inset: 17px 4px; border-left: 2px solid var(--text-3); border-right: 2px solid var(--text-3); }
.grid.editing.mode-lg > .card .card-resize { display: block; }
.card-resize:hover, .card.resizing .card-resize { border-color: var(--accent); background: var(--accent-soft); transform: scaleY(1.12); }
html.board-dragging, html.board-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
html.board-dragging:has(.is-resizing), html.board-dragging:has(.is-resizing) * { cursor: ew-resize !important; }

.skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 20%, var(--surface-3) 50%, var(--surface-2) 80%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.skel-hero { height: 92px; width: min(560px, 80%); margin-top: 18px; border-radius: 20px; }
.skel-line { height: 14px; margin: 10px 0; }
.skel-card { height: 220px; border-radius: var(--r-lg); }

/* menus */
.menu {
  position: fixed; z-index: 60; min-width: 200px; padding: 6px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop);
  transform-origin: top right; animation: pop-in 0.22s var(--ease) both;
}
.menu.up { transform-origin: bottom right; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94) translateY(-4px); } }
.menu > button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 11px; border: 0; border-radius: 11px;
  background: transparent; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; text-align: left;
}
.menu > button:hover { background: var(--surface-2); }
.menu > button svg { width: 16px; height: 16px; color: var(--text-3); }
.menu > button.danger { color: var(--critical-ink); }
.menu > button.danger svg { color: currentColor; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }
.menu .menu-sizes { display: flex; gap: 4px; padding: 4px 6px 6px; }
.menu .menu-sizes button { flex: 1; height: 30px; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--text-2); }
.menu .menu-sizes button.on { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.menu .menu-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; padding: 7px 11px 3px; }

/* ---------- todoist ---------- */
.quick-add { display: flex; gap: 8px; margin: 2px 0 6px; }
.quick-add .input { min-height: 40px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.quick-add .input:focus { background: var(--surface); }
.quick-add .btn { width: 40px; height: 40px; padding: 0; }
.task-group { margin-top: 10px; }
.task-group-title { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 12px 0 2px; }
.task-group-title.critical { color: var(--critical-ink); }
.task-group-title .count { font-weight: 600; letter-spacing: 0; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: start; transition: opacity 0.3s; }
.task:last-child { border-bottom: 0; }
.task-check {
  --p: var(--p4);
  width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--p); background: color-mix(in srgb, var(--p) 10%, transparent);
  cursor: pointer; display: grid; place-items: center; padding: 0; color: transparent; transition: background-color 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.task-check:hover { color: var(--p); }
.task-check:active { transform: scale(0.85); }
.task-check svg { width: 11px; height: 11px; stroke-width: 3.2; }
.task-check.p4 { --p: var(--p1); }
.task-check.p3 { --p: var(--p2); }
.task-check.p2 { --p: var(--p3); }
.task.done { opacity: 0.4; }
.task.done .task-check { background: var(--p); color: #fff; transform: scale(1.08); }
.task.done .task-title { text-decoration: line-through; }
.task-title { font-size: 14.5px; line-height: 1.38; overflow-wrap: anywhere; }
.task-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.task-meta .overdue { color: var(--critical-ink); font-weight: 650; }
.task-meta .today { color: var(--good-ink); font-weight: 650; }

/* ---------- news ---------- */
.news-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 10px; flex-wrap: wrap; }
.news-tune {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 6px; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 0; color: var(--text-2); font-size: 13px; text-align: left; cursor: pointer; transition: background-color 0.2s;
}
.news-tune:hover { background: var(--surface-3); }
.news-tune svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.news-tune span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-tune b { color: var(--text); font-weight: 600; }
.news-tune svg:last-child { color: var(--text-3); }
.topic-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.topic-chips::-webkit-scrollbar { display: none; }
.topic-chips .chip { height: 28px; padding: 0 12px; font-size: 12.5px; }
.story { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.story:first-child { border-top: 0; }
.story.leaving { opacity: 0; transform: translateX(18px); }
.story-img { display: block; width: 100%; aspect-ratio: 16 / 8.5; object-fit: cover; border-radius: var(--r); background: var(--surface-2); margin-bottom: 12px; }
.story-tags { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.story-title { display: block; color: var(--text); font-weight: 600; font-size: 15px; line-height: 1.32; letter-spacing: -0.01em; }
.story-title:hover { color: var(--accent-text); text-decoration: none; }
.story.featured .story-title { font-family: var(--display); font-size: 23px; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.story-why { display: flex; gap: 8px; align-items: flex-start; margin-top: 7px; font-size: 13.5px; line-height: 1.42; color: var(--text-2); }
.story-why .avatar { margin-top: 1px; }
.story-summary { font-size: 13px; color: var(--text-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-meta { font-size: 12px; color: var(--text-3); margin-top: 7px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.story-actions { display: flex; flex-direction: column; gap: 2px; opacity: 0.25; transition: opacity 0.2s; }
.story:hover .story-actions, .story:focus-within .story-actions { opacity: 1; }
.react-btn.on { opacity: 1; }
.react-btn.on.like { color: var(--accent); background: var(--accent-soft); }
.story-actions:has(.react-btn.on) { opacity: 1; }
.thumb { width: 74px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.news-empty { display: grid; gap: 12px; padding: 18px; margin: 4px 0 2px; border-radius: var(--r); background: var(--surface-2); text-align: left; }
.news-empty strong { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.news-empty p { color: var(--text-2); font-size: 13.5px; }

/* ---------- room preview & chat ---------- */
.msg-mini { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 8px 0; }
.msg-mini .who { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg-mini .when { font-size: 12px; color: var(--text-3); font-weight: 450; }
.msg-mini .text { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mini-composer { display: flex; gap: 8px; margin-top: 10px; }
.mini-composer .input { min-height: 40px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.mini-composer .input:focus { background: var(--surface); }
.mini-composer .btn { width: 40px; height: 40px; padding: 0; }

.room {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); height: calc(100dvh - var(--top-h) - 22px); min-height: 480px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow);
}
.threads { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); }
.threads-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 18px; }
.threads-head h2 { font-family: var(--display); font-size: 20px; letter-spacing: -0.03em; }
.thread-list { overflow-y: auto; padding: 4px 8px 12px; display: grid; gap: 2px; align-content: start; }
.thread-item {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; color: var(--text-2); font-weight: 600;
  cursor: pointer; border: 0; background: none; text-align: left; width: 100%; transition: background-color 0.2s, color 0.2s;
}
.thread-item:hover { background: var(--surface-3); color: var(--text); }
.thread-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.thread-item .hash { color: var(--accent); font-weight: 700; }
.thread-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .n { font-size: 12px; color: var(--text-3); font-weight: 500; }
.thread-item.unread { color: var(--text); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.thread-item.dm { gap: 10px; padding-left: 9px; }
.thread-item.dm .avatar { flex: none; }
.threads-sub { display: flex; align-items: center; gap: 6px; padding: 14px 12px 6px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.threads-sub svg { width: 13px; height: 13px; }
.private-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-weight: 650; line-height: 1.35; vertical-align: 1px; margin-right: 4px; }
.private-tag svg { width: 12px; height: 12px; }
.dm-empty { display: grid; justify-items: center; gap: 8px; margin: auto; max-width: 340px; text-align: center; }
.dm-empty strong { font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.room.is-dm .composer-box:focus-within { border-color: var(--text-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-3) 14%, transparent); }
.convo { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.convo-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.convo-head > .grow { display: grid; gap: 5px; min-width: 0; }
.convo-head h2 { font-family: var(--display); font-size: 20px; letter-spacing: -0.03em; }
.convo-head .hint { font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.convo-head .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.messages { flex: 1; overflow-y: auto; padding: 12px 16px 18px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.day-sep::before, .day-sep::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.msg { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 9px 10px; border-radius: 16px; transition: background-color 0.2s, opacity 0.3s; }
.msg:hover { background: var(--surface-2); }
.msg.cont { padding-top: 1px; }
.msg.cont > .avatar { visibility: hidden; height: 0; }
.msg.new { animation: msg-in 0.45s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg.pending { opacity: 0.55; }
.msg.failed .msg-body { color: var(--critical-ink); }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-head .who { font-weight: 650; font-size: 14px; }
.msg-head .when { font-size: 12px; color: var(--text-3); }
.msg-body { font-size: 14.5px; overflow-wrap: anywhere; }
.msg.mine .msg-head .who { color: var(--accent-text); }
.msg-actions { position: absolute; top: 5px; right: 6px; opacity: 0; transition: opacity 0.15s; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.msg.question .msg-body { padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); margin-top: 5px; }
.answer-box { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.answer-box .input { flex: 1; min-width: 180px; background: var(--surface); border-radius: 999px; min-height: 38px; }
.composer { border-top: 1px solid var(--line); padding: 10px 14px 14px; display: grid; gap: 9px; }
.composer .mention-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.composer .mention-row::-webkit-scrollbar { display: none; }
.composer .mention-row[hidden] { display: none; }
.composer .mention-row .chip { height: 28px; font-size: 12.5px; padding: 0 11px; }
.composer-box { display: flex; gap: 8px; align-items: flex-end; padding: 6px; border-radius: 22px; background: var(--surface-2); border: 1px solid transparent; transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s; }
.composer-box:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.composer-box textarea { flex: 1; min-height: 38px; max-height: 200px; border: 0; background: transparent; box-shadow: none !important; padding: 8px 10px; resize: none; }
.composer-box .btn { width: 38px; height: 38px; padding: 0; }
.mention { color: var(--mention); font-weight: 650; background: var(--mention-soft); border-radius: 6px; padding: 0 4px; }

/* ---------- markdown ---------- */
.md > * + * { margin-top: 9px; }
.md p { margin: 0; }
.md ul, .md ol { margin: 0; padding-left: 20px; }
.md li + li { margin-top: 3px; }
.md li::marker { color: var(--text-3); }
.md h3, .md h4 { font-family: var(--display); font-size: 17px; letter-spacing: -0.02em; margin-top: 14px; }
.md code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.md pre { background: var(--surface-2); padding: 12px 14px; border-radius: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--text-2); }
.md a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.md hr { border: 0; border-top: 1px solid var(--line); }

/* ---------- agent card types ---------- */
.countdown { display: grid; gap: 4px; padding: 2px 0 2px; }
.countdown .big { font-family: var(--display); font-size: 68px; font-weight: 600; letter-spacing: -0.06em; line-height: 0.9; }
.countdown .unit { font-size: 15px; font-weight: 600; color: var(--text-2); }
.countdown .label { font-weight: 650; margin-top: 10px; font-size: 15px; }
.countdown .date { font-size: 13px; color: var(--text-3); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.stat .label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.stat .value { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -0.045em; margin-top: 4px; line-height: 1; }
.stat .value small { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 3px; letter-spacing: 0; }
.stat .delta { font-size: 12.5px; font-weight: 650; display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; }
.stat .delta.up { color: var(--good-ink); }
.stat .delta.down { color: var(--critical-ink); }
.stat .delta.flat { color: var(--text-3); }
.stat .delta svg { width: 13px; height: 13px; }
.stat .note { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.checklist { display: grid; gap: 2px; }
.check-item { display: flex; align-items: flex-start; gap: 11px; padding: 6px 0; cursor: pointer; font-size: 14.5px; }
.check-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check-item span { transition: color 0.25s; }
.check-item.done span { text-decoration: line-through; color: var(--text-3); }
.links { display: grid; gap: 2px; }
.link-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 9px 10px; margin: 0 -10px; border-radius: 14px; color: var(--text); transition: background-color 0.2s; }
.link-row:hover { background: var(--surface-2); text-decoration: none; }
.link-row > svg { width: 16px; height: 16px; color: var(--text-3); }
.link-row > svg:last-child { opacity: 0; transform: translate(-4px, 4px); transition: opacity 0.2s, transform 0.3s var(--ease); }
.link-row:hover > svg:last-child { opacity: 1; transform: none; }
.link-row .l { font-weight: 600; font-size: 14px; }
.link-row .h { font-size: 12px; color: var(--text-3); }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .t { font-weight: 600; font-size: 14px; }
a.t { color: var(--text); }
.list-row .s { font-size: 13px; color: var(--text-2); }
.list-row .m { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; padding: 7px 8px; border-bottom: 1px solid var(--line-strong); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color 0.15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.progress-item { padding: 7px 0; }
.progress-item .row { justify-content: space-between; font-size: 13.5px; font-weight: 550; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); margin-top: 7px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.quote { font-family: var(--display); font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.quote-by { margin-top: 10px; color: var(--text-3); font-size: 13.5px; }
.img-card { margin: 0; }
.img-card img { border-radius: var(--r); display: block; width: 100%; height: auto; }
.img-card .cap { font-size: 13px; color: var(--text-2); margin-top: 8px; }
/* App cards: an agent's web page in a sandboxed frame (js/views/apps.js); embeds: someone else's page. */
.app-frame { margin: 0 -8px -6px; }
.app-iframe { display: block; width: 100%; border: 0; background: transparent; transition: height 0.25s var(--ease); }
.embed-card { margin: 0; }
.embed-card .cap { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.embed-frame { position: relative; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-2); }
.embed-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.grid.editing iframe, html.board-dragging iframe { pointer-events: none; }
.modal.modal-app { max-width: min(1000px, 100%); height: min(88dvh, 920px); padding: 52px 14px 14px; display: flex; flex-direction: column; }
.modal-app .app-big { flex: 1; min-height: 0; display: flex; }
.modal-app .app-iframe { flex: 1; height: auto; min-height: 0; }

/* ---------- activity ---------- */
.feed { display: grid; }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feed-row:last-child { border-bottom: 0; }
.feed-row .what { font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; line-height: 1.45; }
.feed-row .when { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.work-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 6px; }
.work-row .t { font-weight: 600; font-size: 13.5px; }
.work-row .s { font-size: 12px; color: var(--text-3); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px 22px; }
.panel h2 { font-family: var(--display); font-size: 20px; letter-spacing: -0.03em; margin-bottom: 12px; }
.panel + .panel { margin-top: 18px; }
details.panel > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-weight: 600; transition: transform 0.3s var(--ease); }
details.panel[open] > summary::before { transform: rotate(45deg); }
details.panel[open] > summary { margin-bottom: 10px; }

/* ---------- memory ---------- */
.mem-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.mem-tools .input { max-width: 340px; border-radius: 999px; }
.mem-group { margin-bottom: 22px; }
.mem-group h3 { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px 4px; }
.mem-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.mem-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 14px 13px 18px; border-bottom: 1px solid var(--line); align-items: start; transition: background-color 0.2s; }
.mem-row:hover { background: var(--surface-2); }
.mem-row:last-child { border-bottom: 0; }
.mem-text { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mem-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); margin-top: 5px; flex-wrap: wrap; }
.mem-actions { display: flex; gap: 0; }
.mem-actions .icon-btn.on { color: var(--good-ink); }
.mem-actions .icon-btn.pin-on { color: var(--accent-text); }

/* ---------- settings ---------- */
.settings-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--top-h) + 12px); display: grid; gap: 2px; }
.settings-nav a {
  position: relative; display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 14px; border-radius: 14px;
  color: var(--text-2); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background-color 0.2s, color 0.2s;
}
.settings-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.settings-nav a.on { background: var(--ink); color: var(--ink-text); }
.settings-nav a svg { width: 18px; height: 18px; flex: none; }
.settings-nav .nav-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--accent); flex: none; }
.settings-page { display: grid; gap: 18px; min-width: 0; animation: fade-in 0.25s var(--ease) both; }
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--top-h) + 12px); }
.section-head h2 { font-family: var(--display); font-size: 22px; letter-spacing: -0.035em; }
.section-head p { color: var(--text-2); font-size: 14px; margin-top: 6px; max-width: 640px; }
.section-body { min-width: 0; display: grid; gap: 16px; align-content: start; }
/* Keys and tokens: masked like a password without being one (so browsers don't offer logins here). */
.input.secret:not(:placeholder-shown) { -webkit-text-security: disc; font-family: var(--mono); letter-spacing: 0.08em; }
.hint-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.hint-row > svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.hint-row > span { flex: 1; min-width: 200px; }
.place-results { display: grid; gap: 2px; }
.place-results:empty { display: none; }
.place { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; color: var(--text); }
.place:hover, .place:focus-visible { background: var(--surface-2); }
.place svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.place span { display: grid; line-height: 1.3; }
.place small { color: var(--text-3); font-size: 12.5px; }
details.more.setup > summary { color: var(--accent-text); }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field code, .codebox {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; white-space: nowrap;
}
.codebox { white-space: pre-wrap; display: block; line-height: 1.55; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 14.5px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.agent-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.agent-row:first-child { padding-top: 0; }
.agent-row:last-child { border-bottom: 0; }
.agent-row .name { font-weight: 650; font-size: 15px; }
.agent-main { min-width: 0; }
.agent-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.agent-top .muted { font-size: 12.5px; }
.creds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cred { display: inline-flex; gap: 7px; align-items: center; max-width: 100%; min-width: 0; font-size: 12.5px; color: var(--text-2); padding: 3px 4px 3px 4px; border-radius: 999px; background: var(--surface-2); }
.cred.muted { padding: 3px 10px; }
.cred code { font-size: 12px; }
.cred .tag { background: var(--surface); flex: none; }
.cred-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.cred-x { width: 22px; height: 22px; flex: none; }
.icon-btn.cred-x svg { width: 13px; height: 13px; }
.new-agent { padding-top: 4px; }
.secret-box { padding: 16px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; gap: 10px; }
.feed-status { display: grid; gap: 4px; font-size: 13px; }
.feed-status summary { cursor: pointer; color: var(--text-2); }
.feed-status .ok { color: var(--good-ink); }
.feed-status .bad { color: var(--critical-ink); }
.topic-edit textarea { font-family: var(--mono); font-size: 12.5px; white-space: pre; overflow-x: auto; }
.topic-edit { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.toggle-row strong { display: block; font-weight: 650; font-size: 14px; }
.toggle-row span { font-size: 13px; color: var(--text-2); }
.toggle-row > .tag, .toggle-row > .btn { flex: none; }
.field-title { font-size: 13px; font-weight: 700; color: var(--text-2); }
.device-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
/* Settings → App & notifications: the devices that get notifications */
.device-list { display: grid; gap: 6px; }
.device-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; border-radius: var(--r); background: var(--surface-2); }
.device-row > svg { flex: none; width: 20px; height: 20px; color: var(--text-3); }
.device-row .grow { display: grid; gap: 2px; min-width: 0; }
.device-row strong { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.device-row .grow > span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row .bad { color: var(--critical-ink); }
.platforms { display: flex; gap: 6px; flex-wrap: wrap; }
.platform-body { padding: 18px; border-radius: var(--r); background: var(--surface-2); display: grid; gap: 12px; }
.platform-body > .row strong { font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; font-weight: 600; }
details.more > summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
details.more[open] > summary { margin-bottom: 10px; }

/* ---------- auth & consent ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card {
  width: 100%; max-width: 450px; padding: 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-pop); display: grid; gap: 22px; animation: rise-in 0.7s var(--ease) both;
}
.auth-card h1 { font-family: var(--display); font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: -0.045em; text-wrap: balance; margin-top: 10px; }
.auth-copy .dim { margin-top: 12px; }
.auth-card .error { color: var(--critical-ink); font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: var(--r-sm); background: var(--critical-soft); }
.auth-card .error:empty { display: none; }
.auth-agent { font-size: 13px; }
.auth-note { font-family: var(--mono); font-size: 12px; color: var(--text-3); padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); overflow-wrap: anywhere; }
.consent-pair { display: flex; align-items: center; gap: 12px; }
.app-badge { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: var(--ink); color: var(--ink-text); font-family: var(--display); font-weight: 650; font-size: 19px; letter-spacing: -0.03em; }
.app-badge.hub { background: var(--surface-2); border: 1px solid var(--line); }
.consent-wire { display: flex; gap: 6px; }
.consent-wire i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: wire 1.4s var(--ease) infinite; }
.consent-wire i:nth-child(2) { animation-delay: 0.18s; }
.consent-wire i:nth-child(3) { animation-delay: 0.36s; }
@keyframes wire { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
.consent-dest { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 13px 16px; border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.consent-dest b { color: var(--text); font-weight: 700; word-break: break-all; }
/* Passkeys and two-step sign-in */
.passkey-btn { width: 100%; justify-content: center; min-height: 48px; font-size: 15px; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; max-width: 240px; }
.auth-card .code-input { max-width: none; }
.consent-signin { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface-2); }
.consent-signin .btn { justify-self: start; }
.consent-alt { font-size: 13px; margin-top: -6px; }
@supports selector(:has(*)) {
  .consent .new-name { display: none; }
  .consent form:has(option[value='__new']:checked) .new-name { display: grid; }
}

/* ---------- agent profiles ---------- */
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 1; }
.modal { position: relative; }
.profile-modal { max-width: 520px; }
.profile { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.profile-head { display: flex; align-items: center; gap: 16px; padding-right: 30px; }
.profile-head h2 { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -0.04em; }
.profile-seen { font-size: 13px; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 5px 11px 5px 9px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--text); }
.profile-status svg { width: 14px; height: 14px; color: var(--accent); }
.profile-status small { color: var(--text-3); }
.profile-bio { font-size: 15px; line-height: 1.5; }
.profile-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.profile-stats > div { display: grid; justify-items: center; gap: 1px; padding: 10px 4px; border-radius: var(--r-sm); background: var(--surface-2); }
.profile-stats b { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.profile-stats span { font-size: 11px; color: var(--text-3); font-weight: 600; }
.profile section { display: grid; gap: 8px; }
.profile h3 { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.profile .work-row { margin: 0; align-items: center; }
.profile .work-row > svg { width: 18px; height: 18px; color: var(--text-3); }
/* One or two lines per thing it did: the profile is a glance, Activity has the full story. */
.profile-feed .what { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.profile-feed .more-link { justify-self: start; }
.profile-creds { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.profile-creds svg { width: 15px; height: 15px; }
.profile-actions { padding-top: 4px; }
.feed-row.compact { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; }
.edit-top { display: flex; gap: 18px; align-items: center; }
.edit-preview { flex: none; }
.emoji-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.emoji-input { width: 64px; text-align: center; font-size: 18px; padding: 4px; min-height: 32px; border-radius: 999px; }
.glyph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.glyph-btn {
  display: grid; place-items: center; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); cursor: pointer; transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--spring);
}
.glyph-btn svg { width: 20px; height: 20px; }
.glyph-btn.auto { grid-template-rows: auto auto; gap: 0; }
.glyph-btn.auto svg { width: 15px; height: 15px; }
.glyph-btn small { font-size: 9.5px; font-weight: 700; }
.glyph-btn:hover { border-color: var(--line-strong); color: var(--text); }
.glyph-btn:active { transform: scale(0.94); }
.glyph-btn.on { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: transform 0.25s var(--spring), box-shadow 0.2s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch.custom { position: relative; display: grid; place-items: center; background: conic-gradient(#e5484d, #f97316, #eab308, #22c55e, #3b82f6, #a855f7, #e5484d); color: #fff; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch.custom svg { width: 14px; height: 14px; }

/* ---------- panels (agenda, inbox, notes, focus) ---------- */
.panel-empty { display: grid; gap: 10px; justify-items: start; padding: 16px; margin: 2px 0; border-radius: var(--r); background: var(--surface-2); }
.panel-empty > svg { width: 22px; height: 22px; color: var(--accent); }
.panel-empty strong { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.panel-empty p { color: var(--text-2); font-size: 13.5px; }
.panel-empty.quiet > svg { color: var(--good); }
.agenda { display: grid; gap: 2px; }
.ev-day + .ev-day { margin-top: 4px; }
.ev-day .task-group-title { margin-top: 8px; }
.ev { position: relative; display: grid; grid-template-columns: 54px 3px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-time { font-size: 13px; font-weight: 650; color: var(--text-2); padding-top: 1px; }
.ev-bar { align-self: stretch; border-radius: 3px; background: var(--c); }
.ev-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.ev-title a { color: var(--text); }
.ev-meta, .ev-note { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.ev-note { color: var(--text-2); }
.ev.past { opacity: 0.45; }
.ev.live .ev-time { color: var(--good-ink); }
.ev-x { width: 28px; height: 28px; opacity: 0; }
.ev:hover .ev-x, .ev:focus-within .ev-x { opacity: 1; }
.ev-earlier { margin: 0 0 4px; }
.mail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.mail:last-of-type { border-bottom: 0; }
.mail.leaving { opacity: 0; transform: translateX(16px); }
.mail-from { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.mail-from b { color: var(--text); font-weight: 650; }
.mail-from .when { margin-left: auto; color: var(--text-3); }
.mail-subject { font-weight: 600; font-size: 14.5px; line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere; }
.mail-subject a { color: var(--text); }
.mail-summary { font-size: 13px; color: var(--text-2); margin: 3px 0 4px; }
.mail .tag { margin-top: 4px; }
.mail-from .tag { margin: 0; height: 19px; font-size: 10.5px; }
.mail-actions { display: flex; flex-direction: column; gap: 0; opacity: 0.55; transition: opacity 0.2s; }
.mail:hover .mail-actions, .mail:focus-within .mail-actions { opacity: 1; }
.mail-actions .icon-btn { width: 30px; height: 30px; }
.mail.imp-low { opacity: 0.75; }
.notes { margin: 0 -6px; }
.notes-area {
  display: block; width: 100%; min-height: 120px; resize: none; border: 0; border-radius: var(--r-sm); padding: 10px 12px; outline: none;
  background: repeating-linear-gradient(transparent 0 25.5px, var(--line) 25.5px 26.5px); background-attachment: local; background-position: 0 9px;
  font: 400 14.5px/26.5px var(--font); color: var(--text); transition: background-color 0.2s, box-shadow 0.25s var(--ease);
}
.notes-area:focus { background-color: var(--surface-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.card-foot > svg { width: 14px; height: 14px; }
.focus { display: grid; gap: 12px; }
.focus.idle .input { border-radius: 999px; }
.focus-intro { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.focus-intro svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.focus-recent { display: grid; gap: 4px; font-size: 12.5px; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.focus-recent > div { display: flex; justify-content: space-between; gap: 10px; }
.focus-live { position: relative; width: 168px; height: 168px; margin: 4px auto 0; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1s linear; }
.focus-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.focus-center .cd-text { font-family: var(--display); font-size: 38px; font-weight: 550; letter-spacing: -0.04em; line-height: 1; }
.focus-center small { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.focus-label { text-align: center; font-weight: 650; font-size: 15px; }
.center { text-align: center; justify-content: center; }
.pill-focus { border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- smart home ---------- */
.sh { display: grid; gap: 12px; }
.sh-error { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: var(--r-sm); background: var(--critical-soft); color: var(--critical-ink); font-size: 13px; }
.sh-error svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.sh-error:hover { text-decoration: none; filter: brightness(0.98); }
.sh-scenes { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-scenes .chip svg { width: 14px; height: 14px; color: var(--accent); }
.sh-scenes .chip.busy { opacity: 0.55; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.sh .task-group-title { margin: 4px 0 -4px; }
.sh-tile {
  --tint: var(--text-3);
  position: relative; display: flex; flex-direction: column; justify-content: center; border-radius: var(--r); background: var(--surface-2); border: 1px solid transparent; overflow: hidden;
  transition: background-color 0.25s var(--ease), border-color 0.25s, transform 0.25s var(--spring);
}
.sh-tile.t-light { --tint: #f5a524; }
.sh-tile.t-plug, .sh-tile.t-switch, .sh-tile.t-button { --tint: var(--good); }
.sh-tile.t-fan, .sh-tile.t-climate { --tint: #3b9cf5; }
.sh-tile.t-cover { --tint: #a07cf0; }
.sh-tile.t-media, .sh-tile.t-tv { --tint: #e0559b; }
.sh-tile.t-lock { --tint: var(--good); }
.sh-tile.on { background: color-mix(in srgb, var(--tint) 14%, var(--surface)); border-color: color-mix(in srgb, var(--tint) 35%, transparent); }
.sh-tile.alert { background: var(--critical-soft); border-color: color-mix(in srgb, var(--critical) 40%, transparent); --tint: var(--critical); }
.sh-tile.offline { opacity: 0.5; }
.sh-main {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; align-content: center; height: 100%;
  width: 100%; padding: 11px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left;
}
button.sh-main { cursor: pointer; }
.sh-tile:has(.sh-range) .sh-main, .sh-tile:has(.sh-mini) .sh-main { height: auto; }
button.sh-main:active { transform: scale(0.97); }
.sh-ico { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--text-3); transition: background-color 0.25s, color 0.25s; }
.sh-ico svg { width: 17px; height: 17px; }
.sh-tile.on .sh-ico, .sh-tile.t-lock .sh-ico { background: var(--tint); color: #fff; }
.sh-tile.t-sensor .sh-ico { background: var(--surface); color: var(--text-2); }
.sh-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-state { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-tile.on .sh-state { color: var(--text-2); }
.sh-mini { display: flex; gap: 4px; padding: 0 10px 10px; }
.sh-mini button { flex: 1; height: 28px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12px; font-weight: 650; cursor: pointer; }
.sh-mini button:active { transform: scale(0.95); }
.sh-range {
  --v: 50%;
  -webkit-appearance: none; appearance: none; display: block; width: calc(100% - 24px); height: 6px; margin: -2px 12px 12px; border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--tint, var(--accent)) var(--v), var(--surface-3) var(--v));
}
.sh-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.sh-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.sh-range:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.np {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: 'art text ctl' 'bottom bottom bottom'; gap: 6px 14px; align-items: center;
  padding: 12px; border-radius: var(--r); background: linear-gradient(120deg, color-mix(in srgb, #e0559b 12%, var(--surface-2)), var(--surface-2) 70%);
}
.np.idle { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: 'art text ctl'; }
.np.idle .btn { grid-area: ctl; }
.np-art { grid-area: art; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); box-shadow: var(--shadow-sm); }
.np.idle .np-art { width: 44px; height: 44px; border-radius: 50%; }
.np-art svg { width: 22px; height: 22px; }
.np-text { grid-area: text; display: grid; gap: 1px; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.np-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-title { font-weight: 650; font-size: 14.5px; color: var(--text); }
a.np-title:hover { color: var(--accent-text); text-decoration: none; }
.np-device { justify-self: start; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; max-width: 100%; height: 24px; padding: 0 10px 0 8px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.np-device svg { width: 13px; height: 13px; color: #1db954; }
.np-device span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-controls { grid-area: ctl; display: flex; align-items: center; gap: 2px; }
.np-play { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ink-text); cursor: pointer; transition: transform 0.25s var(--spring); }
.np-play:active { transform: scale(0.9); }
.np-play svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.np-controls .icon-btn svg { fill: currentColor; stroke-width: 1.4; }
.np-bottom { grid-area: bottom; display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; align-items: center; }
.np-bar { --p: 0%; height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--text-2) var(--p), var(--surface-3) var(--p)); transition: --p 1s linear; }
.np-vol-wrap { display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.np-vol-wrap svg { width: 15px; height: 15px; flex: none; }
.np-vol { margin: 0; width: 100%; --tint: var(--text-2); }

/* ---------- room: paging & long messages ---------- */
.load-earlier { display: flex; justify-content: center; padding: 6px 0 10px; }
.msg-body.clamped { max-height: 15.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.msg .more-link { margin-top: 2px; }
.older-threads > summary { list-style: none; cursor: pointer; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.older-threads > summary::-webkit-details-marker { display: none; }
.older-threads > summary::before { content: '▸ '; }
.older-threads[open] > summary::before { content: '▾ '; }

/* ---------- activity ---------- */
.more-link.fold { display: inline-flex; margin: 0 0 0 8px; }
.fold-list { display: grid; gap: 5px; margin-top: 7px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 13px; color: var(--text-2); }
.fold-list > div { display: flex; justify-content: space-between; gap: 10px; }
.fold-list .when { white-space: nowrap; color: var(--text-3); font-size: 12px; }
.chip .avatar { margin-left: -6px; }

/* ---------- memory ---------- */
.mem-stats { font-size: 14.5px; }
.mem-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.mem-bar .input { max-width: 300px; border-radius: 999px; min-height: 40px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 15px; height: 15px; }
.seg .count { color: var(--text-3); font-weight: 600; }
.mem-overview { display: grid; gap: 26px; }
.mem-overview[hidden], .mem-all[hidden], .mem-graph[hidden], .needs[hidden] { display: none; }
.glance {
  position: relative; padding: 22px 24px; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 55%), var(--surface);
}
.glance-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.glance-head h2 { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 21px; letter-spacing: -0.03em; }
.glance-head h2 svg { width: 18px; height: 18px; color: var(--accent); }
.glance-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.glance-meta .tag svg { width: 11px; height: 11px; }
.glance-head .btn { margin-left: auto; }
.glance-body { font-size: 15.5px; line-height: 1.55; max-width: 760px; }
.glance-empty { display: grid; gap: 12px; justify-items: start; color: var(--text-2); font-size: 14px; max-width: 620px; }
.mem-section { display: grid; gap: 12px; }
.mem-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mem-section-head h2 { font-family: var(--display); font-size: 21px; letter-spacing: -0.03em; }
.mem-section-head h2 .count { font-family: var(--font); font-size: 14px; color: var(--text-3); letter-spacing: 0; font-weight: 550; }
.mem-section-head .more-link { margin: 0; }
.mem-row.review { align-items: center; }
.review-actions { display: flex; align-items: center; gap: 2px; }
.review-actions .btn { margin-right: 4px; }
.spaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.space {
  --c: var(--accent);
  display: grid; gap: 10px; align-content: start; padding: 16px 16px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  text-align: left; font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
.space::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); opacity: 0.8; }
.space:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.space-head { display: flex; align-items: center; gap: 8px; }
.space-head b { font-weight: 650; font-size: 15px; flex: 1; }
.space-head .count { font-size: 13px; color: var(--text-3); font-weight: 650; }
.space-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.space ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.space li { font-size: 13px; color: var(--text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.space-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.space-foot .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.panel.tight { padding: 6px 18px; }
.feed-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.cat-dot { --c: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.cat-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.mem-filters { display: grid; gap: 12px; margin-bottom: 18px; }
.mem-filters .chip .space-dot { width: 8px; height: 8px; }
.mem-filters .chip.on .space-dot { box-shadow: 0 0 0 2px var(--ink-text); }
.mem-group h3 { display: flex; align-items: center; gap: 7px; }
.mem-group .more-link { margin: 8px 0 0 4px; }
.mem-row.forgotten .mem-text { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.mem-meta .tag.outline { height: 19px; font-size: 11px; color: var(--text-3); }
.mem-graph { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.mgraph-stage { position: relative; border-radius: var(--r-lg); border: 1px solid var(--line); background: radial-gradient(circle at 50% 50%, var(--surface), var(--surface-2)); overflow: hidden; box-shadow: var(--shadow-sm); }
.mgraph-host { position: relative; height: min(68vh, 640px); min-height: 380px; touch-action: none; }
.mgraph { display: block; width: 100%; height: 100%; cursor: grab; user-select: none; -webkit-user-select: none; }
.mgraph:active { cursor: grabbing; }
.mgraph .edge { stroke: var(--line-strong); stroke-width: 1; transition: opacity 0.25s, stroke 0.25s; }
.mgraph .edge.soft { stroke-dasharray: 2 3; opacity: 0.6; }
.mgraph .edge.spoke { stroke-width: 1.4; }
.mgraph .node { cursor: pointer; transition: opacity 0.25s; }
.mgraph .node circle { fill: var(--c, var(--surface)); stroke: var(--surface); stroke-width: 1.5; transition: r 0.2s, stroke-width 0.2s; }
.mgraph .node text { fill: var(--text); font-size: 11.5px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.mgraph .node.john circle { fill: var(--ink); stroke: var(--surface); stroke-width: 4; }
.mgraph .node.john text { fill: var(--ink-text); stroke: none; font-family: var(--display); font-size: 17px; }
.mgraph .node.cat circle { stroke-width: 3; }
.mgraph .node.cat text { font-size: 13px; font-weight: 700; }
.mgraph .node.entity circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.mgraph .node.entity text { fill: var(--text-2); font-size: 11px; }
.mgraph .node.fact circle { stroke-width: 1; opacity: 0.9; }
.mgraph .node.fact.verified circle { stroke: var(--c); stroke-width: 0; }
.mgraph .node:hover circle, .mgraph .node:focus-visible circle { stroke: var(--accent); stroke-width: 3; }
.mgraph .node:focus { outline: none; }
.mgraph.far .node.entity text, .mgraph.far .node.cat text { font-size: 15px; }
.mgraph.focused .node:not(.sel):not(.near) { opacity: 0.18; }
.mgraph.focused .edge:not(.lit) { opacity: 0.12; }
.mgraph .edge.lit { stroke: var(--accent); opacity: 1; stroke-width: 1.6; }
.mgraph .node.sel circle { stroke: var(--accent); stroke-width: 3.5; }
.mgraph.searching .node.fact:not(.match), .mgraph.searching .node.entity:not(.match) { opacity: 0.15; }
.mgraph .node.match circle { stroke: var(--accent); stroke-width: 3; }
.mgraph-tip {
  position: absolute; z-index: 2; max-width: 260px; padding: 8px 11px; border-radius: 12px; background: var(--ink); color: var(--ink-text);
  font-size: 12.5px; line-height: 1.4; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity 0.15s;
}
.mgraph-tip.on { opacity: 1; }
.mgraph-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 2px; padding: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mgraph-side {
  display: grid; gap: 14px; align-content: start; max-height: min(68vh, 640px); overflow: auto; padding: 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.mgraph-side h3 { font-family: var(--display); font-size: 20px; letter-spacing: -0.03em; }
.mgraph-side .muted { font-size: 13px; }
.side-head { --c: var(--accent); display: flex; align-items: center; gap: 10px; }
.side-head .space-dot { width: 12px; height: 12px; }
.side-facts { display: grid; gap: 2px; }
.side-fact { padding: 10px 0; border-bottom: 1px solid var(--line); }
.side-fact:last-child { border-bottom: 0; }
.side-fact .mem-text { font-size: 14px; }
.side-fact .icon-btn { width: 26px; height: 26px; margin-left: auto; }

/* ---------- settings: home ---------- */
.provider { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); border: 1px solid transparent; }
.provider.is-on { background: var(--surface); border-color: var(--line); }
.provider-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.provider-head strong { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.provider-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.provider-error { font-size: 13px; color: var(--critical-ink); }
.provider .steps { font-size: 13.5px; }
.agent-row .name { font-weight: 650; font-size: 15px; }
.agent-bio { font-size: 13.5px; margin-top: 2px; }

/* ---------- modal & toasts ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(12, 11, 8, 0.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in 0.25s var(--ease) both;
}
.modal {
  width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-xl);
  border: 1px solid var(--line); box-shadow: var(--shadow-pop); padding: 26px; display: grid; gap: 16px; animation: modal-in 0.4s var(--ease) both;
}
.modal h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.04em; }
.modal-back.closing { animation: fade-out 0.2s ease both; }
.modal-back.closing .modal { animation: modal-out 0.2s ease both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
#toasts { position: fixed; z-index: 80; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--ink-text); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-pop); max-width: min(92vw, 520px); animation: toast-in 0.4s var(--spring) both;
}
.toast.error { background: var(--critical); color: #fff; }
.toast.has-action { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
/* A notification that arrived while John had the Hub open */
.toast:has(.toast-note) { border-radius: 18px; width: min(92vw, 440px); justify-content: space-between; }
.toast-note { display: grid; gap: 2px; min-width: 0; }
.toast-note span { opacity: 0.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.toast-btn { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.toast.out { animation: toast-out 0.25s ease both; }
@keyframes toast-in { from { transform: translateY(14px) scale(0.92); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(8px) scale(0.96); opacity: 0; } }

.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- page switching ----------
   Pages stay in the DOM; switching shows the next one with a short slide in the direction of travel. */
.pane[hidden] { display: none; }
.pane-in { animation: pane-in 0.32s var(--ease) both; }
@keyframes pane-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 18px)); } }
/* Theme changes cross-fade (View Transitions API). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
::view-transition { pointer-events: none; } /* a click during the theme fade still lands on the page */
::view-transition-group(topbar), ::view-transition-group(tabbar) { animation: none; }

/* ---------- @mention autocomplete ----------
   The field keeps its own look; a mirror on top tints real mentions blue behind the text. */
.mention-field { position: relative; min-width: 0; }
.mention-field > .input, .mention-field > textarea { width: 100%; }
.composer-box > .mention-field, .mini-composer > .mention-field, .disc-form > .mention-field { flex: 1; display: flex; }
.composer-box > .mention-field > textarea { flex: 1; }
.mention-back {
  position: absolute; z-index: 1; pointer-events: none; overflow: hidden; color: transparent; white-space: pre; margin: 0;
  background: transparent; border-color: transparent;
}
.mention-back.multi { white-space: pre-wrap; overflow-wrap: break-word; }
.mention-back mark { color: transparent; background: var(--mention-soft); border-radius: 5px; box-shadow: 0 0 0 2px var(--mention-soft); }
.mention-pop {
  position: absolute; z-index: 40; left: 0; top: calc(100% + 6px); min-width: 230px; max-width: min(320px, 92vw); padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); display: grid; gap: 1px;
  animation: pop-in 0.18s var(--ease) both;
}
.mention-pop[hidden] { display: none; }
.mention-field.pop-up .mention-pop { top: auto; bottom: calc(100% + 6px); }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.mention-opt {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: 0; border-radius: 11px;
  background: transparent; text-align: left; cursor: pointer; font-size: 14px;
}
.mention-opt.on, .mention-opt:hover { background: var(--mention-soft); }
.mention-opt .mo-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-opt .mo-handle { font-size: 12.5px; color: var(--mention); font-weight: 600; }
.mention-opt .avatar svg { width: 58%; height: 58%; }

/* ---------- replies under cards and stories ---------- */
.disc { display: grid; gap: 10px; }
.disc-list { display: grid; gap: 2px; }
.disc-list:empty { display: none; }
.disc-msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; padding: 7px 0; }
.disc-msg .avatar { margin-top: 2px; }
.disc-msg.pending { opacity: 0.55; }
.disc-msg .who { font-size: 12.5px; font-weight: 650; display: flex; gap: 6px; align-items: baseline; }
.disc-msg .when { font-size: 11.5px; color: var(--text-3); font-weight: 450; }
.disc-msg .text { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.disc-msg .text .md > * + * { margin-top: 5px; }
.disc-msg.mine .text { color: var(--text); }
.disc-form { display: flex; gap: 8px; }
.disc-form .input { min-height: 38px; border-radius: 999px; background: var(--surface-2); border-color: transparent; font-size: 14px; }
.disc-form .input:focus { background: var(--surface); }
.disc-form .btn { width: 38px; height: 38px; padding: 0; flex: none; }
.disc > .more-link { margin: 0; }
.disc-wait { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.card-disc { padding: 12px 20px 16px; border-top: 1px dashed var(--line-strong); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.disc-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; min-width: 30px; padding: 0 8px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-3); font-size: 12.5px; font-weight: 650; cursor: pointer; transition: background-color 0.2s, color 0.2s;
}
.disc-btn svg { width: 16px; height: 16px; }
.disc-btn:hover, .disc-btn.on { background: var(--surface-2); color: var(--text); }
.disc-btn.has { color: var(--mention); }

/* ---------- expandable stories ---------- */
.story-body { min-width: 0; }
button.story-title { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; width: 100%; }
.story .story-img { cursor: pointer; }
.story-meta a { color: var(--text-3); display: inline-flex; align-items: center; gap: 2px; }
.story-meta a:hover { color: var(--accent-text); text-decoration: none; }
.story-meta a svg { width: 12px; height: 12px; }
.story-expand {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 650; cursor: pointer;
}
.story-expand:hover { color: var(--text); background: var(--surface-3); }
.story-expand svg { width: 13px; height: 13px; transition: transform 0.3s var(--ease); }
.story-expand svg:first-child:not(:last-child) { color: var(--mention); }
.story.open .story-expand svg:last-child { transform: rotate(180deg); }
.story.open .story-summary { display: none; }
.story-more { display: grid; gap: 12px; margin-top: 12px; padding: 14px 16px 16px; border-radius: var(--r); background: var(--surface-2); animation: rise-in 0.35s var(--ease) both; }
.story-lede { font-size: 14.5px; font-weight: 550; line-height: 1.45; }
.story-details { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.story-details h3, .story-details h4 { font-size: 15px; margin-top: 10px; color: var(--text); }
.story-details p + p, .story-details p + ul, .story-details ul + p { margin-top: 8px; }
.story-open { justify-self: start; }
.story-more .disc { padding-top: 12px; border-top: 1px solid var(--line); }
.story-more .disc-form .input { background: var(--surface); }

/* ---------- fleeting cards & trackers ---------- */
.fleeting {
  display: inline-flex; align-items: center; gap: 4px; flex: none; height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 650; white-space: nowrap;
}
.fleeting svg { width: 13px; height: 13px; color: var(--accent); }
.fleeting .short { display: none; }
.card.is-fleeting { border-style: dashed; border-color: var(--line-strong); }
.tracker { --tone: var(--text-3); --tone-soft: var(--surface-2); display: grid; gap: 14px; }
.tracker.tone-good { --tone: var(--good); --tone-soft: var(--good-soft); }
.tracker.tone-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.tracker.tone-bad { --tone: var(--critical); --tone-soft: var(--critical-soft); }
.tracker.tone-info { --tone: var(--mention); --tone-soft: var(--mention-soft); }
.tr-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-status { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border-radius: 999px; background: var(--tone-soft); color: var(--tone); font-weight: 700; font-size: 14px; }
.tr-status .dot { background: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 22%, transparent); animation: breathe 1.4s var(--ease) infinite alternate; }
.tr-sub { font-size: 13px; color: var(--text-2); }
.tr-route { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: start; gap: 12px; }
.tr-end { display: grid; gap: 1px; min-width: 0; }
.tr-end.to { text-align: right; }
.tr-code { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.tr-name { font-size: 12.5px; color: var(--text-3); }
.tr-time { font-size: 15px; font-weight: 650; margin-top: 4px; }
.tr-note { font-size: 12px; color: var(--text-2); }
.tr-line { --p: 50%; position: relative; height: 34px; margin-top: 0; }
.tr-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line-strong); }
.tr-fill { position: absolute; left: 0; top: calc(50% - 1px); height: 2px; width: var(--p); background: var(--tone); border-radius: 2px; }
.tr-line.idle .tr-fill { display: none; }
.tr-mark { position: absolute; top: 50%; left: var(--p); transform: translate(-50%, -50%); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--tone); box-shadow: 0 0 0 1px var(--line); }
.tr-mark svg { width: 17px; height: 17px; }
.tr-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 0; }
.tr-details > div { padding: 9px 11px; border-radius: 12px; background: var(--surface-2); }
.tr-details dt { font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.tr-details dd { margin: 2px 0 0; font-weight: 650; font-size: 15px; }
.tr-updates { list-style: none; margin: 0; padding: 0 0 0 12px; display: grid; gap: 6px; border-left: 2px solid var(--line); font-size: 13px; color: var(--text-2); }
.tr-updates li { display: flex; gap: 8px; }
.tr-updates li .tnum { color: var(--text-3); font-weight: 600; flex: none; }
.tr-updates li:first-child { color: var(--text); font-weight: 550; }
.tr-text { font-size: 13.5px; color: var(--text-2); }
.tracker > .more-link { margin: 0; }

/* ---------- settings: calendar & instant replies ---------- */
.cal-feed { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.cal-feed > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.cal-feed .grow { flex: 1; min-width: 0; }
.cal-feed .muted, .cal-feed .provider-error { font-size: 12.5px; overflow-wrap: anywhere; }
details.more.nudge { margin-top: 10px; }
details.more.nudge > summary { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
details.more.nudge > summary svg { width: 15px; height: 15px; color: var(--accent); }
details.more.nudge .tag { height: 20px; font-size: 11px; }
.card-foot .grow svg { width: 14px; height: 14px; vertical-align: -2px; }
.thread-item .hash svg { width: 14px; height: 14px; vertical-align: -2px; }
.older-threads { min-width: 0; }
.older-threads .thread-item { width: 100%; min-width: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .two-col > .tasks-first { order: -1; } /* Activity: what's being worked on before the long timeline */
  .weather { width: 290px; }
  .settings-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 860px) {
  :root { --top-h: 60px; }
  .topbar { padding: 10px 14px; }
  .topbar-inner { grid-template-columns: 1fr auto; }
  .topbar .nav { display: none; }
  .presence-btn .label .txt { display: none; }
  .presence-btn { padding-right: 9px; }
  .main { padding: 0 16px calc(104px + env(safe-area-inset-bottom)); }
  .page.fill { padding-bottom: 0; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 20px 0 26px; }
  .hero-meta { margin-top: 20px; }
  .weather { width: 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .wx-days { border-top: 0; padding-top: 0; padding-left: 14px; border-left: 1px dashed var(--line-strong); grid-template-columns: repeat(3, 48px); }
  .page-head { padding: 18px 0 22px; }
  .toolbar.editing { padding: 10px 10px 10px 16px; border-radius: 20px; }
  .toolbar.editing .btn.ghost { padding: 0 10px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 50; left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 26px;
    background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-pop);
    -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); view-transition-name: tabbar;
  }
  .tabbar a {
    position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 20px;
    font-size: 11px; font-weight: 650; color: var(--text-3); text-decoration: none; transition: color 0.2s, background-color 0.3s var(--ease);
  }
  .tabbar a svg { width: 22px; height: 22px; transition: transform 0.35s var(--spring); }
  .tabbar a.active { color: var(--text); background: var(--surface-3); }
  .tabbar a.active svg { transform: translateY(-1px) scale(1.06); }
  .tabbar .badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
  #toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .room { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--top-h) - 100px - env(safe-area-inset-bottom)); min-height: 400px; margin: 0 -6px; }
  .convo-head .hint, .convo-head > .avatar-stack { display: none; }
  .messages { padding: 8px 8px 12px; }
  .msg { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 8px; }
  .msg > .avatar.lg { width: 30px; height: 30px; font-size: 12px; }
  .msg-actions { opacity: 1; }
  .question-card { padding: 14px; gap: 12px; }
  .question-card .q-text { font-size: 17px; }
  .room .threads { display: none; }
  .room.show-threads .threads { display: flex; }
  .room.show-threads .convo { display: none; }
  .topic-edit { grid-template-columns: minmax(0, 1fr) auto; }
  .mem-graph { grid-template-columns: minmax(0, 1fr); }
  .mgraph-host { height: 58vh; min-height: 340px; }
  .mgraph-side { max-height: none; }
  .mem-bar .input { max-width: none; flex: 1 1 100%; order: 2; }
  .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .np-bottom { grid-template-columns: minmax(0, 1fr) 96px; }
  .ev-x, .mail-actions { opacity: 1; }
  .glance { padding: 18px; }
  .topic-edit textarea { grid-column: 1 / -1; grid-row: 2; }
  .section { padding: 20px; }
  .settings-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .settings-nav {
    top: var(--top-h); z-index: 20; display: flex; gap: 6px; margin: 0 -16px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none;
    background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; gap: 7px; }
  .settings-nav a.on { border-color: var(--ink); }
  .settings-nav a svg { width: 16px; height: 16px; }
  .settings-nav .nav-dot { margin-left: 0; }
  .mem-tools .input { max-width: none; }
  .story-actions { flex-direction: row; opacity: 1; }
  .story { grid-template-columns: minmax(0, 1fr); }
  .story-actions { justify-content: flex-start; margin-left: -8px; }
  .modal-back { place-items: end center; padding: 0; }
  .modal { max-width: none; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); animation-name: sheet-in; }
  .modal-back.closing .modal { animation-name: sheet-out; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
}

@media (max-width: 520px) {
  .brand-name { font-size: 16px; }
  .fleeting .long { display: none; }
  .fleeting .short { display: inline; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .weather { grid-template-columns: minmax(0, 1fr); }
  .wx-days { border-left: 0; padding-left: 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); grid-template-columns: repeat(3, 1fr); }
  .card-body { padding: 4px 16px 16px; }
  .card-head { padding-left: 16px; }
  .card-foot { padding-left: 16px; }
  .auth-card { padding: 24px; }
  .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: 'art text' 'ctl ctl' 'bottom bottom'; }
  .np-art { width: 52px; height: 52px; }
  .np-controls { justify-content: center; }
  .edit-top { flex-direction: column; align-items: flex-start; }
  .spaces { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 861px) {
  .only-mobile { display: none !important; }
}

@media (hover: none) {
  .story-actions { opacity: 1; }
  .link-row > svg:last-child { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
.emoji-input::placeholder { opacity: 0.4; }
.menu .avatar svg, .chip .avatar svg, .pill .avatar svg { color: inherit; width: 58%; height: 58%; }
.mem-filters .seg { justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

/* ---------- sleep panel ---------- */
.sleep { display: grid; gap: 14px; }
.sleep.stale .sl-big { color: var(--text-2); }
.sl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sl-label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.sl-big { font-size: 46px; font-weight: 650; letter-spacing: -0.04em; line-height: 1.05; margin-top: 2px; }
.sl-big small { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin-left: 6px; }
.sl-span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.sl-span svg { width: 16px; height: 16px; color: var(--text-3); }
.sl-score { position: relative; width: 64px; height: 64px; flex: none; }
.sl-score .ring circle { stroke-width: 10; }
.sl-score .ring-fg { stroke: var(--sleep-light); transition: none; }
.sl-score > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.sl-score b { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.sl-score small { font-size: 10px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.sl-stages { display: flex; gap: 2px; height: 12px; }
.sl-seg { display: block; min-width: 4px; border-radius: 4px; }
.st-deep { background: var(--sleep-deep); }
.st-light { background: var(--sleep-light); }
.st-rem { background: var(--sleep-rem); }
.st-awake { background: var(--sleep-awake); }
.sl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); margin-top: -4px; }
.sl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sl-legend b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.sl-key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.sl-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-facts span { font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.sl-week { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.sl-week-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.sl-cols { position: relative; }
.sl-plot { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; height: 96px; }
.sl-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; height: 100%; padding: 0; background: none; border: 0; cursor: default; color: inherit; font: inherit; border-radius: 8px; }
.sl-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sl-track { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.sl-bar { display: block; width: min(24px, 70%); border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--sleep-light) 45%, var(--surface)); transition: background-color 0.2s; }
.sl-bar.now { background: var(--sleep-light); }
.sl-bar.none { background: var(--surface-3); }
.sl-col:hover .sl-bar:not(.none) { background: var(--sleep-light); }
.sl-day { font-size: 11px; line-height: 15px; font-weight: 650; color: var(--text-3); text-align: center; }
.sl-guides { position: absolute; inset: 0 0 19px 0; pointer-events: none; }
.sl-goal { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-strong); }
.sl-goal span { position: absolute; right: 0; top: -15px; font-size: 10.5px; font-weight: 650; color: var(--text-3); background: var(--surface); padding: 0 2px 0 4px; }
.sl-tip {
  position: absolute; bottom: calc(100% + 4px); left: var(--x, 50%); transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow); opacity: 0; transition: opacity 0.15s;
}
.sl-tip.on { opacity: 1; }
.sl-vitals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--text-2); padding-top: 12px; border-top: 1px solid var(--line); }
.sl-vitals span { display: inline-flex; align-items: center; gap: 5px; }
.sl-vitals svg { width: 15px; height: 15px; color: var(--text-3); }
.sl-vitals .sl-when { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }

/* ---------- board settings, hidden cards, live cards ---------- */
.board-group { display: grid; gap: 0; }
.board-group .task-group-title { margin: 4px 0 4px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: 0; }
.board-row .grow { flex: 1; min-width: 0; }
.board-row strong { font-weight: 650; }
.board-row .muted { font-size: 12.5px; overflow-wrap: anywhere; }
.board-row .tag { margin-top: 4px; }
.board-row.off strong { color: var(--text-2); }
.sub-head { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; }
.key-request { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.key-request .muted { font-size: 13px; }
.key-request .row > .grow { min-width: 200px; }
.card-foot .live-dot { display: inline-block; margin: 0 2px 1px 0; vertical-align: middle; }

/* ---------- web pages for agents (/agent: server-rendered, no scripts) ---------- */
.aw-page { max-width: 880px; margin: 0 auto; padding: 22px 16px 64px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.aw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.aw-who { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.aw-who form { display: contents; }
.aw-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.aw-nav a { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.aw-nav a:hover { color: var(--text); border-color: var(--text-3); text-decoration: none; }
.aw-nav a[aria-current='page'] { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.aw-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.aw-head { display: grid; gap: 8px; padding: 8px 2px 0; }
.aw-h1 { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; margin: 0; text-wrap: balance; }
.aw-h2 { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.aw-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.aw-md h2 { font-family: var(--display); font-size: 24px; letter-spacing: -0.03em; }
.aw-md h3 { font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; margin-top: 20px; }
.aw-msg { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 12px; }
.aw-msg:last-child { border-bottom: 0; }
.aw-msg:target { margin: 0 -12px; padding: 12px; border-radius: var(--r-sm); background: var(--accent-soft); }
.aw-msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13.5px; }
.aw-id { font-family: var(--mono); font-size: 11.5px; }
.aw-list { display: grid; gap: 10px; margin: 0; padding-left: 18px; }
.aw-list li[aria-current] > a { color: var(--text); font-weight: 700; }
.aw-card { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.aw-card:first-child { padding-top: 0; }
.aw-card:last-child { border-bottom: 0; padding-bottom: 0; }
.aw-card h3 { font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; margin: 0; }
.aw-card.off h3 { color: var(--text-3); }
.aw-card .muted, .aw-actions { font-size: 13.5px; margin: 0; }
.aw-pre { margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.aw-desc { color: var(--text-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.aw-json { font-family: var(--mono); font-size: 12.5px; }
.aw .field small { font-weight: 500; }
.aw .field .aw-help { display: block; font-size: 12.5px; }
.aw .auth-card { animation: none; } /* agents that work from screenshots shouldn't catch it mid-fade */
.aw details > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.aw details[open] > summary { margin-bottom: 8px; }
.aw .error { margin: 0; color: var(--critical-ink); font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: var(--r-sm); background: var(--critical-soft); }
.aw-ok { margin: 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--good-soft); color: var(--good-ink); font-weight: 600; }
.aw-foot { text-align: center; font-size: 12.5px; }
.aw-tip { margin: 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; }
/* Your profile: pictures and colours to pick from (radio buttons, no scripts) */
.aw-me { display: flex; align-items: center; gap: 16px; }
.aw-me p { margin: 4px 0 0; }
.aw-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.aw-profile-form { gap: 18px; }
.aw-fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.aw-fieldset legend { padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.aw-choice { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.aw-choice input, .aw-glyph input, .aw-swatch input { accent-color: var(--accent); margin: 0; }
.aw-choice + .input, .aw-choice + .aw-glyphs, .aw-fieldset > .aw-help { margin-left: 26px; width: calc(100% - 26px); }
.aw-choice + .input + .aw-help { margin: -4px 0 0 26px; }
.aw-emoji { max-width: 120px; font-size: 20px; }
.aw-hex { max-width: 180px; font-family: var(--mono); }
.aw-glyphs, .aw-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.aw-glyph, .aw-swatch { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 12.5px; cursor: pointer; }
.aw-glyph:has(input:checked), .aw-swatch:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.aw-glyph svg, .aw-swatch svg { color: var(--text); flex: none; width: 22px; height: 22px; }
.aw-swatch span { font-family: var(--mono); font-size: 11.5px; }
@media (max-width: 520px) {
  .aw-h1 { font-size: 28px; }
  .aw .section { padding: 18px 16px; }
}

/* ---------- tap for more (js/views/details.js): rows, tiles and cards that open a sheet ---------- */
.tap { cursor: pointer; border-radius: 8px; transition: background-color 0.2s, box-shadow 0.2s; -webkit-tap-highlight-color: transparent; }
.tap:hover { background-color: var(--surface-2); box-shadow: 0 0 0 6px var(--surface-2); }
.tap:active { background-color: var(--surface-3); box-shadow: 0 0 0 6px var(--surface-3); }
.tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.stat.tap, .work-row.tap { border-radius: var(--r); }
.work-row.tap { border-radius: var(--r-sm); }
.stat.tap:hover, .work-row.tap:hover, .stat.tap:active, .work-row.tap:active { background-color: var(--surface-3); box-shadow: none; }
.more-hint { width: 13px; height: 13px; color: var(--text-3); vertical-align: -2px; margin-left: 4px; flex: none; }
.list-row .m { display: inline-flex; align-items: center; gap: 2px; }
.weather.tap { position: relative; border-radius: var(--r-lg); transition: border-color 0.2s, box-shadow 0.3s var(--ease), transform 0.3s var(--spring); }
.weather.tap:hover { background-color: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.weather.tap:active { background-color: var(--surface); transform: translateY(0) scale(0.99); box-shadow: var(--shadow); }
.wx-open { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--text-3); opacity: 0.55; transition: opacity 0.2s, background-color 0.2s; }
.wx-open svg { width: 14px; height: 14px; }
.weather.tap:hover .wx-open { opacity: 1; background: var(--surface-2); color: var(--text); }
.card.opens .card-body { cursor: pointer; }
.card.opens:has(.card-body:hover) { border-color: var(--line-strong); }
.card-open { opacity: 0; transition: opacity 0.2s; }
.card:hover .card-open, .card-open:focus-visible { opacity: 1; }
.card-more {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: -8px 20px 16px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--accent-text); cursor: pointer;
}
.card-more svg { width: 15px; height: 15px; transition: transform 0.25s var(--spring); }
.card-more:hover svg { transform: translateX(3px); }
@media (hover: none), (pointer: coarse) {
  .card-open { display: none; }
  .tap:hover { background-color: transparent; box-shadow: none; }
  .stat.tap:hover, .work-row.tap:hover { background-color: var(--surface-2); }
  .weather.tap:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
}

/* the sheet itself */
.modal.modal-sheet { max-width: 640px; padding: 26px 26px 24px; }
.modal-sheet.type-table, .modal-sheet.type-image { max-width: min(980px, 100%); }
.sheet { display: grid; gap: 18px; min-width: 0; }
.sheet-head { display: grid; gap: 7px; padding-right: 44px; min-width: 0; }
.sheet-eyebrow { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.sheet-eyebrow svg { width: 14px; height: 14px; flex: none; }
.sheet-eyebrow .avatar { flex: none; }
.modal .sheet-head h2 { font-size: 30px; line-height: 1.08; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.sheet-sub { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.sheet-sub b { color: var(--text); font-weight: 650; }
.sheet-md { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.sheet-sec { display: grid; gap: 10px; min-width: 0; }
.sheet-sec > h3 { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.sheet-details { padding-top: 16px; border-top: 1px solid var(--line); }
.sheet-replies { padding-top: 16px; border-top: 1px solid var(--line); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.sheet-by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-tags .tag svg { width: 12px; height: 12px; margin-right: 4px; }
.tag.prio { color: #fff; }
.tag.prio.p4 { background: var(--p1); }
.tag.prio.p3 { background: var(--p2); }
.tag.prio.p2 { background: var(--p3); }
.sheet-rows { display: grid; gap: 10px; }
.sheet-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14.5px; }
.sheet-row svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.sheet-row a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.sheet-stat { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sheet-stat .value { font-family: var(--display); font-size: 56px; font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; }
.sheet-stat .value small { font-size: 0.4em; margin-left: 4px; color: var(--text-2); letter-spacing: 0; }
.sheet-stat .delta { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 650; }
.sheet-card { min-width: 0; }
.sheet-card .img-card img { max-height: 70dvh; width: auto; max-width: 100%; margin: 0 auto; }
.sheet-card .countdown .big { font-size: 88px; }
.sheet-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); }
.sheet-foot a { font-weight: 650; color: var(--text-2); }
.sheet-foot .icon-btn { width: 30px; height: 30px; }
.modal .muted svg { width: 14px; height: 14px; vertical-align: -2px; }

/* the full forecast */
.modal.modal-weather { max-width: 700px; }
.wx-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wx-head svg { width: 54px; height: 54px; flex: none; }
.wx-head-temp { font-size: 64px; font-weight: 500; letter-spacing: -0.06em; line-height: 0.9; }
.wx-head-label { font-size: 22px; letter-spacing: -0.02em; color: var(--text-2); font-weight: 550; }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
.wx-hour { flex: none; display: grid; justify-items: center; gap: 5px; width: 58px; padding: 11px 0 9px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 12px; color: var(--text-3); scroll-snap-align: start; }
.wx-hour:first-child { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.wx-hour svg { width: 28px; height: 28px; }
.wx-hour b { font-size: 15px; font-weight: 650; color: var(--text); }
.wx-h-rain { font-size: 11.5px; font-weight: 600; min-height: 1em; }
.wet { color: var(--mention); }
.wx-week { display: grid; }
.wx-wday { display: grid; grid-template-columns: 52px 30px 50px 34px minmax(48px, 1fr) 34px; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.wx-wday:last-child { border-bottom: 0; }
.wx-wname { font-weight: 650; }
.wx-wicon { display: flex; }
.wx-wicon svg { width: 28px; height: 28px; }
.wx-wrain { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.wx-wrain.wet { color: var(--mention); }
.wx-wrain svg { width: 12px; height: 12px; }
.wx-wmin { color: var(--text-3); text-align: right; }
.wx-wmax { font-weight: 650; }
.wx-range { position: relative; height: 6px; border-radius: 999px; background: var(--surface-3); }
.wx-range i { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, #4f9cf7, #ffb21e 55%, var(--accent)); }
.wx-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.wx-fact { display: grid; align-content: start; gap: 4px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.wx-fact-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.wx-fact-label svg { width: 14px; height: 14px; }
.wx-fact-value { font-family: var(--display); font-size: 25px; font-weight: 550; letter-spacing: -0.03em; }
.wx-fact-note { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
@media (max-width: 860px) {
  .modal.modal-sheet, .modal-sheet.type-table, .modal-sheet.type-image, .modal.modal-weather { max-width: none; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 720px) {
  .modal .sheet-head h2 { font-size: 25px; }
  .wx-head svg { width: 44px; height: 44px; }
  .wx-head-temp { font-size: 52px; }
  .wx-head-label { font-size: 19px; }
  .wx-wday { grid-template-columns: 44px 28px 46px 30px minmax(36px, 1fr) 30px; gap: 8px; font-size: 14px; }
  .wx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- tasks handed to agents (views/tasks.js): the Home card, the Activity page, the task sheet ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin-bottom: 0; }
.task-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.task-row .t { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.task-row .s { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.task-row > .tag { white-space: nowrap; }
.task-row.is-done .t, .task-row.is-dropped .t { color: var(--text-2); }
.task-row.is-dropped .t { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.urgent-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--critical); flex: none; }
.task-steps { list-style: none; display: grid; margin: 0; padding: 0; }
.task-steps li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 0 0 12px 22px; font-size: 14px; }
.task-steps li::before { content: ''; position: absolute; left: 3px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--good); }
.task-steps li::after { content: ''; position: absolute; left: 7px; top: 17px; bottom: 1px; width: 1px; background: var(--line-strong); }
.task-steps li:last-child { padding-bottom: 0; }
.task-steps li:last-child::after { display: none; }
.task-steps li span { font-size: 13px; color: var(--text-3); }
.task-steps li.pending::before { background: transparent; border: 1.5px dashed var(--text-3); width: 8px; height: 8px; }
.agent-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-pick .chip { padding-left: 6px; }
.agent-pick .chip .avatar { margin-left: 0; } /* same 6px gap on the left as above and below */
.agent-pick-about { font-size: 13px; line-height: 1.45; }
.card-foot .foot-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 650; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.card-foot .foot-btn:hover { color: var(--text); }
.card-foot .foot-btn svg { width: 14px; height: 14px; }

/* "seen" receipts under John's messages: has the agent he asked read it yet? */
.receipts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; }
.receipt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); }
.receipt svg { width: 13px; height: 13px; flex: none; }
.receipt.seen { color: var(--good-ink); }
