/* Syndie app shell — Cohere language applied to product UI */

html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }

/* ---- Topbar ---- */
.topbar {
  height: 60px; flex: none;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 0 var(--sp-3); border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}
.topbar .page-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.searchbar {
  margin: 0 auto; width: min(480px, 40vw);
  display: flex; align-items: center; gap: 10px;
  background: var(--cream); border-radius: var(--r-pill);
  padding: 9px 16px; color: var(--caption); font-size: var(--text-body-sm);
  border: 1px solid transparent; cursor: text;
}
.searchbar:hover { border-color: var(--hairline); }
.searchbar svg { flex: none; }
.searchbar .kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  padding: 2px 6px; color: var(--caption); background: var(--canvas);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.credits {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--text-caption); color: var(--text-2);
  border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 7px 14px;
}
.credits b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.iconbtn {
  width: 34px; height: 34px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text-2); position: relative;
}
.iconbtn:hover { background: var(--cream); color: var(--text); }
.iconbtn .unread {
  position: absolute; top: 7px; right: 7px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--bad); border: 1.5px solid var(--canvas);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--on-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
}
.avatar.tint { background: var(--green-tint); color: var(--green-deep); }

/* ---- Frame ---- */
.frame { flex: 1; display: flex; min-height: 0; }

/* ---- Sidebar ---- */
.sidebar {
  width: 248px; flex: none; display: flex; flex-direction: column;
  border-right: 1px solid var(--hairline); background: var(--canvas);
  padding: var(--sp-2) var(--sp-2) var(--sp-2);
}
.workspace {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--r-nav); cursor: pointer; margin-bottom: var(--sp-2);
}
.workspace:hover { background: var(--cream); }
.workspace .mark {
  width: 30px; height: 30px; border-radius: var(--r-nav); flex: none;
  background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.workspace .ws-name { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.workspace .ws-meta { color: var(--caption); font-size: 11.5px; }
.workspace svg { margin-left: auto; color: var(--caption); }

.new-campaign { margin: 0 10px var(--sp-3); }
.new-campaign .btn { width: calc(100% - 0px); justify-content: center; }

.navgroup { margin-bottom: var(--sp-3); }
.navgroup .micro { display: block; padding: 0 12px; margin-bottom: 6px; }
.navitem {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: var(--r-nav);
  color: var(--text-2); text-decoration: none; font-size: var(--text-body-sm);
}
.navitem svg { flex: none; }
.navitem:hover { background: var(--cream); color: var(--text); }
.navitem.active { background: var(--cream); color: var(--text); font-weight: 500; box-shadow: inset 2.5px 0 0 var(--green); }
.navitem .count {
  margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.navitem.active .count { color: var(--green-deep); }

.sidebar .flex-fill { flex: 1; }

/* Setup progress — docked, never floating */
.setup-card {
  margin: 0 2px var(--sp-2); padding: 12px 14px;
  background: var(--cream); border-radius: 12px;
}
.setup-card .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.setup-card .ttl { font-size: 12.5px; font-weight: 500; }
.setup-card .dismiss { color: var(--caption); background: none; border: none; cursor: pointer; padding: 0 2px; font-size: 13px; }
.setup-card .meter { height: 3px; border-radius: 2px; background: var(--hairline); overflow: hidden; }
.setup-card .meter i { display: block; height: 100%; width: 50%; background: var(--green); }
.setup-card .meta { margin-top: 7px; font-size: 11px; color: var(--caption); }

/* Today usage */
.today {
  margin: 0 2px; padding: 12px 14px 10px;
  border: 1px solid var(--hairline); border-radius: 12px;
}
.today .micro { display: block; margin-bottom: 10px; }
.usage { margin-bottom: 9px; }
.usage .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); margin-bottom: 4px; }
.usage .lbl b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.usage .meter { height: 3px; border-radius: 2px; background: var(--hairline); overflow: hidden; }
.usage .meter i { display: block; height: 100%; background: var(--text-2); }
.usage.hot .meter i { background: var(--warn); }
.halt {
  width: 100%; margin-top: 10px; padding: 7px 10px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--text-2); font-size: 12px; font-family: var(--font-ui); cursor: pointer;
}
.halt:hover { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }

