[hidden] { display: none !important; }
/* ValuMate brand (docs/BRAND.md): Primary Purple, Lavender, Warm White and Ink, with tints derived from them. */
:root {
  --brand-purple: #4A2E5E;
  --brand-lavender: #9A7AB5;
  --brand-warm: #FAF8F5;
  --brand-ink: #25212B;

  --purple-900: #2B1A38;
  --purple-hover: #3A2349;
  --purple-600: #6A4C80;
  --purple-lift: #664B7C;
  --lav-50: #F4EFF8;
  --lav-100: #E9E0F0;
  --lav-200: #D9CBE6;
  --lav-300: #C4AFD6;
  --on-lavender: #1A1021;
  --surface: #FFFFFF;
  --focus: #7A5A98;
  --focus-on-purple: #E4D9EC;

  --ink-700: #3F3A47;
  --ink-500: #5F5968;
  --ink-400: #645E6D;
  --ink-300: #A39BAD;
  --side-ink: #FFFFFF;
  --side-ink-2: #E4D9EC;
  --side-ink-3: #D9CCE3;

  --line: rgba(37,33,43,0.12);
  --line-soft: rgba(37,33,43,0.08);
  --line-strong: #C9BFD2;
  --ring: #8A8093;
  --fill: rgba(74,46,94,0.08);
  --fill-soft: rgba(74,46,94,0.06);
  --fill-faint: rgba(74,46,94,0.04);
  --fill-hover: rgba(74,46,94,0.13);
  --card-shadow: 0 1px 2px rgba(37,33,43,0.04), 0 0 0 1px rgba(74,46,94,0.07);

  --ok-ink: #1F6B35;
  --warn-ink: #8F5400;
  --err-ink: #A1261D;

  --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-wordmark: 'Plus Jakarta Sans', 'Montserrat', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Newsreader', 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--brand-warm);
  color: var(--brand-ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-purple); }
a:hover { color: var(--purple-900); }
button, input, select, textarea { font-family: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 8px 14px; border-radius: 9px; background: var(--brand-purple); color: #FFFFFF; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 8px; color: #FFFFFF; }

/* ---------- Orbs (keyframes copied from the mockup) ---------- */
@keyframes orbspin { to { transform: rotate(360deg); } }
@keyframes orbspinrev { to { transform: rotate(-360deg); } }
@keyframes orbfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes orbpulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.14); } }
.orb-float { animation: orbfloat 4.2s ease-in-out infinite; }
.orb-spin { animation: orbspin 7s linear infinite; }
.orb-spin-rev { animation: orbspinrev 5s linear infinite; }
.orb-glow { animation: orbpulse 3.4s ease-in-out infinite; }
@keyframes orbdriftA { 0% { transform: translate(0,0); } 25% { transform: translate(50px,-26px); } 50% { transform: translate(100px,40px); } 75% { transform: translate(24px,90px); } 100% { transform: translate(0,0); } }
@keyframes orbdriftB { 0% { transform: translate(0,0); } 25% { transform: translate(-80px,12px); } 50% { transform: translate(-120px,-70px); } 75% { transform: translate(-30px,-110px); } 100% { transform: translate(0,0); } }
.orb-a { animation: orbdriftA 12s ease-in-out infinite; }
.orb-b { animation: orbdriftB 9.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .orb-a, .orb-b, .orb-float, .orb-spin, .orb-spin-rev, .orb-glow { animation: none; }
  .check-row { transition: none; }
}

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; overflow-x: clip; }

.sidebar {
  flex: 1 1 240px; max-width: 264px; padding: 22px 12px 16px;
  display: flex; flex-direction: column;
  background: var(--brand-purple); color: var(--side-ink);
}
.sidebar :focus-visible { outline-color: var(--focus-on-purple); }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 10px; text-decoration: none; color: var(--side-ink); }
.brand:hover { color: var(--side-ink); }
.brand-mark { flex: none; display: block; height: 24px; width: auto; }
.brand-word { font-family: var(--font-wordmark); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -0.045em; color: inherit; }
.brand-tag { align-self: flex-end; margin-bottom: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--side-ink-3); }

.side-search {
  margin: 18px 4px 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 36px;
  border-radius: 18px; background: rgba(255,255,255,0.14); color: var(--side-ink); font-size: 14px;
}
.side-search svg { flex: none; }
.side-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; color: var(--side-ink); padding: 0; height: 100%; }
.side-search input::placeholder { color: var(--side-ink-2); opacity: 1; }
.side-search:focus-within { box-shadow: 0 0 0 2px var(--focus-on-purple); }
.side-search input:focus-visible { outline: none; }

.nav-list { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; min-height: 36px;
  border-radius: 18px; color: var(--side-ink); text-decoration: none; font-weight: 500;
}
.nav-item:hover { color: var(--side-ink); background: rgba(255,255,255,0.09); }
.nav-item svg { flex: none; color: var(--side-ink-2); }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-count { min-width: 28px; padding: 2px 8px; border-radius: 10px; background: var(--brand-lavender); color: var(--on-lavender); font-size: 12px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.nav-item[aria-current="page"], .nav-list--minor .nav-item[aria-current="page"] { background: var(--purple-lift); color: var(--side-ink); }
.nav-item[aria-current="page"] svg { color: currentColor; }
.nav-list--minor { margin-top: 10px; }
.nav-list--minor .nav-item { font-weight: 400; min-height: 32px; padding: 5px 12px; font-size: 14px; color: var(--side-ink-2); }
.nav-list--minor .nav-item:hover { color: var(--side-ink); }

.side-label { margin: 22px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--side-ink-3); }
.pinned-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pinned-item { display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 36px; border-radius: 18px; color: var(--side-ink); text-decoration: none; }
.pinned-item:hover { color: var(--side-ink); background: rgba(255,255,255,0.09); }
.pinned-item[aria-current="page"] { background: var(--purple-lift); }

.orbs-link { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; text-decoration: none; color: var(--side-ink); border-radius: 16px; }
.orbs-link:hover { color: var(--side-ink); }
.orb-box { position: relative; width: 240px; height: 240px; display: block; }
.orb-stage { position: relative; width: 240px; height: 240px; display: block; }
.orbs-caption { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }

