/* Chief of Staff console. Resolv Flat, Light by default with a Dark toggle (theme.js). Tokens come from tokens.css. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--ink-link); }
.muted { color: var(--ink-muted); }
.wide { width: 100%; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-2); }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.rv-field { max-width: none; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-7);
  border-bottom: var(--stroke-hairline) solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: inline-flex; padding: var(--space-1); border-radius: var(--radius-md); }
.brand img { display: block; height: 32px; width: auto; }
.brand:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.product { color: var(--ink-muted); padding-left: var(--space-4); border-left: var(--stroke-hairline) solid var(--line); }

.setup-banner { margin: var(--space-4) var(--space-7) 0; }

/* Layout */
.layout {
  display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: var(--space-6); padding: var(--space-6) var(--space-7) var(--space-8);
  max-width: 1440px; margin: 0 auto;
}
.side { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.side .h4 { margin-bottom: var(--space-4); }
.detail { min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.empty { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-7); }

.switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }

.list-title { margin-bottom: var(--space-3); }
.lib-list { list-style: none; margin: var(--space-3) 0; padding: 0; display: flex; flex-direction: column; }
.lib-list:empty { display: none; }
.lib-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-top: var(--stroke-hairline) solid var(--line); }
.lib-item > span { min-width: 0; overflow-wrap: anywhere; }
.meeting-list { display: flex; flex-direction: column; gap: var(--space-2); }
.meeting-item { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); }
.meeting-item[aria-current="true"] { border-color: var(--action); background: var(--action-tint); }
.meeting-item .title { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.meeting-item .meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

/* Detail */
.detail-head { display: flex; flex-direction: column; gap: var(--space-3); }
.detail-head .h2 { overflow-wrap: anywhere; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.toggles { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.toggles .rv-switch { min-height: 44px; }

.problem {
  border: var(--stroke-control) solid var(--danger-ink);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--ink);
  background: var(--surface-subtle);
}
.problem strong { color: var(--danger-ink); font-family: var(--font-display); }
.problem-text { color: var(--danger-ink); }

.panel { min-height: 240px; }
.notes { max-width: 75ch; }
.notes h1 { font-family: var(--font-display); font-size: 22px; line-height: 30px; margin: 0 0 var(--space-2); }
.notes h2 { font-family: var(--font-display); font-size: 18px; line-height: 26px; margin: var(--space-5) 0 var(--space-2); }
.notes p, .notes li { font-size: 15px; line-height: 24px; }
.notes ul { margin: 0; padding-left: var(--space-5); }
.notes em { color: var(--ink-muted); font-style: normal; font-size: 14px; }
.notes table { border-collapse: collapse; width: 100%; font-size: 14px; }
.notes th, .notes td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: var(--stroke-hairline) solid var(--line); vertical-align: top; }
.notes th { font-family: var(--font-display); font-weight: 600; color: var(--ink-muted); }

.transcript { display: flex; flex-direction: column; gap: var(--space-2); max-height: 60vh; overflow-y: auto; padding-right: var(--space-2); }
.line { font-size: 14px; line-height: 20px; }
.line .who { font-weight: 600; margin-right: var(--space-2); }
.line.bot { border-left: 3px solid var(--ai); padding-left: var(--space-3); }
.line.chat .who::after { content: " (chat)"; font-weight: 400; color: var(--ink-muted); }
.line time { color: var(--ink-muted); font-size: 12px; margin-right: var(--space-2); font-variant-numeric: tabular-nums; }

.answers { display: flex; flex-direction: column; gap: var(--space-3); }
.answer { display: flex; flex-direction: column; gap: var(--space-2); }
.answer .q { color: var(--ink-muted); font-size: 14px; }
.answer .a { font-size: 15px; }
.answer .meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.people { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.toast {
  position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%);
  background: var(--surface-inverse); color: var(--ink-inverse);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
  font-size: 14px; max-width: calc(100vw - 32px);
  animation: toast-in var(--duration-slow) var(--ease-enter);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Login */
body.login { min-height: 100vh; display: grid; place-items: center; padding: var(--space-4); }
.login-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }
.login-card .lockup { width: 220px; height: auto; margin-bottom: var(--space-3); }
.login-card .or { text-align: center; color: var(--ink-muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: var(--space-4); gap: var(--space-5); }
  .topbar { padding: var(--space-3) var(--space-4); flex-wrap: wrap; }
  .product, #version, #who { display: none; }
  .brand img { height: 28px; }
  .setup-banner { margin: var(--space-4) var(--space-4) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}
.recipient-form { display: flex; align-items: flex-end; gap: var(--space-2); }
.recipient-form .rv-field { flex: 1; min-width: 0; }

/* Theme: the lockup follows the theme (navy-ground version in Dark). */
[data-theme="dark"] .logo-light, :root:not([data-theme="dark"]) .logo-dark { display: none; }
.login-theme { position: fixed; top: var(--space-4); right: var(--space-4); }
.company { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: var(--stroke-hairline) solid var(--line); }

/* Archie's hand-back */
.handback-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 75ch; }
.handback-json {
  margin: 0; padding: var(--space-4); max-height: 420px; overflow: auto;
  border: var(--stroke-hairline) solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-subtle); font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere;
}
textarea.rv-field__control { resize: vertical; min-height: 96px; height: auto; padding-top: var(--space-2); padding-bottom: var(--space-2); }

/* ---------- Teams meeting panel (0.16.0): narrow (about 320px), so one column ---------- */
.panel { padding: var(--space-4); min-height: 100vh; }
.panel-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.panel-head h1 { margin: 0; }
.panel .notes { font-size: 14px; }
.panel .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