.me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; }
.me .who .nm { font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.me .who .rl { font-size: 11px; color: var(--caption); }

/* ---- Main column ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.main-scroll { flex: 1; overflow-y: auto; }
.content { max-width: 1040px; margin: 0 auto; padding: var(--sp-6) var(--sp-5) 96px; }

.page-head { margin-bottom: var(--sp-5); }
.page-head h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 40px; line-height: 1.05; letter-spacing: -0.015em;
  margin: 0 0 10px; text-wrap: balance;
}
.page-head .sub { color: var(--text-2); font-size: var(--text-body-sm); margin: 0; }
.page-head .sub b { color: var(--text); font-weight: 500; }

.sect { margin-bottom: var(--sp-6); }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-2); }
.sect-head .micro { }
.sect-head .link-2 { font-size: 12.5px; }

/* Decision cards */
.decision {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 18px 22px; border: 1px solid var(--hairline); border-radius: 16px;
  margin-bottom: 10px; cursor: pointer; background: var(--canvas);
  transition: background .12s ease;
}
.decision:hover { background: var(--cream); }
.decision .pill { flex: none; width: 130px; justify-content: flex-start; }
.decision .body { flex: 1; min-width: 0; }
.decision .ttl { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.decision .meta { color: var(--caption); font-size: 12.5px; margin-top: 2px; }
.decision .age { flex: none; font-family: var(--font-mono); font-size: 11.5px; color: var(--caption); }
.decision .chev { flex: none; color: var(--rule); }

/* At-risk cream card */
.risk-card { background: var(--cream); border-radius: var(--r-card); padding: 10px 26px; }
.risk-row { display: flex; align-items: center; gap: var(--sp-2); padding: 15px 0; border-top: 1px solid var(--rule); }
.risk-row:first-child { border-top: none; }
.risk-row .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.risk-row .txt { flex: 1; font-size: var(--text-body-sm); }
.risk-row .txt b { font-weight: 500; }
.risk-row .link-2 { flex: none; font-size: 12.5px; }

/* Stats */
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.statcard { border: 1px solid var(--hairline); border-radius: 16px; padding: 20px 22px; }
.statcard b {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: 38px; line-height: 1; letter-spacing: -0.01em; margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.statcard span { color: var(--text-2); font-size: 12.5px; }

/* Syd live panel */
.live {
  background: var(--ink); color: var(--on-ink); border-radius: var(--r-card);
  padding: 22px 26px; display: flex; align-items: center; gap: var(--sp-2);
}
.live .pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5CBB83; }
.live .what { flex: 1; font-family: var(--font-mono); font-size: 12.5px; color: #C9C9D0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live .what b { color: var(--on-ink); font-weight: 500; }
.live a { color: var(--on-ink); font-size: 12.5px; }

/* ---- Split layouts (queue / unibox) ---- */
.split { flex: 1; display: flex; min-height: 0; }
.list-col {
  width: 400px; flex: none; display: flex; flex-direction: column;
  border-right: 1px solid var(--hairline); min-height: 0;
}
.list-head { padding: var(--sp-2) var(--sp-2) 0; }
.chip-rail { display: flex; gap: 8px; padding: 10px 2px 14px; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-2); background: var(--canvas);
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  padding: 6px 13px; cursor: pointer; font-family: var(--font-ui);
}
.chip b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip.on b { color: var(--on-ink); }
.list-scroll { flex: 1; overflow-y: auto; padding: 0 10px 16px; }

.qrow {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 14px; border-radius: 12px; cursor: pointer; position: relative;
}
.qrow:hover { background: var(--cream); }
.qrow.sel { background: var(--cream); box-shadow: inset 2.5px 0 0 var(--green); }
.qrow .top { display: flex; align-items: center; gap: 10px; }
.qrow .ttl { flex: 1; min-width: 0; font-weight: 500; font-size: 13.5px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .t { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--caption); }
.qrow .meta { color: var(--caption); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Detail pane */
.detail { flex: 1; min-width: 0; overflow-y: auto; background: var(--canvas); }
.detail-inner { max-width: 760px; margin: 0 auto; padding: var(--sp-5) var(--sp-5) 96px; }
.detail-head { display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.detail-head .grow { flex: 1; }
.detail-head h1 {
  font-family: var(--font-display); font-weight: 500; font-size: 30px;
  letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 6px;
}
.detail-head .sub { color: var(--text-2); font-size: 13px; }

/* Conversation — the one chat idiom */
.convo { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--sp-4); }
.msg { max-width: 78%; padding: 13px 17px; border-radius: 16px; font-size: var(--text-body-sm); line-height: 1.5; }
.msg .who { display: block; font-size: 11px; color: var(--caption); margin-bottom: 4px; }
.msg.them { align-self: flex-start; background: var(--canvas); border: 1px solid var(--hairline); border-bottom-left-radius: var(--r-sm); }
.msg.syd { align-self: flex-end; background: var(--cream); border-bottom-right-radius: var(--r-sm); }
.msg.syd .who { text-align: right; }
.day-chip { align-self: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--caption); letter-spacing: 0.06em; padding: 4px 12px; border: 1px solid var(--hairline); border-radius: var(--r-pill); }

/* Draft panel — the one elevated (dark) element */
.draft {
  background: var(--ink); color: var(--on-ink); border-radius: var(--r-card);
  padding: 22px 26px; margin-bottom: var(--sp-2);
}
.draft .cap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.draft .cap .micro { color: #8F8F9B; }
.draft .cap .src { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: #8F8F9B; }
.draft [contenteditable], .draft .text {
  font-size: 15px; line-height: 1.55; color: var(--on-ink); outline: none; letter-spacing: -0.005em;
}
.actions { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }

/* Key–value: label sits WITH its value */
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kv { background: var(--cream); border-radius: 12px; padding: 13px 16px; }
.kv .k { font-size: 11px; color: var(--caption); margin-bottom: 3px; }
.kv .v { font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; }
.kv .v small { font-weight: 400; color: var(--text-2); font-size: 12.5px; }

.quiet-note { color: var(--caption); font-size: 12.5px; line-height: 1.55; }

/* ---- Unibox specifics ---- */
.usearch { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: var(--r-pill); padding: 8px 14px; color: var(--caption); font-size: 13px; margin-bottom: 10px; }
.urow { display: flex; gap: 12px; padding: 13px 14px; border-radius: 12px; cursor: pointer; }
.urow:hover { background: var(--cream); }
.urow.sel { background: var(--cream); box-shadow: inset 2.5px 0 0 var(--green); }
.urow .av { flex: none; }
.urow .body { flex: 1; min-width: 0; }
.urow .l1 { display: flex; align-items: baseline; gap: 8px; }
.urow .nm { font-weight: 500; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow .t { font-family: var(--font-mono); font-size: 10.5px; color: var(--caption); }
.urow .l2 { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.urow .prev { flex: 1; min-width: 0; color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow .pill { flex: none; }
.urow .tags { display: flex; gap: 6px; margin-top: 8px; }

.thread { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.thread-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 14px var(--sp-4); border-bottom: 1px solid var(--hairline);
}
.thread-head .who .nm { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.thread-head .who .rl { font-size: 12px; color: var(--caption); }
.thread-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.seat-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 5px 11px; }
.seat-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.thread-scroll { flex: 1; overflow-y: auto; padding: var(--sp-4); }
.thread-scroll .convo { max-width: 640px; margin: 0 auto; }

.composer { flex: none; padding: 0 var(--sp-4) var(--sp-3); }
.composer-card { max-width: 760px; margin: 0 auto; background: var(--ink); border-radius: 18px; padding: 16px 20px; color: var(--on-ink); }
.composer-card .prov { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.composer-card .prov .micro { color: #8F8F9B; }
.composer-card .prov .why { margin-left: auto; color: #C9C9D0; font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; background: none; border: none; font-family: var(--font-ui); }
.composer-card .text { font-size: 14.5px; line-height: 1.55; color: var(--on-ink); outline: none; margin-bottom: 14px; }
.composer-card .bar { display: flex; align-items: center; gap: 8px; }
.composer-card .bar .count { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: #8F8F9B; }
.ink-ghost {
  background: transparent; border: 1px solid #2E2E35; color: #C9C9D0;
  border-radius: var(--r-pill); padding: 7px 14px; font-size: 12px;
  font-family: var(--font-ui); cursor: pointer;
}
.ink-ghost:hover { border-color: #4A4A55; color: var(--on-ink); }
.btn-send { background: var(--canvas); color: var(--ink); border: none; border-radius: var(--r-pill); padding: 9px 18px; font-size: 12.5px; font-weight: 600; font-family: var(--font-ui); cursor: pointer; }
.btn-send:hover { background: var(--cream); }

/* Empty state */
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--caption); }
.empty h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; color: var(--text); margin: 12px 0 0; }
.empty p { margin: 0; font-size: 13px; max-width: 34ch; text-align: center; line-height: 1.55; }
