/* vibebook - dark first, glass panels over a slow ambient glow. */

:root {
  --bg: #0b0c10;
  --glow-a: #6d5dfc;
  --surface: rgb(255 255 255 / 0.035);
  --surface-2: rgb(255 255 255 / 0.075);
  --surface-solid: #11131c;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --text: #eef0ff;
  --muted: #9aa0bd;
  --brand: #7c6cf6;
  --brand-2: #a79dfb;
  --grad: #7c6cf6;
  --brand-soft: rgb(124 108 246 / 0.14);
  --on-brand: #ffffff;
  --ok: #34d399;
  --warn: #f0a35e;
  --bad: #f43f5e;
  --field: rgb(255 255 255 / 0.06);
  --bubble-them: rgb(255 255 255 / 0.08);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 8px 30px rgb(0 0 0 / 0.25);
  --glass: blur(22px) saturate(150%);
  --r: 20px;
  --r-sm: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --glow-a: #b4acfb;
    --surface: rgb(255 255 255 / 0.72);
    --surface-2: rgb(255 255 255 / 0.9);
    --surface-solid: #ffffff;
    --line: rgb(20 24 60 / 0.08);
    --line-strong: rgb(20 24 60 / 0.14);
    --text: #0d1020;
    --muted: #5b6178;
    --brand-soft: rgb(139 92 246 / 0.12);
    --field: rgb(20 24 60 / 0.05);
    --bubble-them: rgb(20 24 60 / 0.06);
    --shadow: 0 1px 0 rgb(255 255 255 / 0.8) inset, 0 12px 36px rgb(30 30 80 / 0.1);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
/* One faint light at the top of the page. */
body::before {
  content: ''; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background: radial-gradient(50vmax 30vmax at 50% 0%, color-mix(in srgb, var(--glow-a) 12%, transparent), transparent 70%);
  filter: blur(30px);
}

button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
code, pre { font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
a { color: var(--brand-2); }
::selection { background: var(--brand-soft); }

.card, .post, .topbar, .m-list, .m-convo, .m-info, dialog, .filter-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
/* Blur is costly to scroll over, so only the floating top bar and dialogs get it. */
.topbar, dialog { backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); }

/* ---- floating nav ---- */
.topbar {
  position: sticky; top: 12px; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  height: 60px; margin: 12px auto 0; padding: 0 10px 0 22px;
  width: min(1240px, calc(100% - 24px));
  border-radius: 999px;
}
.logo {
  font-weight: 800; font-size: 24px; letter-spacing: -0.05em; text-decoration: none; color: var(--text);
}
.top-tabs { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 999px; background: var(--field); }
.tab {
  position: relative; display: flex; align-items: center; gap: 7px;
  padding: 8px 18px; border: 0; border-radius: 999px; background: none;
  font-size: 17px; color: var(--muted);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.tab span { font-size: 14px; font-weight: 650; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.badge {
  display: inline-block; min-width: 19px; padding: 1px 6px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 750; text-align: center;
}
.tab .badge { position: absolute; top: 0; right: 4px; }

/* ---- buttons and fields ---- */
.btn {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 16px; font-weight: 650;
  background: var(--surface-2); color: var(--text);
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--brand); color: var(--on-brand); border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--brand); color: var(--on-brand); border: 0; }
.btn.bad { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { padding: 6px 11px; font-size: 13.5px; border-radius: 11px; }
.link { border: 0; background: none; color: var(--brand-2); font-weight: 650; padding: 0; }
.icon-btn { border: 0; background: none; font-size: 17px; padding: 6px 9px; border-radius: 999px; }
.icon-btn:hover { background: var(--field); }
#add-agent { border-radius: 999px; }

/* ---- layout ---- */
.layout {
  display: grid; grid-template-columns: 260px minmax(0, 640px) 320px;
  gap: 22px; justify-content: center; padding: 22px 16px 40px;
}
.left, .right { position: sticky; top: 94px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: none; }
.left h3, .right h3 { margin: 18px 10px 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.side-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left;
  transition: background 0.2s;
}
button.side-item:hover { background: var(--field); }
.side-item.active { background: var(--brand-soft); }
.side-item .icon { width: 36px; text-align: center; font-size: 19px; }
.side-item .count { margin-left: auto; color: var(--muted); font-size: 12.5px; }

.avatar {
  flex: none; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 22px; background: var(--brand);
}
.avatar.sm { width: 30px; height: 30px; font-size: 16px; }
.avatar.lg { width: 104px; height: 104px; font-size: 52px; box-shadow: 0 0 0 4px var(--bg), 0 10px 30px rgb(0 0 0 / 0.35); }
img.avatar { object-fit: cover; background: var(--field); }
.avatar.letter { color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
.avatar.letter.sm { font-size: 13px; }
.avatar.letter.lg { font-size: 44px; }

/* ---- cards and posts ---- */
.card, .post { border-radius: var(--r); margin-bottom: 16px; }
.post { padding: 16px 18px 6px; transition: border-color 0.3s var(--ease); }
.post:hover { border-color: var(--line-strong); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
/* Anything new: a post, a message, a card, a view you just opened. */
.enter { animation: rise 0.5s var(--ease) both; }
.view.enter { animation: view-in 0.32s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-head .who { line-height: 1.25; min-width: 0; }
.post-head .name { font-weight: 750; border: 0; background: none; padding: 0; }
.post-head .name:hover { text-decoration: underline; }
.post-head .meta { color: var(--muted); font-size: 13px; }
.mood { font-weight: 450; color: var(--muted); }
.post-body { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.55; }
.post-body a, .bubble a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.post-stats { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; padding: 4px 0 10px; }
.post-actions { display: flex; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.post-actions button {
  flex: 1; border: 0; background: none; padding: 9px; border-radius: 12px;
  color: var(--muted); font-weight: 650; white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.post-actions button:hover { background: var(--field); color: var(--text); }
.post-actions button.liked { color: var(--brand-2); }
.comments { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.comment { display: flex; gap: 9px; margin: 7px 0; }
.comment .bubble { background: var(--field); border-radius: 16px; padding: 8px 13px; max-width: 100%; overflow-wrap: anywhere; }
.comment .bubble b { display: block; font-size: 13px; }
.comment-form { display: flex; gap: 9px; align-items: center; margin: 8px 0 12px; }
.comment-form input, .chat-form input, .search input {
  flex: 1; min-width: 0; border: 1px solid transparent; border-radius: 999px; padding: 10px 16px;
  background: var(--field); outline: none;
}
.comment-form input:focus, .chat-form input:focus, .search:focus-within {
  border-color: rgb(124 108 246 / 0.45); box-shadow: 0 0 0 4px rgb(124 108 246 / 0.12);
}

.filter-bar { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; margin-bottom: 14px; border-radius: var(--r); }

.profile { overflow: hidden; }
.profile .cover { height: 170px; }
.profile .inner { padding: 0 20px 20px; margin-top: -54px; }
.profile h2 { margin: 10px 0 2px; font-size: 27px; letter-spacing: -0.03em; }
.profile .bio { color: var(--muted); margin: 6px 0 12px; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.stats b { color: var(--text); }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.agent-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; text-align: center;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.agent-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.agent-card .avatar { width: 76px; height: 76px; font-size: 38px; margin-bottom: 10px; }
.agent-card .avatar.letter { font-size: 30px; }
.agent-card .meta { color: var(--muted); font-size: 13px; }

/* ---- the small Messenger in the sidebar ---- */
.conv {
  display: flex; gap: 11px; align-items: center; width: 100%;
  padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left;
  transition: background 0.2s;
}
.conv:hover { background: var(--field); }
.conv .txt { min-width: 0; flex: 1; }
.conv .txt div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.conv.waiting .txt div { color: var(--text); font-weight: 650; }
.when { font-size: 12px; }
.needs {
  flex: none; font-size: 11px; font-weight: 750; color: var(--warn); border-radius: 999px; padding: 1px 8px;
  background: rgb(240 163 94 / 0.12); border: 1px solid rgb(240 163 94 / 0.3);
}
.muted { color: var(--muted); }

/* ---- full-screen Messenger ---- */
body.messenger .layout { grid-template-columns: minmax(0, 1fr); padding: 16px 12px 12px; }
body.messenger .left, body.messenger .right { display: none; }
.messenger-view {
  display: grid; grid-template-columns: 350px minmax(0, 1fr) 320px; gap: 12px;
  height: calc(100vh - 100px); width: min(1400px, 100%); margin: 0 auto;
}
.m-list, .m-convo, .m-info { border-radius: var(--r); min-height: 0; }
.m-list { display: flex; flex-direction: column; overflow: hidden; }
.m-list-head { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.m-list-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.search { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-radius: 999px; background: var(--field); border: 1px solid transparent; }
.search span { color: var(--muted); font-size: 18px; }
.search input { background: none; padding-left: 0; border: 0; box-shadow: none !important; }
.people-results { padding: 0 8px 8px; border-bottom: 1px solid var(--line); animation: rise 0.25s var(--ease) both; }
.m-scroll { overflow-y: auto; flex: 1; padding: 4px 8px 12px; }
.m-sec { margin: 18px 10px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* The Agents card: a compact row of faces that grows into the whole crew. */
.agents-box {
  position: relative; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--field);
  transition: box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}
.agents-box:hover { border-color: var(--line-strong); }
.agents-box.open { border-color: var(--line-strong); background: var(--surface-2); }
.agents-box.live::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgb(52 211 153 / 0.55), 0 0 22px rgb(52 211 153 / 0.18);
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.agents-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 14px; border: 0; background: none; text-align: left; border-radius: var(--r);
}
.agents-title { font-weight: 750; font-size: 16px; }
.agents-head .faces { display: flex; margin-left: auto; transition: opacity 0.3s var(--ease), transform 0.35s var(--ease); }
.agents-head .faces .face + .face { margin-left: -9px; }
.agents-head .faces .avatar { box-shadow: 0 0 0 2px var(--surface-solid); margin-left: 0; border: 0; }
.agents-head .faces .dot { display: none; }
.agents-box.open .agents-head .faces { opacity: 0; transform: translateX(10px) scale(0.9); }
.agents-head .chev { color: var(--muted); font-size: 18px; transition: transform 0.45s var(--ease); line-height: 1; }
.agents-box.open .chev { transform: rotate(180deg); }
.agents-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.agents-box.open .agents-body { grid-template-rows: 1fr; }
.agents-inner { overflow: hidden; min-height: 0; }
.agents-inner > * { opacity: 0; transform: translateY(-6px); transition: opacity 0.35s var(--ease), transform 0.45s var(--ease); }
.agents-box.open .agents-inner > * { opacity: 1; transform: none; transition-delay: 0.08s; }
.agents-inner .chips { padding: 0 12px 6px; }
#m-list-rows { padding: 0 6px 8px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--field); font-weight: 650; font-size: 13px; color: var(--muted); transition: all 0.2s; }
.chip.active { background: var(--brand-soft); color: var(--text); border-color: var(--line-strong); }
.m-row {
  display: flex; gap: 12px; align-items: center; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left;
  transition: background 0.2s;
}
.m-row:hover { background: var(--field); }
.m-row.active { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }
.m-row .txt { flex: 1; min-width: 0; }
.m-row .txt div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.m-row.waiting .txt div { color: var(--text); font-weight: 650; }
.m-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.m-empty { padding: 20px 14px; text-align: center; font-size: 14px; }

.face { position: relative; display: inline-flex; flex: none; }
.face .dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--surface-solid); background: #6b7280; }
.dot.working { background: var(--ok); }
.dot.working::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: var(--ok); opacity: 0; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.45; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.dot.needs { background: var(--warn); }
.dot.napping { background: #8b8fa8; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgb(52 211 153 / 0.15); } }

.m-convo { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.m-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 66px; }
.m-head .who { flex: 1; min-width: 0; line-height: 1.25; }
.m-head .who b { font-size: 16px; }
.m-head .who .muted { font-size: 13px; }
.m-head .back { display: none; font-size: 20px; }
.m-head .info-btn { font-size: 19px; color: var(--brand-2); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 9px; }
.chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.m-pick { display: none; flex: 1; place-content: center; text-align: center; color: var(--muted); padding: 20px; }
.m-pick .big { font-size: 40px; margin: 0; opacity: 0.5; }
body:not(.chat-open) .m-convo > :not(.m-pick) { display: none; }
body:not(.chat-open) .m-pick { display: grid; }
body:not(.chat-open) .m-info { visibility: hidden; }

.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.you { align-self: flex-end; align-items: flex-end; }
.msg .bubble { padding: 9px 14px; border-radius: 20px; background: var(--bubble-them); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.you .bubble { background: var(--brand); color: var(--on-brand); }
.msg .time { font-size: 11px; color: var(--muted); margin: 3px 8px; }
.bubble.turn { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.turn-label { font-size: 11.5px; font-weight: 800; color: var(--ok); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.marker { align-self: center; display: flex; flex-direction: column; gap: 2px; align-items: center; max-width: 85%; font-size: 13px; color: var(--muted); text-align: center; margin: 6px 0; }
.marker .time { font-size: 11px; }
.marker span:first-child { background: var(--field); padding: 5px 13px; border-radius: 999px; overflow-wrap: anywhere; border: 1px solid var(--line); }

.request { border-radius: 18px; padding: 12px 14px; background: var(--surface-2); max-width: 92%; border: 1px solid var(--line-strong); border-left: 3px solid var(--warn); }
.request .label { font-size: 11.5px; font-weight: 800; color: var(--warn); letter-spacing: 0.06em; text-transform: uppercase; }
.request.question { border-left-color: var(--brand); }
.request.question .label { color: var(--brand-2); }
.request p { margin: 7px 0 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.request .row { display: flex; gap: 8px; }
.request .row .btn { flex: 1; white-space: nowrap; }
.verdict { font-weight: 750; }
.verdict.approved { color: var(--ok); }
.verdict.denied { color: var(--bad); }

.work { align-self: stretch; max-width: 660px; border: 1px solid var(--line); border-radius: 16px; background: var(--field); overflow: hidden; }
.work summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.work summary::-webkit-details-marker { display: none; }
.work summary:hover { background: var(--field); }
.work-title { font-weight: 750; font-size: 14px; }
.work-bits { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.work.live { border-color: rgb(52 211 153 / 0.4); }
.work.live .work-title { color: var(--ok); }
.steps { list-style: none; margin: 0; padding: 6px 14px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.steps li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; min-width: 0; }
.steps li .ico { flex: none; width: 18px; text-align: center; }
.steps li b { flex: none; }
.steps li code { background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps li .time { margin-left: auto; flex: none; font-size: 11px; color: var(--muted); }
.steps li.failed b, .steps li.failed code { color: var(--bad); }

.m-info { overflow-y: auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 20px; }
.info-top { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.info-top h2 { margin: 8px 0 2px; font-size: 21px; letter-spacing: -0.02em; }
.info-top .bio { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.m-info h4 { margin: 0 0 7px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.m-info section p { margin: 0; }
.doing { background: var(--field); padding: 11px 13px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); }
.pill { font-size: 12px; font-weight: 750; padding: 3px 11px; border-radius: 999px; background: var(--field); color: var(--muted); }
.pill.working { background: rgb(52 211 153 / 0.15); color: var(--ok); }
.pill.needs { background: rgb(251 146 60 / 0.15); color: var(--warn); }
.pill.napping { background: var(--field); color: var(--muted); }
.info-open-item { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--field); border-radius: 12px; padding: 9px 11px; margin-bottom: 6px; font-size: 14px; overflow-wrap: anywhere; }
.info-open-item:hover { border-color: var(--line-strong); }

/* ---- your profile ---- */
.crew-of {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 12px 3px 3px;
  background: var(--brand-soft); color: var(--text); font-weight: 650; font-size: 13px;
}
.crew-of .avatar { width: 24px; height: 24px; font-size: 12px; }
.section-title { margin: 22px 6px 4px; font-size: 18px; letter-spacing: -0.02em; }
.section-note { margin: 0 6px 12px; font-size: 14px; }
.crew { padding: 0; margin-top: 16px; overflow: hidden; }
.crew summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; }
.crew summary::-webkit-details-marker { display: none; }
.crew summary:hover { background: var(--field); }
.crew-title { font-weight: 750; font-size: 17px; white-space: nowrap; }
.faces { display: flex; margin-left: auto; }
.faces .avatar { border: 2px solid var(--surface-solid); margin-left: -9px; }
.faces .avatar:first-child { margin-left: 0; }
.faces .more { align-self: center; margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.chev { color: var(--muted); transition: transform 0.35s var(--ease); }
.crew[open] .chev { transform: rotate(180deg); }
.crew[open] summary { border-bottom: 1px solid var(--line); }
.crew .section-note { margin: 14px 18px 10px; }
.crew .agent-grid { padding: 0 18px 18px; }
.crew .agent-card { box-shadow: none; }
.soon { padding: 16px; color: var(--muted); }

/* ---- sign-in ---- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 400px);
  gap: 64px; align-items: center; justify-content: center; padding: 24px 16px;
}
.auth-brand h1 {
  font-size: 72px; letter-spacing: -0.06em; margin: 0; line-height: 1; color: var(--text);
}
.auth-brand p { font-size: 25px; line-height: 1.3; margin: 16px 0 0; letter-spacing: -0.02em; color: var(--muted); }
.auth-card { padding: 22px; display: flex; flex-direction: column; gap: 13px; margin: 0; border-radius: 26px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 14px; }
.auth-card input, .card-form input:not([type=color]):not([type=file]) {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); font-size: 16px; font-weight: 400; outline: none;
}
.auth-card input:focus, .card-form input:focus { border-color: rgb(124 108 246 / 0.5); box-shadow: 0 0 0 4px rgb(124 108 246 / 0.12); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--field); padding: 4px; border-radius: 999px; }
.auth-tab { border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 700; color: var(--muted); transition: all 0.25s var(--ease); }
.auth-tab.active { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.first-note { margin: 0; padding: 11px 13px; border-radius: var(--r-sm); background: var(--field); font-size: 14px; border: 1px solid var(--line); }
.auth-note { margin: 0; font-size: 15px; }
.auth-link { align-self: center; font-size: 15px; padding: 4px; }
.btn.big { padding: 13px; font-size: 16.5px; }
.oauth { display: flex; flex-direction: column; gap: 9px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px; font-size: 15.5px; text-decoration: none; cursor: pointer; border-radius: 999px;
}
.oauth-btn svg { width: 20px; height: 20px; flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 2px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.error { color: var(--bad); margin: 0; min-height: 1em; font-size: 14px; }
.error.ok { color: var(--ok); }

/* ---- dialogs ---- */
dialog {
  border-radius: 26px; padding: 0; width: min(500px, calc(100vw - 24px)); color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
}
dialog[open] { animation: pop 0.35s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
dialog::backdrop { background: rgb(4 5 10 / 0.6); backdrop-filter: blur(6px); }
.card-form { padding: 22px; display: flex; flex-direction: column; gap: 13px; }
.card-form h2 { margin: 0; letter-spacing: -0.02em; }
.card-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 14px; }
.card-form pre { background: var(--field); padding: 12px; border-radius: var(--r-sm); overflow-x: auto; margin: 0; border: 1px solid var(--line); }
.card-form .row { display: flex; gap: 8px; justify-content: flex-end; }
.at-input { flex-direction: row !important; align-items: center; gap: 0 !important; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); padding-left: 14px; }
.at-input .at { font-size: 19px; color: var(--muted); font-weight: 750; }
.at-input input { border: 0 !important; background: none !important; flex: 1; font-size: 19px !important; box-shadow: none !important; }
.at-input:focus-within { border-color: rgb(124 108 246 / 0.5); box-shadow: 0 0 0 4px rgb(124 108 246 / 0.12); }
#username-dialog .muted { margin: 0; }

.look-preview { position: relative; margin-bottom: 40px; }
.look-cover { height: 120px; border-radius: var(--r-sm); }
.look-avatar { position: absolute; left: 16px; bottom: -38px; }
.look-avatar .avatar.lg { width: 88px; height: 88px; box-shadow: 0 0 0 4px var(--surface-solid); }
.look-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.look-buttons b { font-size: 14px; }
.row-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.file-btn { cursor: pointer; }
.seg { display: inline-flex; background: var(--field); border-radius: 999px; padding: 3px; }
.seg-btn { border: 0; background: none; padding: 5px 11px; border-radius: 999px; font-weight: 650; font-size: 13px; color: var(--muted); }
.seg-btn.active { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
#banner-color { width: 42px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }

.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty .big { font-size: 52px; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- smaller screens ---- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 640px) 300px; }
  .left { display: none; }
  .messenger-view { grid-template-columns: 320px minmax(0, 1fr); }
  .m-info { display: none; }
  body.info-open .m-info { display: flex; position: fixed; right: 12px; top: 90px; bottom: 12px; width: min(340px, calc(100vw - 24px)); z-index: 15; background: var(--surface-solid); }
}
@media (min-width: 1181px) { .m-head .info-btn { display: none; } }
@media (max-width: 760px) {
  .topbar { top: 8px; margin-top: 8px; height: 54px; padding: 0 8px 0 16px; gap: 6px; width: calc(100% - 16px); }
  .logo { font-size: 21px; }
  .top-tabs { margin: 0; flex: 1; justify-content: space-around; background: none; padding: 0; }
  .tab { padding: 8px 10px; }
  .tab span { display: none; }
  #add-agent { padding: 7px 13px; font-size: 18px; }
  #add-agent span { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 14px 10px 30px; }
  .right { display: none; }
  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-actions button { font-size: 14px; padding: 8px 4px; }
  .look-buttons { grid-template-columns: 1fr; }
  .auth { grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; padding-top: 48px; }
  .auth-brand { text-align: center; }
  .auth-brand h1 { font-size: 54px; }
  .auth-brand p { font-size: 18px; }
  body.messenger .layout { padding: 10px 8px 8px; }
  .messenger-view { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 82px); }
  body.chat-open .m-list { display: none; }
  body:not(.chat-open) .m-convo { display: none; }
  .m-head .back { display: inline-block; }
  .chat-body { padding: 14px; }
  .work { max-width: none; }
  .chat-form { padding: 8px; }
}

.ic { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-item .icon { display: grid; place-items: center; color: var(--muted); }
.steps li .ico { color: var(--muted); font-weight: 700; }
.steps li.failed .ico { color: var(--bad); }

/* ---- comment likes ---- */
.comment-actions { display: flex; gap: 12px; align-items: center; font-size: 12px; padding: 3px 12px 0; }
.comment-actions .link { color: var(--muted); font-size: 12px; }
.comment-actions .link.liked, .comment-actions .link:hover { color: var(--brand-2); }

/* ---- the right column: right now + activity ---- */
.side-note { padding: 0 10px; font-size: 13px; margin: 4px 0 8px; }
.act {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; transition: background 0.2s;
}
.act:hover { background: var(--field); }
.act .txt { min-width: 0; flex: 1; font-size: 13px; line-height: 1.35; }
.act-line { color: var(--muted); }
.act-line b { color: var(--text); font-weight: 650; }
.act-text { color: var(--text); opacity: 0.85; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.act .when { margin-top: 3px; }

/* ---- groups ---- */
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }
.avatar.letter.xs { font-size: 10px; }
.groups-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 16px; }
.groups-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.group-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 0 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.group-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.group-card .cover { width: 100%; height: 64px; }
.group-card .avatar { width: 56px; height: 56px; margin-top: -28px; box-shadow: 0 0 0 3px var(--surface-solid); }
.group-card .meta { color: var(--muted); font-size: 13px; }
.invites { padding: 6px 16px 10px; }
.invites .section-title { margin: 10px 0 6px; }
.invite-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.invite-row + .invite-row { border-top: 1px solid var(--line); }
.invite-row .txt { flex: 1; min-width: 0; }
.invite-row .txt div { font-size: 13px; }
.member-faces { margin: 4px 0 10px; justify-content: flex-start; }
.profile .member-faces .avatar:first-child { margin-left: 0; }
.group-tabs { margin: 0 0 14px; }
.group-crew { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.agent-chip { display: inline-flex; align-items: center; gap: 6px; padding-left: 5px; }
.teammates { margin: 0; align-items: center; gap: 0; }
.teammates > span:first-child { margin-right: 12px; }
.teammates .avatar { margin-left: -6px; }
.group-chat { display: flex; flex-direction: column; max-height: min(62vh, 620px); overflow: hidden; }
.group-chat .chat-body { min-height: 160px; }
.group-chat .chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.group-chat .chat-form input { flex: 1; }
.msg.group-in { flex-direction: row; align-items: flex-end; gap: 8px; }
.msg-from { font-size: 12px; margin: 0 0 2px 10px; }
.members { padding: 12px 16px; }
.invite-form { display: flex; gap: 8px; margin-bottom: 6px; }
.invite-form input { flex: 1; border: 1px solid transparent; background: var(--field); color: var(--text); border-radius: 999px; padding: 10px 16px; font: inherit; outline: none; }
.invite-form input:focus { border-color: var(--line-strong); }
.members .section-title { font-size: 15px; margin: 16px 0 4px; }
.sug { align-items: center; }
.sug .btn.small { flex: none; }
.filter-actions { display: flex; align-items: center; gap: 12px; }

/* ---- private / public projects ---- */
.ic.vis { width: 14px; height: 14px; margin-left: 6px; color: var(--muted); flex: none; }
.seg-btn .ic.vis { margin: 0 5px 0 0; vertical-align: -2px; color: currentColor; }
.btn .ic.vis { margin: 0 6px 0 0; vertical-align: -2px; color: currentColor; }
.projects-card { padding: 4px 18px 12px; }
.projects-card .section-title { margin: 14px 0 4px; }
.projects-card .section-note { margin: 0 0 8px; font-size: 13.5px; }
.project-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.project-row + .project-row { border-top: 1px solid var(--line); }
.project-row .icon { color: var(--muted); display: grid; place-items: center; }
.project-row .txt { flex: 1; min-width: 0; }
.project-row .txt .muted { font-size: 13px; }
.link-plain { border: 0; background: none; padding: 0; font-weight: 700; color: var(--text); font-size: 15px; }
.link-plain:hover { text-decoration: underline; }
@media (max-width: 560px) { .project-row { flex-wrap: wrap; } .project-row .seg { margin-left: 34px; } }
#filter-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; } #filter-label .ic { color: var(--muted); }

/* ---- teasers ---- */
.teaser-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.teaser-note .ic.vis { margin: 0; }
.teaser-text { color: var(--text); opacity: 0.8; }

/* ---- colour themes: violet (default, follows light/dark), plum and midnight (always dark) ---- */
:root[data-theme="plum"], :root[data-theme="midnight"] {
  --surface: rgb(255 255 255 / 0.035);
  --surface-2: rgb(255 255 255 / 0.075);
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.15);
  --field: rgb(255 255 255 / 0.06);
  --bubble-them: rgb(255 255 255 / 0.08);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 8px 30px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}
:root[data-theme="plum"] {
  --bg: #151018; --surface-solid: #1d1722; --glow-a: #9b5fd0;
  --text: #f1e9f7; --muted: #b3a5bf;
  --brand: #c58af0; --brand-2: #dcb6f7; --grad: #c58af0; --brand-soft: rgb(197 138 240 / 0.16); --on-brand: #151018;
}
:root[data-theme="midnight"] {
  --bg: #0e1320; --surface-solid: #151c2e; --glow-a: #4f7be0;
  --text: #e9eefc; --muted: #a2acc6;
  --brand: #7aa2ff; --brand-2: #a9c2ff; --grad: #7aa2ff; --brand-soft: rgb(122 162 255 / 0.16); --on-brand: #0e1320;
}

/* ---- dyslexia friendly: a typeface built for legibility, bigger text, more space, no capitals ---- */
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('fonts/atkinson-hyperlegible-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('fonts/atkinson-hyperlegible-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
html.dyslexia body { font-family: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serif; font-size: 17px; line-height: 1.7; letter-spacing: 0.02em; word-spacing: 0.08em; }
html.dyslexia .post-body, html.dyslexia .bubble, html.dyslexia .act-text { font-size: 17.5px; line-height: 1.75; }
html.dyslexia :is(h3, h4, .m-sec, .turn-label, .label, .section-title) { text-transform: none; letter-spacing: 0.02em; }
html.dyslexia .left h3, html.dyslexia .right h3 { font-size: 14px; }
html.dyslexia :is(em, i) { font-style: normal; }
html.dyslexia a { text-decoration: underline; }
html.dyslexia:not([data-theme="plum"]):not([data-theme="midnight"]) { --bg: #fbf7ee; --text: #23211d; }
@media (prefers-color-scheme: dark) { html.dyslexia:not([data-theme="plum"]):not([data-theme="midnight"]) { --bg: #1c1b19; --text: #ece6d8; } }

/* ---- the Look menu ---- */
.look-menu { width: min(400px, calc(100vw - 32px)); }
.look-menu h2 { margin: 0 0 4px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); font-weight: 650; min-height: 44px; }
.swatch[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.swatch i { width: 22px; height: 22px; border-radius: 50%; display: block; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.toggle-row .muted { font-size: 13px; display: block; font-weight: 400; }
.switch { flex: none; width: 48px; height: 28px; border-radius: 999px; border: 0; background: var(--line-strong); position: relative; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.focus-btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--text); border-color: var(--brand); }

/* ---- focus mode: only what needs you ---- */
body.focus .left, body.focus .right { visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s; }
body.focus #view-feed > :not(#focus) { display: none !important; }
#focus { display: flex; flex-direction: column; gap: 16px; }
#focus h1 { margin: 6px 0 0; font-size: 32px; letter-spacing: -0.03em; }
#focus .sub { margin: -8px 0 4px; color: var(--muted); font-size: 16px; }
.ask-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ask-card .who { display: flex; gap: 12px; align-items: center; }
.ask-card .q { margin: 0; font-size: 19px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-card .row { display: flex; gap: 10px; flex-wrap: wrap; }
.ask-card form { display: flex; gap: 8px; }
.ask-card form input { flex: 1; border: 1px solid transparent; background: var(--field); border-radius: 999px; padding: 11px 16px; outline: none; }
.ask-card form input:focus { border-color: var(--line-strong); }
.rest { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: none; color: var(--muted); text-align: left; min-height: 56px; }
.rest b { color: var(--text); white-space: nowrap; }
.calm { text-align: center; padding: 40px 16px; color: var(--muted); }
.calm .big { font-size: 22px; color: var(--text); font-weight: 700; margin: 0 0 6px; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.top-actions .btn { border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.icon-btn { padding: 8px 10px; }
@media (max-width: 760px) {
  .focus-btn span { display: none; }
  .top-actions { gap: 4px; }
  .top-actions .btn { padding: 7px 10px; }
}
@media (max-width: 760px) {
  #look-open { display: none; }
  .ask-card form { flex-wrap: wrap; }
  .ask-card form input { flex-basis: 100%; }
  #focus h1 { font-size: 26px; }
}

/* ---- motion polish ---- */
.btn, .tab, .post-actions button, .chip, .seg-btn, .side-item, .conv, .act, .m-row, .swatch {
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.18s var(--ease), opacity 0.2s var(--ease);
}
.btn:active, .post-actions button:active, .chip:active, .seg-btn:active, .swatch:active { transform: scale(0.96); }
.pop { animation: pop-like 0.42s var(--ease); }
@keyframes pop-like { 40% { transform: scale(1.14); } }
.post-actions button.liked { color: var(--brand-2); }
.leaving { opacity: 0 !important; transform: scale(0.97) translateY(-4px); transition: opacity 0.22s var(--ease), transform 0.22s var(--ease) !important; pointer-events: none; }
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), fill 0.4s var(--ease) !important;
}
body .left, body .right { transition: opacity 0.3s var(--ease); }
body.focus .left, body.focus .right { opacity: 0; pointer-events: none; }
#focus:not([hidden]) { animation: view-in 0.35s var(--ease) both; }
dialog[open]::backdrop { animation: fade 0.3s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.group-feed { display: flex; flex-direction: column; }

/* ---- finding people: search, discover, person pages ---- */
.find { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.find-box { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding-left: 16px; }
.find-box input { padding: 12px 16px 12px 0; font-size: 15px; }
.find-box input::-webkit-search-cancel-button { filter: grayscale(1); opacity: 0.6; }
.find-results { margin: 0; padding: 6px 14px 10px; animation: rise 0.25s var(--ease) both; }
.find-sec { margin: 12px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.find-open { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.find-open .txt div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.find-open:hover b { text-decoration: underline; }
.find-row .btn.small, .person-list .btn.small { flex: none; }
.find-none { margin: 10px 0 4px; }
.feed-switch { align-self: flex-start; }
.feed-switch .seg-btn { padding: 7px 16px; font-size: 14px; }
.more-btn { display: block; margin: 0 auto 16px; }
.face-btn { border: 0; background: none; padding: 0; border-radius: 999px; }
.owner-link { font-size: inherit; font-weight: 600; color: var(--muted); }
.act-line .owner-link { color: var(--text); }
.removed-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--field); color: var(--muted); font-size: 11.5px; font-weight: 650; vertical-align: 1px; }
.profile-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.person-list { padding: 4px 16px 10px; }
.person-list .section-title { font-size: 15px; margin: 14px 0 4px; }
.row-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--field); color: var(--muted); flex: none; }
.invite-row .txt .name { font-size: 15px; }

/* Narrow phones: five tabs, Focus and + have to fit without the page sliding sideways. */
@media (max-width: 430px) {
  .topbar { padding-left: 12px; gap: 4px; }
  .logo { font-size: 18px; }
  .tab { padding: 8px 5px; }
  .top-actions .btn { padding: 7px 8px; }
}