.side-status { padding: 14px 12px 0; display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--side-ink-3); }
.side-status a { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 7px; }
.side-status a:hover { color: var(--side-ink); }
.side-tagline { margin: 12px 12px 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.14); font-family: var(--font-serif); font-size: 13.5px; line-height: 1.3; color: var(--side-ink-3); }
.status-line { display: flex; align-items: center; gap: 7px; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); }
.dot--ok { background: #34C759; }
.dot--wait { background: #FF9F0A; }
.dot--err { background: #FF6B61; }
.dot--warn { background: #FF9F0A; }

/* ---------- Main ---------- */
.main { flex: 999 1 560px; min-width: 0; padding: 40px 48px 64px; }
.page { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.main--ask { padding-top: 64px; }
.main--ask .page { max-width: 720px; gap: 22px; }
.main--detail { padding-top: 28px; }
.main--detail .page { max-width: 1000px; gap: 28px; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-400); }
.title { margin: 4px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -0.6px; }
.hero-main .title { margin: 0; }
.hero-main .eyebrow { margin-top: 6px; }
.title--center { margin: 0; text-align: center; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.lede { margin: 6px 0 0; color: var(--ink-500); }

.back-link { align-self: flex-start; display: flex; align-items: center; gap: 4px; text-decoration: none; font-size: 15px; min-height: 44px; }

.flash { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: #E9F7EE; color: var(--ok-ink); font-size: 14px; font-weight: 500; }
.flash svg { flex: none; }
.flash--warn { background: #FFF4E5; color: var(--warn-ink); }
.flash--err { background: #FDECEC; color: var(--err-ink); }
.person-head .flash { margin-top: 14px; }

/* ---------- Smart-list tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile {
  background: var(--surface); border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none;
}
a.tile:hover { color: inherit; box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 0.5px rgba(0,0,0,0.06); }
.tile-top { display: flex; justify-content: space-between; align-items: center; }
.tile-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ink-500); }
.tile-icon--plum { background: var(--brand-purple); }
.tile-icon--orange { background: #B86E00; }
.tile-icon--blue { background: var(--brand-lavender); }
.tile-icon--gray { background: var(--ink-500); }
.tile-count { font-size: 28px; font-weight: 700; letter-spacing: -0.3px; }
.tile-label { font-size: 15px; font-weight: 600; color: var(--ink-700); }

/* ---------- Columns and grouped cards ---------- */
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.col-main { flex: 3 1 520px; min-width: 0; }
.col-main--tl { flex-basis: 480px; }
.col-side { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.stack { display: flex; flex-direction: column; gap: 28px; }

.section-h { margin: 0 0 8px 16px; font-size: 20px; font-weight: 700; letter-spacing: -0.2px; }
.section-h--small { margin: 6px 0 8px 16px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-400); }
.section-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px 16px; }
.section-bar .section-h { margin: 0; }

.card { background: var(--surface); border-radius: 16px; box-shadow: var(--card-shadow); overflow: hidden; }
.card--pad { padding: 20px 24px; border-radius: 16px; overflow: visible; }
.card-empty { padding: 14px 16px; color: var(--ink-400); font-size: 14px; }

.row { display: flex; align-items: center; gap: 12px; padding: 0 0 0 16px; color: inherit; text-decoration: none; }
.row--top { align-items: flex-start; }
a.row:hover { color: inherit; background: var(--fill-faint); }
.row-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 0; border-bottom: 0.5px solid var(--line); }
.row-body--block { display: block; }
.row-body--tall { padding: 14px 16px 14px 0; }
.row:last-child .row-body, .row:last-child > .row-body { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; }
.row-title--plain { font-weight: 400; }
.row-split { display: flex; justify-content: space-between; gap: 12px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 13px; color: var(--ink-500); margin-top: 2px; }
.text { font-size: 14px; color: var(--ink-700); margin-top: 2px; }
.text--tl { margin-top: 3px; }
.meta { font-size: 13px; color: var(--ink-400); flex: none; }
.warn { font-size: 13px; color: var(--warn-ink); font-weight: 600; }
.quote { font-size: 13px; color: var(--ink-500); margin-top: 4px; font-style: italic; }
.chev { flex: none; }
.kv { padding: 11px 16px; border-bottom: 0.5px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv-k { font-size: 13px; color: var(--ink-500); }
.kv-v { color: var(--brand-ink); overflow-wrap: anywhere; }
.kv-v--link { color: var(--brand-purple); }

/* Avatars and badges */
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(180deg, var(--lav-200), var(--lav-300)); color: var(--purple-900);
  font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.avatar--md { width: 30px; height: 30px; font-size: 11px; }
.monogram { width: 104px; height: 104px; font-size: 40px; letter-spacing: 0.5px; }
.badge-sq {
  flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--lav-50); color: var(--brand-purple);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.badge-sq--top { margin-top: 14px; }
.badge-sq.badge-sq--logo, .org-mark.org-mark--logo { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.badge-sq.badge-sq--logo { padding: 3px; }
.org-mark.org-mark--logo { padding: 12px; }
.badge-sq--logo img, .org-mark--logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--ink-700); white-space: nowrap; }
.pill--warm { background: #E9F7EE; color: var(--ok-ink); }
.pill--steady { background: var(--lav-100); color: var(--purple-600); }
.pill--cooling { background: #FFF4E5; color: var(--warn-ink); }
.pill--cold { background: #EEECF0; color: var(--ink-700); }
.pill--plum { background: var(--lav-50); color: var(--brand-purple); }

/* Check circles */
.check-row { display: flex; align-items: center; transition: opacity .2s; }
.check-row.is-done { opacity: 0.45; }
.check-form { margin: 0; flex: none; }
.check-btn {
  flex: none; width: 44px; height: 44px; margin-left: 4px; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; border-radius: 50%;
}
.check-btn--inline { margin-left: -11px; width: 44px; }
.check-ring {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ring); background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.check-ring svg { display: none; }
.is-done .check-ring { border-color: var(--brand-purple); background: var(--brand-purple); }
.is-done .check-ring svg { display: block; }
.is-done .done-strike { text-decoration: line-through; }
.check-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 4px; border-bottom: 0.5px solid var(--line); }
.check-row:last-child .check-body { border-bottom: 0; }
.check-spacer { flex: none; width: 48px; }

/* Buttons */
.capsule {
  flex: none; text-decoration: none; padding: 0 16px; height: 32px; display: inline-flex; align-items: center;
  border-radius: 16px; background: var(--lav-50); color: var(--brand-purple); font-size: 14px; font-weight: 600;
  border: 0; cursor: pointer; white-space: nowrap;
}
.capsule:hover { color: var(--purple-900); background: var(--lav-100); }
.capsule--solid { background: var(--brand-purple); color: #FFFFFF; }
.capsule--solid:hover { background: var(--purple-hover); color: #FFFFFF; }
.capsule--ghost { background: var(--fill); color: var(--ink-700); }
.capsule--sm { height: 28px; padding: 0 12px; font-size: 13px; }
.inline-form { margin: 0; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field {
  height: 32px; border-radius: 9px; border: 0; background: var(--fill); padding: 0 10px;
  font-size: 14px; color: var(--brand-ink); min-width: 0;
}
select.field { padding-right: 6px; }
.field:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.form-grid { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.form-grid label { font-size: 13px; color: var(--ink-500); display: flex; flex-direction: column; gap: 4px; }

/* ---------- Person header ---------- */
.person-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.person-name { margin: 10px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -0.3px; }
.person-org { color: var(--ink-500); }
.person-org a { color: inherit; text-decoration: none; }
.person-org a:hover { color: var(--brand-purple); }
.actions { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.actions form { margin: 0; display: contents; }
.action-tile {
  width: 84px; border: 0; border-radius: 12px; padding: 10px 0 8px; background: var(--surface);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06); display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--brand-purple); font-size: 12px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.action-tile:hover { color: var(--purple-900); box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.08); }
.action-tile:disabled { color: var(--ink-300); cursor: default; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06); }

.summary-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--purple-600); }
.summary-text { margin: 10px 0 0; font-size: 17px; line-height: 1.55; }
.summary-text sup a, .answer-text sup a { font-size: 11px; font-weight: 600; text-decoration: none; padding: 0 2px; }
.facts { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--ink-500); }
.facts b { color: var(--brand-ink); font-weight: 600; }

/* Segmented control */
.seg { display: flex; padding: 2px; border-radius: 9px; background: var(--fill); }
.seg button, .seg a {
  font: inherit; font-size: 13px; font-weight: 500; min-width: 64px; min-height: 30px; padding: 0 12px;
  border: 0; border-radius: 7px; cursor: pointer; color: var(--brand-ink); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.seg [aria-pressed="true"], .seg [aria-current="page"] { font-weight: 600; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* ---------- Ask ---------- */
.ask-bar {
  display: flex; align-items: center; gap: 12px; padding: 0 8px 0 18px; height: 56px; margin: 0;
  background: var(--surface); border-radius: 16px; box-shadow: 0 6px 24px rgba(40,23,49,0.08), 0 0 0 0.5px rgba(0,0,0,0.06);
}
.ask-bar:focus-within { box-shadow: 0 6px 24px rgba(40,23,49,0.08), 0 0 0 2px var(--focus); }
.ask-bar svg { flex: none; }
.ask-input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 18px; color: var(--brand-ink); background: transparent; }
.ask-input:focus-visible { outline: none; }
.ask-submit { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand-purple); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ask-submit:hover { background: var(--purple-hover); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 500; min-height: 36px; padding: 0 14px; border-radius: 18px;
  cursor: pointer; border: 0; background: var(--fill); color: var(--ink-700);
  display: inline-flex; align-items: center; text-decoration: none;
}
.chip:hover { color: var(--brand-ink); background: var(--fill-hover); }
.chip[aria-current="true"] { background: var(--brand-purple); color: #FFFFFF; }
.answer { margin-top: 10px; padding: 22px 24px; }
.answer-text { margin: 10px 0 0; font-size: 18px; line-height: 1.55; letter-spacing: -0.1px; }
.answer-model { margin-top: 12px; font-size: 12px; color: var(--ink-400); }
.footnote { font-size: 12px; color: var(--ink-400); text-align: center; }

/* ---------- Pipeline board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; }
.lane-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 6px 8px 6px; }
.lane-h h2 { margin: 0; font-size: 15px; font-weight: 700; }
.lane-cards { display: flex; flex-direction: column; gap: 10px; }
.deal { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 6px; }
.deal-name { font-weight: 600; text-decoration: none; color: var(--brand-ink); }
.deal-name:hover { color: var(--brand-purple); }
.deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lane-empty { padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--line); color: var(--ink-400); font-size: 13px; }

/* ---------- Status ---------- */
.banner { display: flex; gap: 14px; padding: 18px 20px; border-radius: 16px; background: #FFF4E5; color: #5C3A00; }
.banner svg { flex: none; margin-top: 2px; }
.banner h2 { margin: 0; font-size: 17px; font-weight: 700; color: #3D2600; }
.banner p { margin: 6px 0 0; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.scope-list { margin: 8px 0 0; padding-left: 18px; }
.scope-list li { margin: 2px 0; }

.error-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.error-card { max-width: 440px; width: 100%; text-align: center; padding: 32px 28px; }
.error-card .brand { justify-content: center; padding: 0; margin-bottom: 18px; }
.brand--ink, .brand--ink:hover { color: var(--brand-purple); }
.brand--ink .brand-tag { color: var(--purple-600); }
.error-card h1 { margin: 0; font-size: 24px; font-weight: 700; }
.error-card p { color: var(--ink-500); margin: 10px 0 0; }

/* ---------- Phone: sidebar becomes a top bar ---------- */
@media (max-width: 760px) {
  .shell { flex-direction: column; flex-wrap: nowrap; }
  .sidebar {
    flex: none; max-width: none; width: 100%; padding: 12px 16px 10px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand orbs" "search search" "nav nav";
    align-items: center; column-gap: 12px;
    border-right: 0; overflow: hidden;
  }
  .brand { grid-area: brand; padding: 0; }
  .side-search { grid-area: search; margin: 10px 0 0; }
  .nav-wrap { grid-area: nav; min-width: 0; display: flex; gap: 2px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
  .nav-wrap::-webkit-scrollbar { display: none; }
  .nav-list, .nav-list--minor { margin: 0; flex-direction: row; flex: none; }
  .nav-item, .nav-list--minor .nav-item { min-height: 36px; padding: 6px 12px; white-space: nowrap; font-size: 14px; }
  .nav-item svg { display: none; }
  .side-label, .pinned-list, .side-status, .side-tagline { display: none; }
  .orbs-link { grid-area: orbs; margin: 0; padding: 0; flex-direction: row; gap: 6px; }
  .orb-box { width: 52px; height: 52px; overflow: visible; }
  .orb-stage { transform: scale(0.2167); transform-origin: 0 0; }
  .orbs-caption { font-size: 12px; }
  .main, .main--ask, .main--detail { flex: 1 1 auto; padding: 20px 16px 48px; }
  .main--ask { padding-top: 28px; }
  .title { font-size: 28px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { gap: 22px; }
  .col-main, .col-side { flex-basis: 100%; }
  .check-body { flex-wrap: wrap; }
  .card--pad, .answer { padding: 16px 18px; }
  .ask-input { font-size: 16px; }
}
@media (min-width: 761px) {
  .nav-wrap { display: contents; }
}

.row-main > span { display: block; }
.row-link { color: inherit; text-decoration: none; }
.row-link:hover { color: var(--brand-purple); }
.org-mark { width: 104px; height: 104px; border-radius: 26px; background: var(--lav-50); color: var(--brand-purple); font-size: 40px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: 0.5px; }
.row-body--pull { margin-left: -12px; }
.row-body--pull .sub, .row-body--pull .warn { margin-top: 2px; }
.deal .text, .deal .sub { margin-top: 0; }
.deal .field { height: 28px; font-size: 13px; }
.kv .sub { display: inline-block; }
.kv-link { display: inline-block; margin-top: 4px; font-size: 13px; }
.ask-bar--compact { height: 48px; }
.ask-bar--compact .ask-input { font-size: 16px; }
.field--value { width: 120px; }
.field--source { width: 200px; }
.actions--start { justify-content: flex-start; }
.compose-note { margin: 0 0 14px; }
.banner .banner-gap { margin-top: 10px; }
.form-grid--sep { border-top: 0.5px solid var(--line); }

/* ---------- Calendar ---------- */
.cal-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chips--start { justify-content: flex-start; }
.main--cal { height: 100vh; padding-top: 28px; padding-bottom: 24px; }
.main--cal .page { max-width: none; height: 100%; gap: 16px; }
.main--cal .page > * { flex: none; }
.main--cal .page > .cal-weekgrid, .main--cal .page > .cal-month { flex: 1; min-height: 360px; }
.cal-weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-col { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--card-shadow); overflow: hidden; }
.cal-col.is-past { background: var(--brand-warm); }
.cal-col-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px; border-bottom: 0.5px solid var(--line); }
.cal-col-dow { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-400); }
.cal-col.is-today .cal-num { background: var(--brand-purple); color: #FFFFFF; }
.cal-col-body { flex: 1; min-height: 0; overflow: hidden; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cal-col-body.is-compact .cal-card-org, .cal-col-body.is-compact .cal-card-foot { display: none; }
.cal-col-body.is-compact .cal-card { padding: 4px 7px; }
.cal-col-body.is-compact .cal-card-title { -webkit-line-clamp: 1; }
.cal-more-btn { flex: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--brand-purple); background: transparent; border: 0; padding: 2px; text-align: left; cursor: pointer; }
.cal-more-btn:hover { text-decoration: underline; }
.cal-dialog { width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgba(40,23,49,0.25); }
.cal-dialog::backdrop { background: rgba(28,28,30,0.3); }
.cal-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-weight: 700; }
.cal-dialog-head button { font: inherit; font-size: 13px; font-weight: 600; color: var(--brand-purple); background: transparent; border: 0; cursor: pointer; min-height: 32px; }
.cal-dialog-body { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 16px; overflow-y: auto; max-height: calc(100vh - 140px); }
.cal-free { font-size: 12px; color: var(--ink-400); padding: 2px; }
.cal-card { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; border-radius: 9px; background: var(--fill-soft); border-left: 3px solid var(--line-strong); font-size: 12px; line-height: 1.3; min-width: 0; }
.cal-card--ext { background: var(--lav-50); border-left-color: var(--brand-purple); }
.cal-card.is-past { opacity: 0.6; }
.cal-card.is-declined .cal-card-title { text-decoration: line-through; color: var(--ink-400); }
.cal-card-time { font-size: 11px; font-weight: 600; color: var(--purple-600); font-variant-numeric: tabular-nums; }
.cal-card-title { font-weight: 600; color: var(--brand-ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-card-org { color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.cal-card-foot a { text-decoration: none; }
.cal-join { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--brand-purple); color: #FFFFFF !important; }
.cal-month .cal-cell { min-height: 0; }
.cal-month { display: flex; flex-direction: column; }
.cal-month .cal-week { flex: 1; min-height: 0; }
.cal-month .cal-cell { overflow: hidden; }
.cal-chip[hidden], .cal-card[hidden] { display: none; }
.cal-chip, .cal-card, .cal-more { flex-shrink: 0; }
.cal-dow, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow span { padding: 10px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-400); }
.cal-week { border-top: 0.5px solid var(--line); }
.cal-cell { min-height: 108px; min-width: 0; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; border-left: 0.5px solid var(--line-soft); }
.cal-cell:first-child { border-left: 0; }
.cal-cell:hover { background: rgba(74,46,94,0.04); }
.cal-cell.is-out { background: var(--brand-warm); }
.cal-cell.is-out .cal-num { color: var(--ink-400); }
.cal-num { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--ink-700); }
.cal-cell.is-today .cal-num { background: var(--brand-purple); color: #FFFFFF; }
.cal-chip { display: block; padding: 2px 6px; border-radius: 5px; font-size: 12px; line-height: 1.35; background: var(--fill-soft); color: var(--brand-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip b { font-weight: 600; color: var(--brand-purple); }
.cal-chip--ext { background: var(--lav-50); }
.cal-chip.is-declined { text-decoration: line-through; color: var(--ink-400); }
.cal-more { font-size: 11px; color: var(--ink-400); padding-left: 6px; }
@media (max-width: 760px) {
  .main--cal { height: auto; }
  .cal-weekgrid { grid-template-columns: 1fr; }
  .cal-col-body { overflow: visible; }
  .cal-cell { min-height: 64px; padding: 4px 3px; }
  .cal-chip { font-size: 10px; padding: 1px 3px; }
  .cal-chip b { display: none; }
  .cal-dow span { padding: 8px 4px 4px; font-size: 10px; }
}

/* Meetings with a saved brief: dark purple customer block, light purple internal notes block beside it. */
:root { --brief-bg: var(--brand-purple); --brief-fg: #FFFFFF; --brief-time: var(--focus-on-purple); --notes-bg: var(--lav-100); --notes-fg: var(--purple-900); --notes-edge: var(--brand-lavender); --notes-sub: #5A3F70; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 12px; color: var(--ink-500); }
.cal-key { width: 12px; height: 12px; border-radius: 4px; margin-left: 8px; }
.cal-key:first-child { margin-left: 0; }
.cal-key--brief { background: var(--brief-bg); }
.cal-key--notes { background: var(--notes-bg); box-shadow: inset 0 0 0 1px var(--notes-edge); }
.cal-pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4px; align-items: stretch; flex-shrink: 0; }
.cal-pair[hidden] { display: none; }
.cal-card--brief { background: var(--brief-bg); border-left-color: var(--brief-bg); }
.cal-card--brief .cal-card-time { color: var(--brief-time); }
.cal-card--brief .cal-card-title, .cal-card--brief .cal-card-title a, .cal-card--brief .cal-card-org { color: var(--brief-fg); }
.cal-card--brief .cal-card-title a { text-decoration: none; }
.cal-card--brief .cal-card-title a:hover { text-decoration: underline; }
.cal-card--brief.is-declined .cal-card-title a { color: var(--brief-time); }
.cal-card--notes { background: var(--notes-bg); border-left-color: var(--notes-edge); }
.cal-card--notes .cal-card-time { color: var(--notes-sub); }
.cal-card--notes .cal-card-title, .cal-card--notes .cal-card-title a { color: var(--notes-fg); font-size: 11px; letter-spacing: 0.02em; }
.cal-card--notes .cal-card-title a { text-decoration: none; }
.cal-card--notes .cal-card-title a:hover { text-decoration: underline; }
.cal-card--notes .cal-saved { color: var(--notes-sub); font-weight: 600; font-size: 11px; }
.cal-month .cal-cell { position: relative; }
.cal-cell-hit { position: absolute; inset: 0; z-index: 0; }
.cal-cell:hover { background: rgba(74,46,94,0.04); }
.cal-chip--brief, .cal-chip--notes { position: relative; z-index: 1; text-decoration: none; }
.cal-chip--brief { background: var(--brief-bg); color: var(--brief-fg); }
.cal-chip--brief b { color: var(--brief-time); }
.cal-chip--brief:hover, .cal-chip--notes:hover { text-decoration: underline; }
.cal-chip--notes { background: var(--notes-bg); color: var(--notes-fg); font-size: 11px; margin-left: 8px; }
.cal-chip--brief.is-declined { color: var(--brief-time); }
@media (max-width: 760px) {
  .cal-pair { grid-template-columns: 1fr 1fr; }
  .cal-chip--notes { margin-left: 4px; }
}

/* ---------- Sidebar never taller than the screen ---------- */
@media (min-width: 761px) {
  .sidebar { position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .sidebar > *, .nav-list { flex-shrink: 0; }
  .pinned-list { flex: 0 1 auto; min-height: 0; overflow: hidden; }
}
@media (min-width: 761px) and (max-height: 900px) {
  .orb-box { width: 132px; height: 132px; }
  .orb-stage { transform: scale(0.55); transform-origin: 0 0; }
}
@media (min-width: 761px) and (max-height: 700px) {
  .orb-box { display: none; }
}

/* ---------- Calendar insights ---------- */
.ci-months { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.ci-month { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.ci-month-label { color: var(--ink-500); }
.ci-bar { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; min-width: 0; }
.ci-bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--brand-purple); }
.ci-month-hours { color: var(--ink-700); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 64px; }
.ci-hours { flex: none; font-size: 13px; color: var(--ink-400); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ci-hours b { font-weight: 600; color: var(--ink-700); }
@media (max-width: 760px) {
  .ci-hours-unit { display: none; }
  .ci-hours { font-size: 12px; }
}

/* ---------- Pipeline insights ---------- */
.seg [aria-current="true"] { font-weight: 600; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.pill--alert { background: #FDECEC; color: var(--err-ink); }
.deal-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.insight-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: -14px; }
.insight { display: block; padding: 12px 14px; border-radius: 16px; background: var(--surface); color: var(--ink-700); text-decoration: none; font-size: 14px; box-shadow: var(--card-shadow); }
.insight b { font-size: 18px; color: var(--brand-ink); }
.insight .sub { display: inline; }
.insight:hover { background: var(--lav-50); }
.insight--alert b { color: var(--err-ink); }
.insight--warn b { color: var(--warn-ink); }
.pipe-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: -16px; }
.pipe-filters .seg { flex-wrap: wrap; }
.chip--sm { min-height: 30px; font-size: 13px; padding: 0 12px; }
.views-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: -16px; }
.views-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.view-chip { display: inline-flex; align-items: center; max-width: 100%; height: 30px; border-radius: 15px; background: var(--fill); }
.view-chip a { padding: 0 4px 0 12px; font-size: 13px; font-weight: 500; color: var(--ink-700); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.view-chip.is-current { background: var(--brand-purple); }
.view-chip.is-current a, .view-chip.is-current .view-chip-x { color: #FFFFFF; }
.view-chip form { margin: 0; display: inline-flex; }
.view-chip-x { border: 0; background: transparent; color: var(--ink-500); font-size: 16px; line-height: 1; width: 28px; height: 30px; cursor: pointer; border-radius: 0 15px 15px 0; }
.view-chip-x:hover { color: var(--err-ink); }
.views-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.field--view { width: 160px; }
.field--month { width: 150px; }
.forecast-card { padding-top: 4px; }
.forecast-totals { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 12px 16px; border-bottom: 0.5px solid var(--line); }
.forecast-num { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; color: var(--brand-ink); }
.forecast-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border-bottom: 0.5px solid var(--line); }
.forecast-month { display: flex; flex-direction: column; gap: 1px; padding: 10px 16px; }
.forecast-month-l { font-size: 13px; color: var(--ink-500); }
.forecast-month-v { font-weight: 600; color: var(--brand-ink); }
.forecast-month.is-empty .forecast-month-v { color: var(--ink-400); font-weight: 500; }
@media (max-width: 760px) {
  .insight-strip, .pipe-filters, .views-bar { margin-top: -6px; }
  .views-tools { margin-left: 0; width: 100%; }
  .views-tools .inline-form { flex: 1 1 auto; }
  .field--view { flex: 1 1 120px; width: auto; }
  .forecast-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-chip a { max-width: 160px; }
}

/* ---------- Pipeline list ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: -14px; }
.kpi { background: var(--surface); border-radius: 16px; box-shadow: var(--card-shadow); padding: 14px 18px; }
.kpi-k { font-size: 13px; color: var(--ink-500); }
.kpi-v { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; color: var(--brand-ink); line-height: 1.2; }
.kpi-s { font-size: 12px; color: var(--ink-400); }
.insight-strip--compact { margin-top: -14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.insight-strip--compact .insight { padding: 8px 12px; font-size: 13px; }
.insight-strip--compact .insight .sub { display: block; font-size: 12px; }
.pipe-layout { margin-left: auto; }
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.funnel-step { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border-radius: 14px; background: var(--lav-50); text-decoration: none; color: var(--brand-ink); }
.funnel-step:hover { background: var(--lav-100); }
.funnel-step.is-empty { background: var(--fill-faint); color: var(--ink-400); }
.funnel-n { font-size: 22px; font-weight: 700; line-height: 1.1; }
.funnel-l { font-size: 13px; font-weight: 600; }
.funnel-v { font-size: 12px; color: var(--ink-500); }
.forecast-empty { font-size: 14px; color: var(--ink-700); }
.stage-group { margin-top: 4px; scroll-margin-top: 16px; }
.stage-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 8px 16px; }
.stage-h .section-h { margin: 0; }
.pipe-scroll { overflow-x: auto; }
.pipe-table { min-width: 880px; table-layout: fixed; }
.pipe-table .c-deal { width: 33%; }
.pipe-table .c-flags { width: 15%; }
.pipe-table .c-contact { width: 14%; }
.pipe-table .c-value { width: 20%; }
.pipe-table .c-stage { width: 18%; }
.pipe-owner { font-size: 12px; color: var(--ink-400); margin-left: 6px; }
.pipe-table th, .pipe-table td { padding: 8px 12px; }
.pipe-table td { vertical-align: middle; }
.pipe-stage-form { flex-wrap: nowrap; gap: 6px; }
.pipe-stage-form select.field { width: 110px; padding: 4px 8px; background: var(--surface); box-shadow: var(--card-shadow); }
.pipe-table td small { color: var(--ink-400); font-size: 12px; margin-top: 2px; }
.pipe-deal { overflow-wrap: anywhere; }
.pipe-reason { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pipe-flags { }
.pipe-flags .pill { margin: 0 4px 4px 0; height: 20px; font-size: 11px; padding: 0 8px; }
.pipe-when { font-size: 13px; }
.pipe-value { }
.pipe-value .inline-form { flex-wrap: nowrap; justify-content: flex-end; }
.field--value { width: 96px; text-align: right; }
.field--value.is-unset { background: #FFF4E5; }
.lost-group { margin-top: 8px; }
.lost-group summary { cursor: pointer; }
@media (max-width: 760px) {
  .kpis, .insight-strip--compact { margin-top: -6px; }
  .pipe-layout { margin-left: 0; }
}

/* Phone: each deal row becomes a small card, so nothing scrolls sideways. */
@media (max-width: 640px) {
  .pipe-scroll { overflow-x: visible; }
  .pipe-table { min-width: 0; table-layout: auto; }
  .pipe-table thead, .pipe-table colgroup { display: none; }
  .pipe-table, .pipe-table tbody, .pipe-table tr, .pipe-table td { display: block; width: 100%; }
  .pipe-table tr { padding: 12px 14px; border-bottom: 0.5px solid var(--line); }
  .pipe-table tr:last-child { border-bottom: 0; }
  .pipe-table.mt-table td { padding: 4px 0; border: 0; text-align: left; }
  .pipe-table td[data-empty] { display: none; }
  .pipe-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-400); }
  .pipe-table.mt-table td.num { text-align: left; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .insight-strip--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe-value .inline-form { justify-content: flex-start; }
  .pipe-stage-form select.field { width: 120px; }
  .stage-h { margin-left: 4px; }
  .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-v { font-size: 24px; }
}

/* ---------- Chat ---------- */
.main--chat { height: 100vh; padding: 24px 32px 16px; }
.main--chat .page { max-width: 1120px; height: 100%; gap: 12px; }
.main--chat .page > * { flex: none; }
.main--chat .page > .chat { flex: 1 1 auto; min-height: 0; }
.chat { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; }
.chat-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.chat-new { align-self: flex-start; gap: 6px; }
.chat-list { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.chat-link { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 9px; color: var(--brand-ink); text-decoration: none; min-width: 0; }
.chat-link:hover { color: var(--brand-ink); background: var(--fill-soft); }
.chat-link[aria-current="page"] { background: rgba(74,46,94,0.10); }
.chat-link-title { font-size: 14px; font-weight: 500; }
.chat-link-meta { font-size: 12px; color: var(--ink-400); }
.chat-list-empty { padding: 8px 10px; font-size: 13px; color: var(--ink-400); }
.chat-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.chat-head { flex: none; display: flex; align-items: center; gap: 10px; min-height: 36px; }
.chat-title { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.2px; }
.chat-picker { display: none; position: relative; flex: none; }
.chat-picker > summary { list-style: none; }
.chat-picker > summary::-webkit-details-marker { display: none; }
.chat-picker-pop { position: absolute; z-index: 5; top: 36px; left: 0; width: min(300px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--surface); border-radius: 16px; box-shadow: 0 12px 40px rgba(40,23,49,0.18), 0 0 0 0.5px rgba(0,0,0,0.06); }
.chat-picker-pop .chat-list { overflow: visible; }
.chat-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 8px; border-radius: 16px; scroll-padding: 12px; }
.chat-scroll:focus-visible { outline-offset: -2px; }
.chat-scroll > .flash { margin-bottom: 12px; }
.chat-empty { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 16px 8px; text-align: center; }
.chat-empty .lede { max-width: 520px; margin: 0; }
.chat-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; min-width: 0; }
.msg--user { justify-content: flex-end; }
.bubble { min-width: 0; max-width: min(720px, 100%); overflow-wrap: anywhere; }
.bubble--me { max-width: min(560px, 85%); padding: 10px 16px; border-radius: 18px 18px 6px 18px; background: var(--brand-purple); color: #FFFFFF; white-space: pre-wrap; }
.bubble--bot { width: 100%; padding: 14px 18px; border-radius: 18px 18px 18px 6px; background: var(--surface); box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 10px; }
.msg-text { margin: 0; font-size: 16px; line-height: 1.55; }
.msg-text sup a { font-size: 11px; font-weight: 600; text-decoration: none; padding: 0 2px; }
.msg-sources > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--purple-600); min-height: 28px; display: inline-flex; align-items: center; }
.msg-source-list { margin-top: 6px; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08); }
.msg-source-list .row-body { padding: 9px 14px 9px 0; }
.chat-badge { width: 26px; height: 26px; border-radius: 7px; }
.draft-card { margin: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--lav-50); box-shadow: 0 0 0 0.5px rgba(74,46,94,0.15); }
.draft-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-purple); }
.draft-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-500); }
.draft-row > span { flex: none; width: 54px; }
.draft-row .field { flex: 1; width: 100%; background: var(--surface); box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08); }
.draft-body { height: auto; min-height: 150px; padding: 10px 12px; line-height: 1.5; resize: vertical; background: var(--surface); box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08); white-space: pre-wrap; }
.draft-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.draft-actions .meta { flex: 1 1 200px; }
.chat-compose { position: relative; flex: none; display: flex; align-items: flex-end; gap: 10px; margin: 0; padding: 8px 8px 8px 18px; background: var(--surface); border-radius: 22px; box-shadow: 0 6px 24px rgba(40,23,49,0.08), 0 0 0 0.5px rgba(0,0,0,0.06); }
.chat-compose:focus-within { box-shadow: 0 6px 24px rgba(40,23,49,0.08), 0 0 0 2px var(--focus); }
.chat-input { flex: 1; min-width: 0; height: 40px; max-height: 160px; padding: 9px 0; border: 0; outline: none; resize: none; background: transparent; font: inherit; font-size: 16px; line-height: 22px; color: var(--brand-ink); }
.chat-input:focus-visible { outline: none; }
.chat-compose[data-busy] .ask-submit { opacity: 0.5; cursor: progress; }
.chat-foot { flex: none; }
.msg-pending .bubble--bot { flex-direction: row; align-items: center; gap: 6px; width: auto; color: var(--ink-500); font-size: 14px; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--focus); animation: orbpulse 1.2s ease-in-out infinite; }
.chat-dot:nth-child(2) { animation-delay: .2s; }
.chat-dot:nth-child(3) { animation-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .chat-dot { animation: none; } }
@media (max-width: 960px) and (min-width: 761px) {
  .chat { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 760px) {
  .shell:has(.main--chat) { height: 100vh; height: 100dvh; }
  .main--chat { flex: 1 1 auto; min-height: 0; height: auto; padding: 10px 12px 10px; display: flex; flex-direction: column; }
  .main--chat .page { flex: 1 1 auto; min-height: 0; height: auto; gap: 8px; }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-side { display: none; }
  .chat-picker { display: block; }
  .chat-title { font-size: 18px; }
  .bubble--bot { padding: 12px 14px; }
  .bubble--me { max-width: 88%; }
  .msg-text { font-size: 15px; }
  .chat-empty .title { font-size: 24px; }
  .chat-empty .lede { font-size: 14px; }
  .chat-foot { display: none; }
  .draft-row > span { width: 48px; }
}

/* ---------- Today header ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 16px 24px; }
.hero-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 8px; color: var(--ink-500); font-size: 15px; }
.hero-clock time { font-size: 22px; font-weight: 600; color: var(--brand-purple); font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.hero-next { min-width: 0; overflow-wrap: anywhere; }
.hero-next a { font-weight: 600; text-decoration: none; }
.hero-join { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-left: 4px; border-radius: 11px; background: var(--brand-purple); color: #FFFFFF !important; font-size: 12px; }
.hero-wx { flex: 0 1 440px; min-width: 0; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--lav-50) 0%, #FFFFFF 100%); box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 10px; }
.wx-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wx-temp { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; }
.wx-sub { font-size: 13px; color: var(--ink-500); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-range { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--ink-500); text-align: right; }
.wx-range span:first-child { font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.wx-hours { margin: 0; padding: 8px 0 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; border-top: 0.5px solid var(--line-soft); }
.wx-hours li { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-500); }
.wx-hours b { font-size: 13px; color: var(--brand-ink); }
.wx { flex: none; }
@media (max-width: 760px) {
  .hero-wx { flex-basis: 100%; }
  .wx-range { display: none; }
}

/* Seasonal weather card: theme by meteorological season (weather.season), particles behind the content. */
.hero-wx { position: relative; overflow: hidden; isolation: isolate; }
.hero-wx > :not(.wx-fx) { position: relative; z-index: 1; }
.hero-wx--fall { background: linear-gradient(135deg, #FFF2E2 0%, #FBE2CF 55%, #F5E6EF 100%); --season: #A9471A; --season-ink: #7A3212; }
.hero-wx--winter { background: linear-gradient(135deg, #F2F7FD 0%, #E3EDF9 55%, #EFEBF7 100%); --season: #3D6A9C; --season-ink: #2C4F78; }
.hero-wx--spring { background: linear-gradient(135deg, #FDF0F5 0%, #F4F0FA 50%, #EAF7EC 100%); --season: #A8467A; --season-ink: #7E2F5A; }
.hero-wx--summer { background: linear-gradient(135deg, #FFF7DC 0%, #FFF0E0 45%, #E5F4FF 100%); --season: #9A5A00; --season-ink: #6E4100; }
.hero-wx--fall .wx-range span:first-child, .hero-wx--winter .wx-range span:first-child,
.hero-wx--spring .wx-range span:first-child, .hero-wx--summer .wx-range span:first-child { color: var(--season-ink); }
.wx-season { align-self: flex-end; display: inline-flex; align-items: center; gap: 5px; height: 20px; margin: -4px -6px -6px 0; padding: 0 9px 0 7px; border-radius: 10px; background: var(--season, var(--brand-purple)); color: #FFFFFF; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.wx-season svg { flex: none; }
.wx-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.wx-p { position: absolute; left: var(--x); top: -28px; display: block; opacity: 0; font-style: normal; animation: wxfall var(--dur) linear var(--delay) infinite; }
.wx-p b { display: block; animation: wxsway calc(var(--dur) / 2.5) ease-in-out var(--delay) infinite alternate; }
.wx-p svg { display: block; }
@keyframes wxfall { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: var(--o, 0.6); } 88% { opacity: var(--o, 0.6); } 100% { transform: translateY(215px); opacity: 0; } }
@keyframes wxsway { from { transform: translateX(calc(var(--sway) * -1)) rotate(0deg); } to { transform: translateX(var(--sway)) rotate(var(--spin)); } }
.hero-wx--fall .wx-p { --o: 0.85; }
.hero-wx--fall .wx-p--0 { color: #C4521C; }
.hero-wx--fall .wx-p--1 { color: #E0861F; }
.hero-wx--fall .wx-p--2 { color: #D4A420; }
.hero-wx--fall .wx-p--3 { color: #8E3517; }
.hero-wx--winter .wx-p { --o: 0.85; color: #7FA6D3; }
.hero-wx--winter .wx-p--1, .hero-wx--winter .wx-p--3 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(61,106,156,0.5)); }
.hero-wx--winter .wx-p b { animation-timing-function: ease-in-out; }
.hero-wx--spring .wx-p { --o: 0.85; }
.hero-wx--spring .wx-p--0, .hero-wx--spring .wx-p--2 { color: #EE8DB3; }
.hero-wx--spring .wx-p--1 { color: #F7B6CE; }
.hero-wx--spring .wx-p--3 { color: #C9A5E3; }
.wx-fx--glint .wx-p { top: auto; bottom: -10px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, #FFE07A 0%, rgba(255,184,0,0.55) 45%, rgba(255,184,0,0) 72%); animation-name: wxrise; }
.wx-fx--glint .wx-p--1, .wx-fx--glint .wx-p--3 { width: 15px; height: 15px; }
@keyframes wxrise { 0% { transform: translate(0, 0) scale(0.6); opacity: 0; } 25% { opacity: 0.9; } 70% { opacity: 0.75; } 100% { transform: translate(var(--sway), -190px) scale(1.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .wx-p, .wx-p b { animation: none; }
  .wx-p { top: var(--y); opacity: 0.45; }
  .wx-fx--glint .wx-p { bottom: auto; }
  .wx-p b { transform: rotate(var(--spin)); }
}
.field--note { width: 100%; height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; font-family: inherit; line-height: 1.4; }
.note-body { font-size: 14px; color: var(--brand-ink); white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 2px; }
.lane-pace { padding: 0 4px 6px; margin-top: -4px; }

/* Quote of the day (quotes.for_day), tinted to the season. */
.quote { position: relative; margin: 0; padding: 14px 28px 14px 60px; border-radius: 16px; background: var(--surface); box-shadow: var(--card-shadow); overflow: hidden; --season: var(--brand-purple); }
.quote::before { content: "\201C"; position: absolute; left: 16px; top: 4px; font-family: var(--font-serif); font-size: 68px; line-height: 1; color: var(--season); opacity: 0.85; }
.quote::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 38%; background: var(--wash); opacity: 0.7; pointer-events: none; }
.quote--fall { --season: #A9471A; --wash: linear-gradient(90deg, rgba(251,226,207,0), #FBE2CF); }
.quote--winter { --season: #3D6A9C; --wash: linear-gradient(90deg, rgba(227,237,249,0), #E3EDF9); }
.quote--spring { --season: #A8467A; --wash: linear-gradient(90deg, rgba(253,240,245,0), #FDE6EF); }
.quote--summer { --season: #9A5A00; --wash: linear-gradient(90deg, rgba(255,240,224,0), #FFEFD2); }
.quote > * { position: relative; z-index: 1; }
.quote-theme { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--season); }
.quote blockquote { margin: 2px 0 0; }
.quote p { margin: 0; font-family: var(--font-serif); font-size: clamp(18px, 1.55vw, 22px); line-height: 1.25; letter-spacing: -0.2px; color: var(--brand-ink); text-wrap: pretty; }
.quote-by { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink-500); }
.quote-by::before { content: ""; display: inline-block; width: 16px; height: 2px; margin: 0 8px 4px 0; vertical-align: middle; background: var(--season); border-radius: 1px; }
@media (max-width: 760px) {
  .quote { padding: 12px 16px 12px 44px; }
  .quote::before { left: 10px; font-size: 56px; }
}

/* Holidays (holidays.py): badge and quote accent, plus particle colors. */
.hero-wx[class*="hero-wx--h-"] .wx-p { --o: 0.9; }
.hero-wx--h-new_year, .quote--h-new_year { --season: var(--brand-purple); }
.hero-wx--h-new_year .wx-p--0 { color: #D4A420; }
.hero-wx--h-new_year .wx-p--1 { color: #A7B0BE; }
.hero-wx--h-new_year .wx-p--2 { color: var(--focus); }
.hero-wx--h-new_year .wx-p--3 { color: #E8C35A; }
.hero-wx--h-new_years_eve, .quote--h-new_years_eve { --season: var(--brand-purple); }
.hero-wx--h-new_years_eve .wx-p--0 { color: #D4A420; }
.hero-wx--h-new_years_eve .wx-p--1 { color: #A7B0BE; }
.hero-wx--h-new_years_eve .wx-p--2 { color: var(--focus); }
.hero-wx--h-new_years_eve .wx-p--3 { color: #E8C35A; }
.hero-wx--h-mardi_gras, .quote--h-mardi_gras { --season: #5E2780; }
.hero-wx--h-mardi_gras .wx-p--0 { color: #6B2D8C; }
.hero-wx--h-mardi_gras .wx-p--1 { color: #1E8C45; }
.hero-wx--h-mardi_gras .wx-p--2 { color: #D9A520; }
.hero-wx--h-mardi_gras .wx-p--3 { color: #8E4FB5; }
.hero-wx--h-valentines, .quote--h-valentines { --season: #C2185B; }
.hero-wx--h-valentines .wx-p--0 { color: #E0445E; }
.hero-wx--h-valentines .wx-p--1 { color: #F28AA0; }
.hero-wx--h-valentines .wx-p--2 { color: #C2185B; }
.hero-wx--h-valentines .wx-p--3 { color: #FFB3C1; }
.hero-wx--h-st_patricks, .quote--h-st_patricks { --season: #1B7A3A; }
.hero-wx--h-st_patricks .wx-p--0 { color: #2E9E4F; }
.hero-wx--h-st_patricks .wx-p--1 { color: #6CC070; }
.hero-wx--h-st_patricks .wx-p--2 { color: #1B7A3A; }
.hero-wx--h-st_patricks .wx-p--3 { color: #A5D99A; }
.hero-wx--h-easter, .quote--h-easter { --season: #7A4E9C; }
.hero-wx--h-easter .wx-p--0 { color: #F4A3C2; }
.hero-wx--h-easter .wx-p--1 { color: #C9A5E3; }
.hero-wx--h-easter .wx-p--2 { color: #A8D8B9; }
.hero-wx--h-easter .wx-p--3 { color: #FFD66B; }
.hero-wx--h-mothers_day, .quote--h-mothers_day { --season: #A8467A; }
.hero-wx--h-mothers_day .wx-p--0 { color: #EE8DB3; }
.hero-wx--h-mothers_day .wx-p--1 { color: #F7B6CE; }
.hero-wx--h-mothers_day .wx-p--2 { color: #C9A5E3; }
.hero-wx--h-mothers_day .wx-p--3 { color: #E86A9A; }
.hero-wx--h-mlk, .quote--h-mlk { --season: var(--brand-purple); }
.hero-wx--h-mlk .wx-p--0 { color: #D4A420; }
.hero-wx--h-mlk .wx-p--1 { color: var(--focus); }
.hero-wx--h-mlk .wx-p--2 { color: #E8C35A; }
.hero-wx--h-mlk .wx-p--3 { color: var(--purple-600); }
.hero-wx--h-presidents, .quote--h-presidents { --season: #3C3B6E; }
.hero-wx--h-presidents .wx-p--0 { color: #B22234; }
.hero-wx--h-presidents .wx-p--1 { color: #3C3B6E; }
.hero-wx--h-presidents .wx-p--2 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-presidents .wx-p--3 { color: #B22234; }
.hero-wx--h-memorial, .quote--h-memorial { --season: #3C3B6E; }
.hero-wx--h-memorial .wx-p--0 { color: #B22234; }
.hero-wx--h-memorial .wx-p--1 { color: #3C3B6E; }
.hero-wx--h-memorial .wx-p--2 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-memorial .wx-p--3 { color: #B22234; }
.hero-wx--h-independence, .quote--h-independence { --season: #3C3B6E; }
.hero-wx--h-independence .wx-p--0 { color: #B22234; }
.hero-wx--h-independence .wx-p--1 { color: #3C3B6E; }
.hero-wx--h-independence .wx-p--2 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-independence .wx-p--3 { color: #B22234; }
.hero-wx--h-veterans, .quote--h-veterans { --season: #3C3B6E; }
.hero-wx--h-veterans .wx-p--0 { color: #B22234; }
.hero-wx--h-veterans .wx-p--1 { color: #3C3B6E; }
.hero-wx--h-veterans .wx-p--2 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-veterans .wx-p--3 { color: #B22234; }
.hero-wx--h-juneteenth, .quote--h-juneteenth { --season: #B22234; }
.hero-wx--h-fathers_day, .quote--h-fathers_day { --season: #2C4F78; }
.hero-wx--h-labor, .quote--h-labor { --season: #3D6A9C; }
.hero-wx--h-halloween, .quote--h-halloween { --season: #C2410C; }
.hero-wx--h-halloween .wx-p--0 { color: #F07C1A; }
.hero-wx--h-halloween .wx-p--1 { color: #6B2D8C; }
.hero-wx--h-halloween .wx-p--2 { color: #2B2B2B; }
.hero-wx--h-halloween .wx-p--3 { color: #E0861F; }
.hero-wx--h-thanksgiving, .quote--h-thanksgiving { --season: #8E3517; }
.hero-wx--h-christmas_eve, .quote--h-christmas_eve { --season: #B71C1C; }
.hero-wx--h-christmas_eve .wx-p--0 { color: #C62828; }
.hero-wx--h-christmas_eve .wx-p--1 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-christmas_eve .wx-p--2 { color: #2E7D32; }
.hero-wx--h-christmas_eve .wx-p--3 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-christmas, .quote--h-christmas { --season: #B71C1C; }
.hero-wx--h-christmas .wx-p--0 { color: #C62828; }
.hero-wx--h-christmas .wx-p--1 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }
.hero-wx--h-christmas .wx-p--2 { color: #2E7D32; }
.hero-wx--h-christmas .wx-p--3 { color: #FFFFFF; filter: drop-shadow(0 0 1px rgba(0,0,0,0.35)); }

/* ---------- Saved meeting briefs ---------- */
.br-read { margin: 0; padding: 4px 0; list-style: none; }
.br-read li { padding: 11px 16px; border-bottom: 0.5px solid var(--line); }
.br-read li:last-child { border-bottom: 0; }
.br-src { margin-left: 6px; font-size: 12px; white-space: nowrap; }
.br-src a { color: var(--brand-purple); }
.br-prose { margin: 0; padding: 14px 16px 4px; font-size: 15px; line-height: 1.5; }
.br-from { display: inline-block; min-width: 38px; font-size: 12px; font-weight: 600; color: var(--brand-purple); }
.br-from--them { color: var(--ink-500); }
.br-list { margin: 0; padding: 12px 16px 12px 34px; font-size: 14px; line-height: 1.5; }
.br-list li { padding: 3px 0; }
.br-obj { padding: 11px 16px; border-bottom: 0.5px solid var(--line); }
.br-obj:last-child { border-bottom: 0; }
.br-outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.br-frozen { font-size: 13px; color: var(--ink-400); margin: 0 0 0 16px; }
.field--brief { width: 100%; min-height: 160px; padding: 10px 12px; resize: vertical; height: auto; font-family: inherit; line-height: 1.45; }

/* Key dates */
.kd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 16px 18px; }
.kd-chips .chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.kd-chip-n { font-size: 12px; font-weight: 600; opacity: 0.7; }
.kd-section { margin-bottom: 26px; }
.kd-count { font-size: 13px; font-weight: 600; color: var(--ink-400); margin-left: 6px; }
.kd-earlier > summary { cursor: pointer; list-style: none; }
.kd-earlier > summary::-webkit-details-marker { display: none; }
.kd-earlier > summary::before { content: "\25B8"; display: inline-block; width: 18px; color: var(--ink-400); }
.kd-earlier[open] > summary::before { content: "\25BE"; }
.kd-list { overflow: hidden; }
.kd-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: start;
          padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.kd-row:first-child { border-top: 0; }
.kd-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px;
           background: var(--lav-50); color: var(--brand-purple); padding: 6px 0; line-height: 1.05; min-height: 58px; }
.kd-mon { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.kd-day { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.kd-yr { font-size: 10px; color: var(--ink-400); margin-top: 2px; }
.kd-row--now .kd-date { background: #FBEBCF; color: var(--warn-ink); }
.kd-row--past .kd-date { background: var(--fill-faint); color: var(--ink-400); }
.kd-main { min-width: 0; }
.kd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.kd-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--purple-600);
           background: var(--lav-50); padding: 2px 8px; border-radius: 999px; }
.kd-title { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kd-sub { margin-top: 2px; font-size: 13px; color: var(--ink-500); overflow-wrap: anywhere; }
.kd-snippet { margin: 6px 0 0; color: var(--ink-500); font-size: 14px; line-height: 1.4; display: -webkit-box;
              -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kd-src { margin-top: 6px; font-size: 13px; color: var(--ink-400); overflow-wrap: anywhere; }
.kd-plus { margin-left: 8px; }
.kd-more { margin-top: 6px; font-size: 13px; }
.kd-more summary { cursor: pointer; color: var(--brand-purple); font-weight: 600; }
.kd-more blockquote { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid var(--lav-200); background: var(--fill-faint);
                      color: var(--ink-500); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.kd-when { font-size: 13px; font-weight: 600; white-space: nowrap; padding: 4px 10px; border-radius: 999px;
           background: var(--fill-faint); color: var(--ink-500); }
.kd-when--now { background: #FBEBCF; color: var(--warn-ink); }
.kd-when--soon { background: var(--lav-100); color: var(--brand-purple); }
.kd-row--past .kd-title, .kd-row--past .kd-snippet { color: var(--ink-400); }
.kd-hidden { margin: 0 16px; font-size: 13px; color: var(--ink-400); }
@media (max-width: 640px) {
  .kd-row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .kd-when { grid-column: 2; justify-self: start; }
}

/* ---------- Meeting notes (derive/meeting_notes.py) ---------- */
.br-notes-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.br-notes-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-purple); }
.br-prose--tight { padding-top: 8px; padding-bottom: 0; }
.br-notes .kv { margin-top: 6px; }
.br-notes-src { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 14px; border-top: 0.5px solid var(--line); margin-top: 6px; }
.br-notes-src a { color: var(--brand-purple); }
.br-notes-src form { margin: 0; flex: none; }
.tl-notes { margin-top: 6px; font-size: 14px; color: var(--ink-700); }
.tl-notes .pill { margin-right: 4px; }

/* ---------- Review queue and Agents (agents_view.py) ---------- */
.rv-group { display: flex; flex-direction: column; }
.rv-count { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--ink-400); }
.rv-item { padding: 14px 16px; border-bottom: 0.5px solid var(--line); }
.rv-item:last-child { border-bottom: 0; }
.rv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rv-main { min-width: 0; flex: 1; }
.rv-title { font-weight: 600; overflow-wrap: anywhere; }
.rv-from { color: var(--ink-500); font-weight: 500; }
.rv-arrow { margin: 0 6px; color: var(--ink-300); }
.rv-to { color: var(--brand-purple); font-weight: 700; }
.rv-why { margin: 4px 0 0; font-size: 13px; color: var(--ink-500); overflow-wrap: anywhere; }
.rv-evidence { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rv-evidence li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 10px; border-radius: 10px; background: var(--lav-50); font-size: 13px; }
.rv-kind { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--purple-600); }
.rv-quote { color: var(--ink-700); overflow-wrap: anywhere; }
.rv-actions { display: flex; gap: 8px; flex: none; }
.rv-actions form { margin: 0; }
.rv-conf { font-size: 12px; color: var(--ink-400); }
.rv-empty { padding: 28px 16px; text-align: center; color: var(--ink-400); }

.ag-row { padding: 16px; border-bottom: 0.5px solid var(--line); display: grid; gap: 12px; }
.ag-row:last-child { border-bottom: 0; }
.ag-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ag-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.ag-purpose { margin-top: 2px; font-size: 13px; color: var(--ink-500); }
.ag-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 18px; margin: 0; }
.ag-stats div { min-width: 0; }
.ag-stats dt { font-size: 12px; color: var(--ink-400); }
.ag-stats dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.ag-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ag-controls form { margin: 0; }
.ag-controls .field { width: 220px; max-width: 100%; }
.ag-note { font-size: 13px; color: var(--ink-500); }
.ag-pill-off { background: var(--fill); color: var(--ink-700); }
.ag-pill-shadow { background: var(--lav-100); color: var(--purple-600); }
.ag-pill-live { background: #E9F7EE; color: var(--ok-ink); }
.ag-pill-paused { background: #FDECEC; color: var(--err-ink); }
.ag-sys { padding: 12px 16px; border-bottom: 0.5px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.ag-sys:last-child { border-bottom: 0; }
.ag-sys .dot { margin-top: 6px; }
.ag-sys-main { flex: 1; min-width: 0; }
.ag-sys-title { font-weight: 600; }
.ag-sys-text { font-size: 13px; color: var(--ink-500); overflow-wrap: anywhere; }
.ag-need { padding: 12px 16px; border-bottom: 0.5px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ag-need:last-child { border-bottom: 0; }
.ag-need form { margin: 0; flex: none; }
@media (max-width: 640px) {
  .rv-top { flex-direction: column; }
  .rv-actions { width: 100%; }
}

/* Why do we believe this? (provenance disclosure) */
.why { margin-top: 6px; font-size: 13px; }
.why summary { cursor: pointer; color: var(--ink-400); font-weight: 500; width: fit-content; }
.why summary:hover, .why[open] summary { color: var(--brand-purple); }
.why-body { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--lav-200); background: var(--fill-faint);
            color: var(--ink-500); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; font-style: normal; }
.why-body p { margin: 0 0 4px; }
.why-body ul { margin: 2px 0 6px; padding-left: 18px; }
.why-body a { color: var(--brand-purple); }
.why-meta { color: var(--ink-400); }
.why-k { margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--purple-600); }
.why-hidden { color: var(--ink-400); }
.why-wrap { padding: 0 16px 10px; }

/* Helpful / Not helpful */
.fb { margin: 0; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fb-btn { border: 0; background: var(--fill); color: var(--ink-500); font: inherit; font-size: 12px; font-weight: 500; height: 26px; padding: 0 11px; border-radius: 13px; cursor: pointer; }
.fb-btn:hover { background: var(--fill-hover); color: var(--brand-ink); }
.fb-btn[aria-pressed="true"] { background: var(--brand-purple); color: #FFFFFF; }
.br-notes-fb { padding: 0 16px 14px; }

/* Metrics (admin) */
.mt-days { margin: 0; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; padding: 14px 16px; margin: 0; border-bottom: 0.5px solid var(--line); }
.mt-grid div { min-width: 0; }
.mt-grid dt { font-size: 12px; color: var(--ink-400); }
.mt-grid dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mt-scroll { overflow-x: auto; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mt-table th, .mt-table td { padding: 10px 16px; text-align: left; border-bottom: 0.5px solid var(--line); vertical-align: top; }
.mt-table th { font-size: 12px; font-weight: 600; color: var(--ink-400); white-space: nowrap; }
.mt-table td.num, .mt-table th.num { text-align: right; white-space: nowrap; }
.mt-table tr:last-child td { border-bottom: 0; }
.mt-table td small { display: block; color: var(--ink-400); font-size: 12px; }
.mt-thin { color: var(--ink-400); }
.mt-spark { display: block; padding: 14px 16px 6px; }
.mt-spark svg { display: block; width: 100%; max-width: 480px; height: auto; }
.mt-spark .mt-line { fill: none; stroke: var(--brand-purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mt-spark .mt-dot { fill: var(--brand-purple); }
.mt-spark .mt-base { stroke: var(--line-strong); stroke-width: 1; }
.mt-note { padding: 12px 16px; font-size: 13px; color: var(--ink-500); }
.mt-sub { margin: 18px 0 8px 16px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-400); }

/* ---------- Team (docs/TEAM.md) ---------- */
.main--team { height: 100vh; padding: 0; }
.main--team .page { max-width: none; height: 100%; gap: 0; padding: 0; }
.main--team .flash { margin: 12px 16px 0; }
.tm { display: flex; flex-wrap: wrap; height: 100%; min-height: 0; background: var(--brand-warm); }
.tm button, .tm summary { font: inherit; }
.tm-rail { flex: 0 0 268px; background: var(--lav-50); border-right: 1px solid var(--line-soft); padding: 20px 12px 12px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; }
.tm-rail h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.tm-rail section { display: flex; flex-direction: column; gap: 2px; }
.tm-rail section h2 { margin: 0 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-400); }
.tm-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.tm-new-btn { list-style: none; cursor: pointer; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-purple); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; line-height: 1; }
.tm-new-btn::-webkit-details-marker, .tm summary::-webkit-details-marker { display: none; }
.tm summary { list-style: none; cursor: pointer; }
.tm-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 7px 12px; color: var(--ink-400); box-shadow: var(--card-shadow); }
.tm-search input { all: unset; flex: 1; min-width: 0; font-size: 14px; color: var(--brand-ink); }
.tm-quick { display: flex; flex-direction: column; gap: 1px; }
.tm-quick a, .tm-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-decoration: none; color: var(--brand-ink); font-size: 14.5px; min-height: 24px; }
.tm-quick a { color: var(--ink-700); }
.tm-quick a:hover, .tm-item:hover { background: var(--fill); }
.tm-quick a.is-active, .tm-item.is-active { background: #fff; box-shadow: 0 0 0 1px rgba(74,46,94,0.14); }
.tm-quick a span { flex: 1; }
.tm-item-label { flex: 1; min-width: 0; display: flex; flex-direction: column; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-item-label small { font-size: 12px; color: var(--ink-500); }
.tm-item.is-unread .tm-item-label { font-weight: 700; }
.tm-item.is-muted { opacity: .6; }
.tm-hash { width: 26px; text-align: center; color: var(--purple-600); font-weight: 700; flex: none; }
.tm-hash--private::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--purple-600); margin-left: 1px; vertical-align: super; }
.tm-tile { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--lav-100); color: #3A2349; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tm-tile--lg { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; font-weight: 800; }
.tm-count { background: var(--brand-lavender); color: var(--on-lavender); font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; min-width: 14px; text-align: center; }
.tm-count--at { background: var(--brand-purple); color: #fff; }
.tm-hint { margin: 4px 8px; font-size: 13px; color: var(--ink-500); line-height: 1.45; }
.tm-av { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--lav-200); color: var(--purple-900); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tm-av--sm { width: 26px; height: 26px; font-size: 11px; }
.tm-av--xs { width: 20px; height: 20px; font-size: 9px; border: 2px solid var(--brand-warm); box-sizing: content-box; }
.tm-av--sys { background: var(--brand-purple); color: #fff; }
.tm-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); border: 2px solid var(--lav-50); }
.tm-dot.is-on { background: #2E9E57; }
.tm-me { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.tm-me-btn { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.tm-me-btn:hover { background: var(--fill); }
.tm-me-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.tm-me-text small { color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tm-menu { position: relative; }
.tm-menu[open] > summary { background: var(--fill-hover); }
.tm-pop { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 200px; max-width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(37,33,43,0.18), 0 0 0 1px rgba(74,46,94,0.10); padding: 8px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.tm-menu--up .tm-pop { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.tm-pop--wide { min-width: 260px; }
.tm-pop--react { flex-direction: row; flex-wrap: wrap; width: 232px; min-width: 0; }
.tm-pop-h { margin: 6px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-400); }
.tm-menu-btn { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--brand-ink); }
.tm-menu-btn:hover, .tm-menu-btn:focus-visible { background: var(--lav-50); }
.tm-menu-btn.is-on { font-weight: 700; color: var(--brand-purple); }
.tm-danger { color: var(--err-ink); }
.tm-emoji { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.tm-emoji:hover { background: var(--lav-100); }
.tm-form-inline { display: inline; margin: 0; }
.tm-stack-form { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 8px; }
.tm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 6px; }
.tm-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-700); }
.tm-link { all: unset; cursor: pointer; color: var(--brand-purple); font-weight: 600; font-size: 13px; text-decoration: underline; }
.tm-spacer { flex: 1; }
.field--sm { width: 64px; }

.tm-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--brand-warm); }
.tm-head { display: flex; align-items: center; gap: 14px; padding: 16px 24px 12px; border-bottom: 1px solid var(--line-soft); }
.tm-head-text { flex: 1; min-width: 0; }
.tm-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.tm-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-head-tools { display: flex; align-items: center; gap: 8px; }
.tm-hash-lg { color: var(--purple-600); margin-right: 2px; }
.tm-badge { font-size: 11px; font-weight: 700; background: var(--lav-100); color: #3A2349; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.tm-tool { all: unset; box-sizing: border-box; cursor: pointer; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--ink-500); }
.tm-tool:hover { background: var(--fill); color: var(--brand-purple); }
.tm-tool-n { font-size: 13px; font-weight: 600; }
.tm-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 24px; border-bottom: 1px solid var(--line-soft); }
.tm-fact { background: #fff; border-radius: 12px; padding: 7px 12px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 1px; }
.tm-fact span { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--ink-400); }
.tm-fact b { font-size: 14px; }
.tm-fact--talk b { color: var(--brand-purple); }
.tm-joinbar { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 24px; background: var(--lav-50); font-size: 14px; }
.tm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 24px 12px; display: flex; flex-direction: column; gap: 2px; }
.tm-list--view { padding-top: 16px; }
.tm-older { text-align: center; padding: 6px 0; }
.tm-empty { margin: 40px auto; max-width: 420px; text-align: center; color: var(--ink-500); line-height: 1.5; }
.tm-day { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; color: var(--ink-400); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tm-day::before, .tm-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tm-new { display: flex; align-items: center; gap: 10px; margin: 8px 0; color: var(--err-ink); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tm-new::before, .tm-new::after { content: ""; flex: 1; height: 1px; background: #E3B0AB; }
.tm-typing { min-height: 22px; padding: 2px 0 0 48px; font-size: 13px; color: var(--ink-500); display: flex; align-items: center; gap: 8px; }
.tm-dots { display: inline-flex; gap: 3px; }
.tm-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-lavender); animation: tmdot 1.2s infinite ease-in-out; }
.tm-dots i:nth-child(2) { animation-delay: .15s; }
.tm-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tmdot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.tm-msg { position: relative; display: flex; gap: 12px; padding: 8px 8px 8px 0; border-radius: 12px; }
.tm-msg:hover, .tm-msg:focus-within { background: rgba(74,46,94,0.04); }
.tm-msg--me { background: #F6EFD9; box-shadow: inset 3px 0 0 #D9B24A; padding-left: 8px; }
.tm-msg--pinned { background: var(--lav-50); }
.tm-msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tm-msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tm-name { font-size: 15px; }
.tm-time { font-size: 12px; color: var(--ink-400); text-decoration: none; }
.tm-time:hover { text-decoration: underline; }
.tm-in, .tm-edited, .tm-flag { font-size: 12px; color: var(--ink-500); }
.tm-flag { display: inline-flex; align-items: center; gap: 3px; }
.tm-body { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.tm-body--gone { color: var(--ink-400); font-style: italic; margin: 0; }
.tm-body code { background: var(--fill); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; }
.tm-code { margin: 6px 0; background: #2B1A38; color: #F4EFF8; padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: 13px; }
.tm-code code { background: none; padding: 0; }
.tm-quote { margin: 4px 0; padding: 2px 12px; border-left: 3px solid var(--lav-300); color: var(--ink-500); }
.tm-list ul, .tm-list ol { margin: 4px 0; padding-left: 22px; }
.tm-mention { background: var(--lav-100); color: #3A2349; border-radius: 6px; padding: 0 4px; font-weight: 600; }
.tm-mention--me { background: #F1DFA6; color: #5A4300; }
.tm-mention--all { background: #FBF0DC; color: #6B3F00; }
.tm-reclink { font-weight: 600; }
.tm-tools { position: absolute; right: 8px; top: -14px; display: none; align-items: center; gap: 2px; background: #fff; border-radius: 10px; padding: 2px; box-shadow: 0 2px 10px rgba(37,33,43,0.14), 0 0 0 1px rgba(74,46,94,0.10); z-index: 5; }
.tm-msg:hover .tm-tools, .tm-msg:focus-within .tm-tools, .tm-tools:has(details[open]) { display: flex; }
.tm-tools summary, .tm-tools .tm-tool { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--ink-500); box-sizing: border-box; }
.tm-tools summary:hover { background: var(--fill); color: var(--brand-purple); }
.tm-edit form { display: flex; flex-direction: column; gap: 6px; padding: 6px; }
.tm-reacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tm-react { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; background: #fff; border-radius: 999px; padding: 2px 10px; min-height: 24px; font-size: 13px; font-weight: 600; box-shadow: 0 0 0 1px rgba(74,46,94,0.14); color: var(--ink-700); }
.tm-react.is-mine { background: var(--lav-100); box-shadow: 0 0 0 1.5px var(--brand-lavender); color: #3A2349; }
.tm-react--tag { cursor: default; color: var(--brand-purple); }
.tm-replies { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 13px; font-weight: 600; text-decoration: none; padding: 3px 8px 3px 4px; border-radius: 10px; }
.tm-replies:hover { background: var(--lav-100); }
.tm-replies-go { color: var(--ink-400); font-weight: 500; }
.tm-stack { display: inline-flex; }
.tm-stack .tm-av + .tm-av { margin-left: -6px; }
.tm-sys { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 48px; font-size: 13.5px; color: var(--ink-500); }
.tm-sys-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-lavender); flex: none; }
.tm-files { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #fff; box-shadow: var(--card-shadow); text-decoration: none; color: var(--brand-ink); font-size: 14px; max-width: 100%; }
.tm-file em { font-style: normal; color: var(--ink-500); font-size: 12px; }
.tm-img img { max-width: 320px; max-height: 240px; border-radius: 12px; display: block; box-shadow: var(--card-shadow); }
.tm-card { display: flex; gap: 12px; align-items: flex-start; max-width: 420px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); text-decoration: none; color: var(--brand-ink); }
.tm-card-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--lav-100); color: #3A2349; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.tm-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-card-title { font-weight: 700; }
.tm-card-sub { font-size: 13px; color: var(--ink-500); }
.tm-card-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-700); }
.tm-card-facts b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-400); margin-right: 3px; }
.tm-hit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--brand-ink); }
.tm-hit em { flex: 1; font-style: normal; color: var(--ink-500); font-size: 13px; }
.tm-hit:hover { background: var(--fill); }
.tm-sub-h { margin: 16px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-400); }

.tm-signal { display: flex; flex-direction: column; gap: 6px; max-width: 560px; padding: 14px 16px; border-radius: 14px; background: var(--lav-50); box-shadow: 0 0 0 1px rgba(154,122,181,0.35); }
.tm-signal--conflict { background: #FBF0DC; box-shadow: 0 0 0 1px rgba(143,84,0,0.28); }
.tm-signal--added { background: #E8F3EA; box-shadow: none; padding: 10px 14px; }
.tm-signal--dismissed { background: transparent; box-shadow: none; padding: 4px 0; }
.tm-signal-top { display: flex; align-items: center; gap: 8px; }
.tm-signal-badge { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-purple); color: #fff; display: flex; align-items: center; justify-content: center; }
.tm-signal--conflict .tm-signal-badge { background: var(--warn-ink); }
.tm-signal-kind { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-purple); }
.tm-signal--conflict .tm-signal-kind { color: #6B3F00; }
.tm-signal-title { font-size: 16px; font-weight: 700; }
.tm-signal-detail { font-size: 14px; color: var(--ink-700); }
.tm-quote-serif { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 16px; color: var(--ink-700); }
.tm-signal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-signal-done { display: flex; align-items: center; gap: 10px; color: var(--ok-ink); font-weight: 600; font-size: 14px; }
.tm-signal-muted { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-500); }

.tm-composer { margin: 0 24px 16px; position: relative; background: #fff; border-radius: 16px; box-shadow: var(--card-shadow), 0 0 0 1px rgba(74,46,94,0.10); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.tm-composer textarea { all: unset; box-sizing: border-box; width: 100%; min-height: 44px; max-height: 220px; overflow-y: auto; font-size: 15px; line-height: 1.5; white-space: pre-wrap; color: var(--brand-ink); }
.tm-composer textarea::placeholder { color: var(--ink-400); }
.tm-composer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-composer-row .capsule { background: var(--brand-purple); color: #fff; }
.tm-composer--thread { margin: 12px 0 0; }
.tm-composer--inline { margin: 12px 0 0; box-shadow: 0 0 0 1px rgba(74,46,94,0.14); }
.tm-attach { cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--ink-500); }
.tm-attach:hover { background: var(--fill); }
.tm-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tm-format { font-size: 12px; color: var(--ink-400); }
.tm-privacy { margin: 0; font-size: 12px; color: var(--ink-500); line-height: 1.4; }
.tm-suggest { position: absolute; left: 14px; bottom: calc(100% + 4px); min-width: 240px; max-width: 360px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(37,33,43,0.18), 0 0 0 1px rgba(74,46,94,0.10); padding: 6px; z-index: 30; }
.tm-suggest button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.tm-suggest button.is-on, .tm-suggest button:hover { background: var(--lav-100); }
.tm-suggest em { font-style: normal; color: var(--ink-500); }

.tm-panel { flex: 0 0 340px; background: #fff; border-left: 1px solid var(--line-soft); height: 100%; box-sizing: border-box; padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; }
.tm-tabs { display: flex; gap: 2px; background: var(--lav-50); border-radius: 12px; padding: 4px; }
.tm-tab { flex: 1; text-align: center; font-size: 13.5px; font-weight: 600; padding: 6px 2px; border-radius: 9px; text-decoration: none; color: var(--ink-500); display: flex; align-items: center; justify-content: center; gap: 4px; }
.tm-tab.is-active { background: #fff; color: var(--brand-purple); box-shadow: 0 1px 2px rgba(37,33,43,0.1); }
.tm-panel-body { display: flex; flex-direction: column; gap: 10px; }
.tm-panel-h { margin: 0; font-size: 17px; font-weight: 700; }
.tm-thread-head { display: flex; justify-content: space-between; align-items: center; }
.tm-spot { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--brand-warm); box-shadow: var(--card-shadow); }
.tm-spot-top { display: flex; justify-content: space-between; align-items: center; }
.tm-spot-detail { font-size: 13px; color: var(--ink-700); }
.tm-spot-src { font-size: 12px; color: var(--ink-500); }
.tm-chip { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--lav-100); color: #3A2349; }
.tm-chip--added { background: #E8F3EA; color: var(--ok-ink); }
.tm-chip--dismissed { background: #EFEDF1; color: var(--ink-500); }
.tm-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tm-members li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tm-members small { color: var(--ink-400); }
.tm-panel .tm-msg { padding-right: 0; }
.tm-panel .tm-tools { right: 0; }

.tm-disc .card { display: flex; flex-direction: column; gap: 6px; }
.tm-disc-list { display: flex; flex-direction: column; }
.tm-disc-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--lav-50); font-size: 14px; }
.tm-disc-banner span { flex: 1; }

@media (max-width: 1100px) { .tm-panel { flex: 1 1 100%; height: auto; border-left: 0; border-top: 1px solid var(--line-soft); } .main--team { height: auto; min-height: 100vh; } .tm-main { height: 80vh; } }
@media (max-width: 760px) { .tm-rail { flex: 1 1 100%; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line-soft); } .tm-head, .tm-list, .tm-strip { padding-left: 14px; padding-right: 14px; } .tm-composer { margin: 0 10px 12px; } .tm-tools { top: -34px; } }
@media (prefers-reduced-motion: reduce) { .tm-dots i { animation: none; } }
.tm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--purple-900); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; z-index: 60; transition: opacity .2s, transform .2s; max-width: 90vw; }
.tm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tm-toast.is-bad { background: var(--err-ink); }
.tm-msg.is-flash { animation: tmflash 2.4s ease-out; }
@keyframes tmflash { 0% { background: #F1DFA6; } 100% { background: transparent; } }
.tm-switch { position: fixed; inset: 0; background: rgba(37,33,43,0.35); z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.tm-switch-card { width: min(520px, 92vw); background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(37,33,43,0.3); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tm-switch-card input { width: 100%; box-sizing: border-box; }
.tm-switch-list { display: flex; flex-direction: column; }
.tm-switch-list a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--brand-ink); }
.tm-switch-list a.is-on, .tm-switch-list a:hover { background: var(--lav-100); }
.tm-switch-list em { font-style: normal; color: var(--ink-500); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .tm-toast { transition: none; } .tm-msg.is-flash { animation: none; } }
button.tm-item { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 14.5px; color: var(--brand-ink); min-height: 24px; }
button.tm-item:hover, button.tm-item:focus-visible { background: var(--fill); }

/* Metrics: adoption */
.mt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.mt-tile { background: var(--surface); border-radius: 16px; box-shadow: var(--card-shadow); padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.mt-tile span { font-size: 13px; color: var(--ink-400); font-weight: 600; }
.mt-tile b { font-size: 32px; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--brand-ink); }
.mt-tile small { font-size: 13px; color: var(--ink-500); }
.mt-chart { padding: 20px 24px 14px; margin-bottom: 16px; }
.mt-chart-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.mt-chart-h h3 { margin: 0; font-size: 15px; }
.mt-chart-h span { font-size: 12.5px; color: var(--ink-400); }
.mt-bars svg { display: block; width: 100%; height: 150px; }
.mt-bars .mt-bar { fill: var(--brand-purple); }
.mt-bars .mt-bar:hover { fill: var(--purple-lift); }
.mt-bars .mt-zero { fill: var(--lav-200); }
.mt-bars .mt-grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.mt-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--ink-400); }
.mt-name { font-weight: 600; }
.mt-page { display: inline-flex; align-items: center; gap: 6px; background: var(--fill); color: var(--brand-purple); border-radius: 20px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; margin: 0 6px 6px 0; }
.mt-page i { font-style: normal; font-weight: 500; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.mt-idle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 16px 24px; border-top: 0.5px solid var(--line); font-size: 13.5px; }
.mt-idle span { font-size: 12px; font-weight: 600; color: var(--ink-400); letter-spacing: 0.04em; text-transform: uppercase; }
.mt-idle em { font-style: normal; color: var(--ink-500); }
.mt-table th, .mt-table td { padding: 14px 24px; }

/* Today: groups start collapsed so the page is short. The one-line peek shows what is inside. */
.cols { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 14px; align-items: stretch; }
.col-main, .col-side { flex: none; width: 100%; }
.col-side { gap: 14px; }
.grp { background: var(--surface); border-radius: 16px; box-shadow: var(--card-shadow); }
.grp > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 22px; cursor: pointer; border-radius: 16px; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary:hover { background: var(--fill-faint); }
.grp > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.grp-t { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.grp-n { min-width: 26px; text-align: center; padding: 2px 9px; border-radius: 20px; background: var(--lav-100); color: var(--brand-purple); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grp-peek { flex: 1; min-width: 0; color: var(--ink-400); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp[open] .grp-peek { visibility: hidden; }
.grp-chev { width: 9px; height: 9px; border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400); transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 4px; }
.grp[open] > summary .grp-chev { transform: rotate(45deg); }
.grp[open] > summary { border-bottom: 0.5px solid var(--line); border-radius: 16px 16px 0 0; }
.grp > .card { box-shadow: none; border-radius: 0 0 16px 16px; }
.tm-today.grp { margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .grp-chev { transition: none; } }
@media (max-width: 560px) { .grp-peek { display: none; } .grp > summary { padding: 14px 16px; } }

/* People: filters, groups, chips */
.ppl-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 14px 0 6px; }
.ppl-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-400); letter-spacing: 0.02em; }
.ppl-filters select { font: inherit; font-size: 14px; font-weight: 500; color: var(--brand-ink); background: var(--surface); border: 0; border-radius: 10px; box-shadow: var(--card-shadow);
  padding: 9px 32px 9px 12px; min-width: 150px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-400) 50%), linear-gradient(135deg, var(--ink-400) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.ppl-filters select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ppl-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.ppl-chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 20px; background: var(--lav-100); color: var(--brand-purple); font-size: 13px; font-weight: 600; text-decoration: none; }
.ppl-chip:hover { background: var(--lav-200); }
.ppl-clear { font-size: 13px; font-weight: 600; color: var(--ink-500); margin-left: 4px; }
.ppl-hidden { color: var(--ink-400); }
.ppl-hidden a { margin-left: 4px; font-weight: 600; }
.ppl-group { margin-top: 22px; }
.ppl-group-h { display: flex; align-items: center; gap: 10px; margin: 0 0 8px 16px; font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.ppl-group-h span { font-size: 12.5px; padding: 2px 9px; border-radius: 20px; background: var(--lav-100); color: var(--brand-purple); font-variant-numeric: tabular-nums; }
.ppl-tag { margin-left: 6px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--fill); color: var(--ink-500); vertical-align: middle; }
.ppl-kind { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--fill); color: var(--brand-purple); white-space: nowrap; }
.ppl-kind--client { background: rgba(31,107,53,0.12); color: var(--ok-ink); }
.ppl-kind--prospect { background: var(--lav-100); }
.ppl-more { text-align: center; margin: 18px 0 8px; color: var(--ink-400); font-size: 14px; }
.ppl-more .capsule { margin-left: 8px; }
