@import url('./agent-timeline.css');
/* Staffmor workspace. Livery navy and brass on a cool slate ground; Staffmor's own lines are set
   in a serif so the guide reads as a voice, distinct from the working interface. */

:root {
  --ground: #edf0f3;
  --surface: #ffffff;
  --surface-2: #f5f7f9;
  --ink: #16212b;
  --muted: #5a6875;
  --line: #d6dde4;
  --accent: #1d3f66;
  --accent-ink: #ffffff;
  --accent-soft: #e3ebf4;
  --brass: #a8781f;
  --brass-soft: #f6eedc;
  --focus: #2f6fb3;

  --claude-ink: #8c4526;
  --claude-bg: #f7e9e0;
  --chatgpt-ink: #0d6655;
  --chatgpt-bg: #dcf1eb;
  --neutral-ink: #4d5a66;
  --neutral-bg: #e8edf1;

  --sim-ink: #563f9c;
  --sim-bg: #ece8f8;
  --wait-ink: #845400;
  --wait-bg: #fbefd6;
  --ok-ink: #226a43;
  --ok-bg: #dff1e6;
  --bad-ink: #a2302a;
  --bad-bg: #fbe4e2;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 33, 43, 0.06), 0 4px 14px rgba(22, 33, 43, 0.05);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0d1318;
    --surface: #141c23;
    --surface-2: #19232c;
    --ink: #e5ecf2;
    --muted: #97a4b0;
    --line: #26323c;
    --accent: #8db8e8;
    --accent-ink: #0d1318;
    --accent-soft: #1b2b3d;
    --brass: #d9aa4f;
    --brass-soft: #2c2415;
    --focus: #8db8e8;
    --claude-ink: #f0b393;
    --claude-bg: #3a2419;
    --chatgpt-ink: #8fe0cc;
    --chatgpt-bg: #13322b;
    --neutral-ink: #b3c0cb;
    --neutral-bg: #25303a;
    --sim-ink: #c8baf6;
    --sim-bg: #2a2345;
    --wait-ink: #f1c76e;
    --wait-bg: #33280f;
    --ok-ink: #93dcb0;
    --ok-bg: #15301f;
    --bad-ink: #f4a39d;
    --bad-bg: #3a1a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #0d1318;
  --surface: #141c23;
  --surface-2: #19232c;
  --ink: #e5ecf2;
  --muted: #97a4b0;
  --line: #26323c;
  --accent: #8db8e8;
  --accent-ink: #0d1318;
  --accent-soft: #1b2b3d;
  --brass: #d9aa4f;
  --brass-soft: #2c2415;
  --focus: #8db8e8;
  --claude-ink: #f0b393;
  --claude-bg: #3a2419;
  --chatgpt-ink: #8fe0cc;
  --chatgpt-bg: #13322b;
  --neutral-ink: #b3c0cb;
  --neutral-bg: #25303a;
  --sim-ink: #c8baf6;
  --sim-bg: #2a2345;
  --wait-ink: #f1c76e;
  --wait-bg: #33280f;
  --ok-ink: #93dcb0;
  --ok-bg: #15301f;
  --bad-ink: #f4a39d;
  --bad-bg: #3a1a18;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  min-height: 100vh;
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 48px 24px; color: var(--muted); text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons, fields, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 0.92rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding: 0 8px; }
.btn.quiet:hover { background: var(--accent-soft); }
.btn.danger { color: var(--bad-ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 0.85rem; font-weight: 600; }
.field small, .hint { color: var(--muted); font-size: 0.82rem; }
input[type="text"], select, textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; min-height: 84px; }
input[type="text"]:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.form { display: grid; gap: 16px; max-width: 640px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral-ink);
}
.chip.claude { background: var(--claude-bg); color: var(--claude-ink); }
.chip.chatgpt { background: var(--chatgpt-bg); color: var(--chatgpt-ink); }
.chip.sim { background: var(--sim-bg); color: var(--sim-ink); }
.chip.wait { background: var(--wait-bg); color: var(--wait-ink); }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.brass { background: var(--brass-soft); color: var(--brass); }
.chip.cap { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.capability-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.capability-picker label {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; cursor: pointer; background: var(--surface);
}
.capability-picker input { accent-color: var(--accent); margin: 0; }
.capability-picker label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  min-height: 100vh;
}
.rail { background: var(--surface); border-right: 1px solid var(--line); }
.rail-inner {
  padding: 18px 14px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
}
.rail-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nav-wrap { display: grid; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.brand strong { font-size: 1.05rem; letter-spacing: 0.01em; }
.org-switch { display: grid; gap: 4px; }
.org-switch .org-name { font-weight: 700; font-size: 0.98rem; overflow-wrap: anywhere; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px 4px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.93rem;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav .count { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.main { padding: 26px clamp(16px, 3vw, 36px) 48px; min-width: 0; display: grid; gap: 22px; align-content: start; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: space-between; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.guide { background: var(--surface); border-left: 1px solid var(--line); }
.guide-inner {
  padding: 20px 18px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; max-height: 100vh; min-height: min(100vh, 100%); overflow-y: auto;
}
.guide-head { display: flex; gap: 12px; align-items: center; }
.guide-head img { width: 52px; height: 52px; flex: none; }
.guide-head .who { display: grid; }
.guide-head .who span { font-size: 0.78rem; color: var(--muted); }
.say {
  font-family: var(--serif); font-size: 1.02rem; line-height: 1.45;
  background: var(--brass-soft); border-radius: 12px; padding: 12px 14px; position: relative;
}
.say::before {
  content: ""; position: absolute; left: 22px; top: -7px; width: 14px; height: 14px;
  background: var(--brass-soft); transform: rotate(45deg); border-radius: 2px;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 7px 4px; border-radius: 8px; }
.steps li.current { background: var(--surface-2); }
.steps .mark {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 0.7rem; font-weight: 800; color: transparent; margin-top: 1px;
}
.steps li.done .mark { background: var(--ok-ink); border-color: var(--ok-ink); color: var(--surface); }
.steps li.limit .mark { border-color: var(--wait-ink); color: var(--wait-ink); }
.steps .t { font-weight: 600; font-size: 0.9rem; }
.steps .d { color: var(--muted); font-size: 0.8rem; }
.guide-foot { margin-top: auto; color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- cards & panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; }
.panel > h2 + p, .panel > h3 + p { margin-top: -4px; color: var(--muted); }
.team, .connections, .seat-editor { display: grid; gap: 20px; align-content: start; min-width: 0; }
.home > section { display: grid; gap: 14px; }
.ways > div { display: grid; gap: 6px; align-content: start; }
.notice { border-radius: var(--radius); padding: 12px 14px; font-size: 0.9rem; }
/* Lock and keep working: the control; the cover itself is Staffmor Lock (native/). */
.away-control { display: grid; gap: 8px; margin-top: 16px; }
.away-control select { font: inherit; padding: 6px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
/* Light / Dark / System, one click each (presentation is Marina's to refine). */
.theme-picker { display: flex; gap: 4px; margin-top: 12px; }
.theme-picker button { flex: 1; font: inherit; font-size: 0.8rem; padding: 6px 4px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.theme-picker button.on { background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.theme-picker button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.notice.error { background: var(--bad-bg); color: var(--bad-ink); }
.notice.info { background: var(--accent-soft); color: var(--ink); }
.notice.sim { background: var(--sim-bg); color: var(--sim-ink); }

/* ---------- home ---------- */
.home { max-width: 1080px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 56px; display: grid; gap: 28px; }
.welcome { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.welcome img { width: 96px; height: 96px; }
.welcome .lede { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.25; text-wrap: balance; }
.welcome .promise { margin-top: 10px; color: var(--muted); max-width: 62ch; }
.welcome .pair { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 650; }
@media (max-width: 560px) { .welcome { grid-template-columns: 1fr; } .welcome img { width: 72px; height: 72px; } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head p { color: var(--muted); }
.templates { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.template {
  display: grid; gap: 10px; align-content: start; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  cursor: pointer; box-shadow: var(--shadow);
}
.template:hover { border-color: var(--accent); }
.template p { color: var(--muted); font-size: 0.88rem; }
.template ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.template li { display: flex; justify-content: space-between; gap: 8px; font-size: 0.86rem; }
.template li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-list { display: grid; gap: 8px; }
.org-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  text-decoration: none; color: var(--ink);
}
.org-row:hover { border-color: var(--accent); }
.org-row .sub { color: var(--muted); font-size: 0.85rem; }

/* ---------- org chart ---------- */
.chart { overflow-x: auto; padding-bottom: 6px; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 22px; display: grid; gap: 10px; padding-top: 10px; }
.tree li { position: relative; }
.tree ul > li { padding-left: 20px; }
.tree ul > li::before { content: ""; position: absolute; left: 0; top: -10px; bottom: -10px; border-left: 2px solid var(--line); }
.tree ul > li:last-child::before { bottom: auto; height: 38px; }
.tree ul > li::after { content: ""; position: absolute; left: 0; top: 26px; width: 18px; border-top: 2px solid var(--line); }
.node {
  display: grid; gap: 8px; min-width: 250px; max-width: 460px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow);
}
.node.owner { background: var(--accent-soft); border-color: transparent; box-shadow: none; min-width: 0; max-width: 360px; }
.node-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.node .name { font-weight: 700; }
.node .job { color: var(--muted); font-size: 0.88rem; }
.node .personality { font-size: 0.86rem; color: var(--muted); }
.archived { display: grid; gap: 8px; }
.archived-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- channel ---------- */
.channel { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-height: calc(100vh - 80px); }
.feed { display: grid; gap: 10px; align-content: start; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.85rem; }
.msg-head .who { font-weight: 700; }
.msg-head time { color: var(--muted); font-variant-numeric: tabular-nums; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.handoff { border-left: 4px solid var(--brass); }
.msg.note { background: var(--sim-bg); border-color: transparent; color: var(--sim-ink); }
.msg.note .who { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.74rem; }
.context { border-radius: 8px; background: var(--surface-2); padding: 8px 10px; font-size: 0.86rem; display: grid; gap: 2px; }
.context b { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.route { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.arrow { color: var(--muted); }
.delivery { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.83rem; color: var(--muted); }
.handoff-form { display: grid; gap: 10px; padding: 12px; border-radius: 8px; background: var(--surface-2); }
.composer { position: sticky; bottom: 0; background: var(--ground); padding-top: 6px; }
.composer .panel { display: grid; gap: 10px; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.composer-row .field { flex: 1 1 220px; }
.empty { color: var(--muted); padding: 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- connections ---------- */
.conn-table { display: grid; gap: 8px; }
.conn-row { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(180px, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.conn-row .name { font-weight: 650; }
.conn-row .job { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) { .conn-row { grid-template-columns: 1fr; } }
.ways { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.way { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.way:first-of-type { border-top: 0; }
.way .label { display: flex; gap: 8px; align-items: center; font-weight: 650; }
.way p { color: var(--muted); font-size: 0.86rem; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--ground); padding: 9px 16px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive shell ---------- */
.menu-toggle { display: none; }
@media (max-width: 1180px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .guide { border-left: 0; border-top: 1px solid var(--line); grid-column: 2; }
  .guide-inner { position: static; max-height: none; min-height: 0; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-inner { position: static; max-height: none; padding: 12px 16px; gap: 10px; }
  .tree ul { margin-left: 8px; }
  .tree ul > li { padding-left: 14px; }
  .tree ul > li::after { width: 12px; }
  .rail .nav-wrap { display: none; }
  .rail.open .nav-wrap { display: grid; gap: 10px; }
  .menu-toggle { display: inline-flex; }
  .guide { grid-column: 1; order: 3; }
  .main { order: 2; padding-top: 18px; }
  .channel { min-height: 0; }
  .node { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- guided setup (a scripted conversation) ---------- */
.setup { gap: 14px; }
.turn { display: flex; gap: 10px; align-items: flex-start; }
.turn img { width: 38px; height: 38px; flex: none; }
.turn .bubble { border-radius: 14px; padding: 10px 14px; max-width: 62ch; display: grid; gap: 6px; }
.turn.staffmor .bubble { background: var(--brass-soft); font-family: var(--serif); font-size: 1.02rem; }
.turn.staffmor .bubble .hint { font-family: var(--sans); }
.turn.you { justify-content: flex-end; }
.turn.you .bubble { background: var(--accent); color: var(--accent-ink); display: block; }
.turn.you .change { color: inherit; text-decoration: underline; min-height: 0; padding: 0 4px; font-weight: 500; }
.turn.you .change:hover { background: transparent; opacity: 0.85; }
.replies { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 48px; }
.reply {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--surface); color: var(--accent); font-weight: 600; cursor: pointer;
}
.reply:hover { background: var(--accent-soft); }
.reply.chosen, .reply[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.reply[disabled] { opacity: 0.7; cursor: progress; }
.setup .note-field, .setup .team-pick, .setup > .field, .setup > .btn-row, .setup > .hint { margin-left: 48px; }
.team-pick { display: grid; gap: 8px; }
.pick-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.pick-row.off { opacity: 0.55; }
.pick-name { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-width: 0; }
.pick-name input { margin-top: 4px; accent-color: var(--accent); }
.pick-name span { display: grid; }
.pick-name small { color: var(--muted); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg { border: 0; background: var(--surface); padding: 5px 12px; font-size: 0.82rem; font-weight: 650; cursor: pointer; color: var(--muted); }
.seg + .seg { border-left: 1px solid var(--line); }
.seg.on.claude { background: var(--claude-bg); color: var(--claude-ink); }
.seg.on.chatgpt { background: var(--chatgpt-bg); color: var(--chatgpt-ink); }
.seg[disabled] { cursor: not-allowed; }
details.more-teams > summary { cursor: pointer; list-style: revert; }
details.more-teams[open] > summary { margin-bottom: 6px; }
@media (max-width: 560px) {
  .replies, .setup .note-field, .setup .team-pick, .setup > .field, .setup > .btn-row, .setup > .hint { margin-left: 0; padding-left: 0; }
}

/* ---------- workspace home ---------- */
.overview { display: grid; gap: 20px; align-content: start; min-width: 0; }
.panel.job textarea { min-height: 96px; }
.how-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.how-steps code, .panel code { font-family: var(--mono); font-size: 0.85em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.work-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1100px) { .work-grid { grid-template-columns: 1fr; } }
.work h2 { display: flex; align-items: center; gap: 8px; }
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.work-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.work-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.work-title { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.work-title:hover { text-decoration: underline; }
.work-report { font-size: 0.86rem; color: var(--muted); overflow-wrap: anywhere; }
.work-meta { font-size: 0.78rem; color: var(--muted); }
.count.attention { background: var(--wait-bg); color: var(--wait-ink); border-radius: 999px; padding: 0 7px; font-weight: 700; }
.chip.info { background: var(--accent-soft); color: var(--accent); }
.chip.attention { background: var(--wait-bg); color: var(--wait-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.via { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.msg.from-assistant { border-color: var(--line); }
.msg.report { border-left: 4px solid var(--accent); }

.delivery .claim { display: inline-flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.delivery .claim .btn { min-height: 28px; }

/* ---------- notification center ---------- */
.work.needs { border-color: var(--wait-ink); }
.work-item.is-new { box-shadow: inset 3px 0 0 var(--accent); }
.chip.new { background: var(--accent); color: var(--accent-ink); }
.request { border-radius: 8px; background: var(--surface); border: 1px solid var(--line); padding: 8px 10px; display: grid; gap: 4px; }
.request b { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.request .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; }
.answer-form { display: grid; gap: 8px; }
.answer-form textarea { min-height: 64px; }

/* ---------- Staffmor's poses (Marina's exports; sizes per her guide) ---------- */
.pose { width: 120px; height: auto; flex: none; }
.pose.pose-sm { width: 88px; }
.welcome img.pose { width: 128px; height: auto; border-radius: 0; object-fit: contain; background: none; }
.section-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.section-top > div { display: grid; gap: 6px; }
.notice.with-pose { display: flex; align-items: center; gap: 12px; }
.notice.with-pose .pose { width: 72px; }
.original-task summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.original-task .body { margin-top: 4px; font-size: 0.88rem; color: var(--muted); white-space: pre-wrap; }
@media (max-width: 560px) { .pose.pose-sm { width: 64px; } .welcome img.pose { width: 96px; } }
.with-side-pose { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: start; }
.with-side-pose > .pose { margin-top: 8px; }
.panel.job .section-top .pose { width: 76px; }
@media (max-width: 560px) { .with-side-pose { grid-template-columns: 1fr; } .with-side-pose > .pose { display: none; } }

/* ---------- This window: connection, update and install states ----------
   Marina's install-ui.css styles the install entry, dialog and notices. Hooks: body[data-connection]
   ok|down|other-office|other-program, body[data-update="ready"], body[data-install]
   prompt|installed|ios|menu|unsupported, body[data-install-result] accepted|dismissed,
   body[data-drafts] saved|unsaved, #install-action, #reconnect-action, #update-retry. */
.recovery code { overflow-wrap: anywhere; font-size: 0.88em; }
.recovery {
  max-width: 680px; margin: clamp(32px, 10vh, 96px) auto; padding: 0 16px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start;
}
.recovery h1 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
.recovery p { margin: 0 0 12px; max-width: 60ch; }
@media (max-width: 560px) { .recovery { grid-template-columns: 1fr; gap: 12px; } .recovery .pose { width: 88px; } }
.draft-status { color: var(--muted); font-size: 0.82rem; }
.draft-status.unsaved { color: var(--bad-ink); }

/* ---------- People and activation ---------- */
.people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.person.removed { opacity: 0.75; }
.person .chips { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rename-self { margin-top: 12px; }
.panel.activation { border-left: 3px solid var(--brass); }
.panel.activation h2 { margin-top: 0; }
.activation-steps { display: grid; gap: 10px; justify-items: start; }
.setup .hint.personal-entry { text-align: start; justify-self: stretch; width: 100%; margin: 4px 0 0; }
.setup-requirements { display: grid; gap: 4px; margin: 6px 0 0; padding-inline-start: 18px; }
.activation-code { font: 600 2rem/1.2 var(--mono, ui-monospace, Menlo, monospace); letter-spacing: 0.12em; margin: 4px 0 8px; }
.panel.activation.renewal { border-left-color: var(--warn, var(--brass)); }
.pref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pref { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pref p { margin: 0; }
.pref.tentative { border-style: dashed; }
.pref .chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pref-add { margin-top: 12px; }

/* ---------- First visit: a short conversation ---------- */
.quiet-welcome { justify-content: center; }
.team-plain { margin: 8px 0; padding-left: 1.1em; display: grid; gap: 6px; }
.team-plain li span { display: block; color: var(--muted); font-size: 0.92rem; }
.app-options { margin: 8px 0; padding-left: 1.1em; display: grid; gap: 8px; }
.own-words { margin-top: 12px; align-items: end; }
.reply.quiet { background: transparent; border-style: dashed; }

/* Daily home and Team list (Wes, October 1): only what the markup needs to work; the look is
   Marina's daily-home.css. */
.daily-setup .how { display: grid; gap: 10px; }
.daily-setup .folder-details code { overflow-wrap: anywhere; }
.feed .is-target { outline: 2px solid var(--brass); outline-offset: 4px; border-radius: 6px; }
.readiness-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.readiness-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
.daily-rail .pinned-chats { display: grid; gap: 4px; min-width: 0; }
