:root {
  color-scheme:dark;
  --bg:#fcf9f5;
  --surface:#f9f6f1;
  --surface-2:#f7f3ec;
  --ink:#34322e;
  --muted:#7d776f;
  --line:#e3d4bc;
  --line-2:#decbad;
  --accent:#df713b;
  --accent-2:#7f7a71;
  --violet:#a97142;
  --good:#7f7a71;
  --warn:#a97142;
  --bad:#a63530;
  --terminal:#fdfbf8;
  --terminal-line:#e7d9c3;
  --shadow:0 18px 60px rgba(36,35,33,0.106);
  --radius:14px;
}

* { box-sizing:border-box; }

body {
  margin:0;
  min-height:100vh;
  color:var(--ink);
  background:radial-gradient(circle at 18% 10%, rgba(127,122,113,0.12), transparent 300px),
    radial-gradient(circle at 86% 4%, rgba(223,113,59,0.12), transparent 280px),
    var(--bg);
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing:0;
}

a { color:inherit; text-decoration:none; }
button, input, select, textarea { font:inherit; }
button { cursor:pointer; border:0; }

.app {
  min-height:100vh;
  display:block;
}

.sidebar {
  position:sticky;
  top:0;
  z-index:30;
  height:auto;
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:18px;
  padding:10px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(251,248,244,0.9);
  backdrop-filter:blur(18px);
}

.brand {
  display:flex;
  align-items:center;
  gap:14px;
  min-height:56px;
  flex:0 0 auto;
}

.brand-mark, .avatar {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fcfaf7;
  color:var(--accent);
  border:1px solid var(--line-2);
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(35,34,31,0.08);
}

.brand-mark,
.chat-bubble.talos .avatar {
  border-radius:999px;
  background:linear-gradient(180deg, rgba(252,250,247,0.05), rgba(252,250,247,0.5)),
    url("./assets/talos-icon-512.png") center / cover no-repeat;
  color:transparent;
  text-indent:-999px;
  overflow:hidden;
  border-color:rgba(223,113,59,0.72);
  box-shadow:0 0 0 1px rgba(169,113,66,0.18),
    0 10px 26px rgba(223,113,59,0.18);
}

.brand-mark {
  width:56px;
  height:56px;
  flex:0 0 56px;
}

.brand strong { display:block; font-size:19px; }
.brand small, .sidebar-card small, .panel-head p, .intro-panel p, .metric-card small, .task-card p, .project-card p { color:var(--muted); }

.nav {
  flex:1 1 auto;
  min-width:0;
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:thin;
}

.nav-link {
  min-height:42px;
  display:flex;
  align-items:center;
  flex:0 0 auto;
  padding:0 12px;
  border-radius:10px;
  color:var(--muted);
  font-weight:700;
  white-space:nowrap;
}

.nav-link:hover, .nav-link.active {
  background:var(--surface-2);
  color:var(--ink);
}

.sidebar-card {
  flex:0 0 auto;
  min-width:184px;
  margin-left:auto;
  min-height:52px;
  display:flex;
  gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
}

.status-dot {
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--good);
  box-shadow:0 0 0 4px rgba(229,215,192,0.12);
}
.status-dot.paused { background:var(--warn); box-shadow:0 0 0 4px rgba(169,113,66,0.12); }

.main {
  min-width:0;
  max-width:1720px;
  margin:0 auto;
  padding:26px;
}

.topbar {
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:22px;
}

.eyebrow {
  margin:0 0 4px;
  color:var(--accent);
  text-transform:uppercase;
  font-size:12px;
  font-weight:900;
}

h1, h2, h3, p { margin-top:0; }
h1 { margin-bottom:0; font-size:clamp(28px, 4vw, 46px); line-height:1.02; letter-spacing:0; }
h2 { margin-bottom:8px; font-size:20px; letter-spacing:0; }
h3 { margin-bottom:10px; }

.top-actions { display:flex; align-items:center; gap:10px; }

.primary-btn, .ghost-btn, .text-link, .tab, .mini-compose button, .terminal-form button, .quickbar button, .setting-card button {
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--ink);
  font-weight:800;
}

.primary-btn {
  background:var(--accent);
  color:#fcf9f5;
  border-color:var(--accent);
}

.ghost-btn { background:transparent; }
.text-link { min-height:34px; color:var(--accent-2); background:rgba(127,122,113,0.1); border-color:rgba(127,122,113,0.24); }

.dashboard-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}

.employee-dashboard {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}

.employee-hero {
  grid-column:1 / -1;
  min-height:308px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(220px, 320px);
  gap:24px;
  align-items:center;
  padding:28px;
  position:relative;
  overflow:hidden;
  background:radial-gradient(circle at 82% 42%, rgba(223,113,59,0.2), transparent 260px),
    linear-gradient(90deg, rgba(249,246,241,0.98), rgba(249,246,241,0.84) 58%, rgba(249,246,241,0.58)),
    var(--surface);
}

.employee-hero > * {
  position:relative;
  z-index:1;
}

.employee-hero h2 {
  margin:12px 0 8px;
  font-size:clamp(30px, 4vw, 48px);
  line-height:1;
}

.employee-hero p {
  max-width:760px;
  margin-bottom:0;
  color:var(--muted);
}

.hero-sigil {
  justify-self:end;
  width:min(32vw, 310px);
  aspect-ratio:1;
  border-radius:999px;
  overflow:hidden;
  background:#fcfaf7;
  border:1px solid rgba(169,113,66,0.2);
  box-shadow:0 26px 90px rgba(36,35,33,0.123),
    0 0 0 1px rgba(223,113,59,0.16),
    0 0 70px rgba(223,113,59,0.18);
}

.hero-sigil img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.command-compose {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fcf9f5;
}

.command-compose input {
  min-width:0;
  min-height:48px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  padding:0 4px;
}

.command-compose button {
  min-height:48px;
  padding:0 18px;
  border-radius:10px;
  background:var(--accent);
  color:#fcf9f5;
  font-weight:900;
}

.metric-card.compact {
  min-height:122px;
}

.metric-card.compact strong {
  font-size:34px;
}

.home-workspace {
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap:16px;
  margin-top:16px;
}

.team-panel {
  grid-column:1 / -1;
}

.meeting-list,
.people-grid {
  padding:16px;
}

.meeting-list {
  display:grid;
  gap:10px;
}

.meeting-item {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.meeting-item.reviewed {
  border-color:rgba(127,122,113,0.5);
  background:rgba(127,122,113,0.08);
}

.meeting-item span,
.people-grid small {
  color:var(--muted);
}

.people-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.people-grid div {
  display:grid;
  gap:8px;
  min-height:134px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.briefing-grid {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(280px, 0.72fr) minmax(280px, 0.72fr);
  gap:16px;
  margin-top:16px;
}

.brief-body,
.approval-stack,
.recorder-flow,
.room-work-list,
.meeting-inbox,
.scope-list {
  display:grid;
  gap:10px;
  padding:16px;
}

.brief-row,
.room-work-item {
  display:grid;
  grid-template-columns:12px minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.brief-row > span,
.room-work-item > span {
  width:9px;
  height:9px;
  border-radius:999px;
  background:var(--accent-2);
}

.brief-row.hot > span,
.room-work-item.hot > span {
  background:var(--bad);
}

.brief-row small,
.room-work-item small {
  display:block;
  color:var(--muted);
  margin-top:3px;
}

.room-work-item em {
  font-style:normal;
  color:var(--muted);
  font-weight:900;
}

.approval-stack div,
.recorder-flow div,
.scope-list div {
  display:grid;
  gap:4px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.approval-stack span,
.recorder-flow span,
.scope-list span {
  color:var(--muted);
  line-height:1.45;
}

.approval-stack em {
  width:fit-content;
  margin-top:6px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(169,113,66,0.13);
  color:var(--warn);
  font-style:normal;
  font-size:12px;
  font-weight:900;
}

.intro-panel {
  grid-column:1 / -1;
  min-height:300px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 380px;
  gap:22px;
  align-items:end;
  padding:28px;
  border:1px solid var(--line);
  border-radius:22px;
  background:radial-gradient(circle at 80% 16%, rgba(223,113,59,0.2), transparent 260px),
    radial-gradient(circle at 24% 18%, rgba(127,122,113,0.14), transparent 260px),
    linear-gradient(135deg, #f9f5f0, #fbf9f4);
  box-shadow:var(--shadow);
}

.intro-panel h2 {
  max-width:880px;
  margin:12px 0;
  font-size:clamp(34px, 5vw, 70px);
  line-height:0.96;
}

.soft-pill {
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(223,113,59,0.16);
  color:#df713b;
  font-size:12px;
  font-weight:900;
}
.soft-pill.neutral { background:rgba(169,113,66,0.14); color:var(--violet); }
.soft-pill.danger { background:rgba(166,53,48,0.14); color:var(--bad); }

.assistant-card, .metric-card, .panel, .project-card, .column, .setting-card {
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.assistant-card { padding:16px; }
.assistant-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.assistant-head small { display:block; color:var(--muted); }

.mini-compose {
  display:flex;
  gap:8px;
  margin-top:16px;
}

.mini-compose input, .search-box input, .terminal-form input, .control-grid select, .control-grid input, .document-form input, .document-form select, .document-form textarea, .system-box {
  width:100%;
  min-width:0;
  min-height:42px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fcf9f5;
  color:var(--ink);
  padding:0 12px;
}

.document-form textarea {
  min-height:220px;
  padding:12px;
  resize:vertical;
  line-height:1.5;
}

.metric-card {
  min-height:142px;
  padding:18px;
}
.metric-card span { color:var(--muted); font-weight:800; }
.metric-card strong { display:block; margin:12px 0 8px; font-size:42px; }

.two-column, .knowledge-layout, .model-layout, .cad-layout, .chat-layout {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(320px, 0.72fr);
  gap:16px;
  margin-top:16px;
}

.document-layout {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(320px, 0.58fr);
  gap:16px;
  margin-top:16px;
}

.wide-panel { grid-column:1 / -1; }

.panel-head {
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px;
  border-bottom:1px solid var(--line);
}
.panel-head h2, .panel-head p { margin-bottom:0; }

.work-list, .feed, .source-table, .steps, .control-grid, .settings-grid, .cad-jobs { padding:16px; }

.document-form, .document-list {
  padding:16px;
}

.document-form {
  display:grid;
  gap:14px;
}

.document-form label {
  display:grid;
  gap:8px;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.document-form-row {
  display:grid;
  grid-template-columns:minmax(0, 0.8fr) minmax(0, 1fr);
  gap:12px;
}

.document-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.document-actions p {
  margin:0;
  color:var(--muted);
}

.document-list {
  display:grid;
  gap:10px;
}

.document-item {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(35,34,31,0.03);
}

.document-item strong,
.document-item span,
.document-item small {
  display:block;
}

.document-item span,
.document-item small {
  color:var(--muted);
}

.document-item-actions {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.work-item {
  display:grid;
  grid-template-columns:12px minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:14px 0;
  border-bottom:1px solid var(--line);
  width:100%;
  text-align:left;
  background:transparent;
  color:var(--text);
}
.work-item:last-child { border-bottom:0; }
.work-item span { width:10px; height:10px; border-radius:999px; background:var(--accent-2); }
.work-item.high span { background:var(--bad); }
.work-item small { display:block; color:var(--muted); margin-top:3px; }
.work-item em, .task-card em { font-style:normal; color:var(--muted); font-weight:800; }

.terminal-lite, .terminal {
  background:var(--terminal);
  color:#f5ebd6;
  font-family:"Cascadia Code", "SFMono-Regular", Consolas, monospace;
}
.terminal-lite p { margin:0 0 10px; }
.terminal-lite b { color:#a97142; }
.ok { color:#706b63; }
.warn { color:#a97142; }
.muted { color:#7f7a71; }

.project-toolbar {
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.portfolio-strip {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-bottom:16px;
}

.portfolio-strip article {
  min-height:92px;
  display:grid;
  align-content:center;
  gap:6px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.portfolio-strip strong {
  font-size:30px;
  line-height:1;
}

.portfolio-strip span {
  color:var(--muted);
  font-weight:800;
}

.tabs { display:flex; gap:8px; flex-wrap:wrap; }
.tab.active { background:var(--ink); color:#2c2a27; border-color:var(--ink); }

.project-grid, .settings-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.project-card, .setting-card { padding:18px; }
.project-top { display:flex; justify-content:space-between; gap:10px; margin-bottom:18px; }
.project-icon {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:#f5ebd6;
  font-weight:900;
}
.project-card footer {
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.project-card footer a {
  color:var(--accent-2);
}

.project-meta {
  display:grid;
  gap:7px;
  margin:16px 0 4px;
}

.project-meta span {
  min-height:30px;
  display:flex;
  align-items:center;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fcf9f5;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.progress {
  height:8px;
  margin:18px 0 12px;
  border-radius:999px;
  background:#f5ebd6;
  overflow:hidden;
}
.progress span { display:block; height:100%; background:var(--accent-2); }

.board {
  display:grid;
  grid-template-columns:repeat(4, minmax(250px, 1fr));
  gap:14px;
  overflow-x:auto;
  padding-bottom:12px;
}
.column { min-height:520px; padding:12px; background:#2b2926; }
.column-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}
.column-head h2 { margin:0; font-size:17px; }
.column-head span { color:var(--muted); font-weight:900; }
.task-card {
  padding:14px;
  margin-bottom:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
}
.task-card.hot { border-color:rgba(166,51,48,0.45); }
.task-card.done { opacity:0.72; }
.task-card footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
}

.terminal-panel { overflow:hidden; }
.terminal {
  min-height:520px;
  max-height:520px;
  overflow:auto;
  padding:16px;
  line-height:1.55;
  font-size:13px;
}
.term-row { margin-bottom:10px; white-space:pre-wrap; overflow-wrap:anywhere; }
.terminal-form {
  display:grid;
  grid-template-columns:60px minmax(0, 1fr) auto;
  gap:10px;
  padding:12px;
  border-top:1px solid var(--line);
  background:var(--surface);
}
.terminal-form label {
  min-height:42px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#f5ebd6;
  font-weight:900;
}
.quickbar {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 12px 12px;
  background:var(--surface);
}
.quickbar button { min-height:34px; }

.preview-panel { overflow:hidden; }
.blueprint {
  position:relative;
  min-height:360px;
  margin:16px;
  border-radius:14px;
  border:1px solid #a97142;
  background:linear-gradient(rgba(35,34,31,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,34,31,0.08) 1px, transparent 1px),
    #f3ece0;
  background-size:28px 28px;
  overflow:hidden;
}
.axis { position:absolute; background:rgba(35,34,31,0.25); }
.axis.x { left:20px; right:20px; top:50%; height:1px; }
.axis.y { top:20px; bottom:20px; left:50%; width:1px; }
.part { position:absolute; border:3px solid #a97142; background:rgba(169,113,66,0.11); }
.plate { width:220px; height:120px; left:calc(50% - 110px); top:calc(50% - 60px); border-radius:10px; }
.tab { width:70px; height:70px; top:calc(50% - 35px); border-radius:8px; }
.tab.one { left:calc(50% - 190px); }
.tab.two { right:calc(50% - 190px); }
.hole { width:28px; height:28px; border-radius:50%; top:calc(50% - 14px); background:rgba(252,249,245,0.55); }
.hole.a { left:calc(50% - 70px); }
.hole.b { right:calc(50% - 70px); }
.dim { position:absolute; color:#35322f; font:700 12px "Cascadia Code", Consolas, monospace; }
.d1 { left:calc(50% - 36px); top:calc(50% + 76px); }
.d2 { left:calc(50% + 122px); top:calc(50% - 8px); }
.job-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.job-row:last-child { border-bottom:0; }
.job-row em { color:var(--muted); font-style:normal; font-weight:800; }

.coworking-layout {
  display:grid;
  gap:16px;
}

.room-hero {
  min-height:300px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 340px;
  gap:20px;
  align-items:end;
  padding:26px;
  border:1px solid var(--line);
  border-radius:22px;
  background:radial-gradient(circle at 78% 12%, rgba(127,122,113,0.18), transparent 260px),
    linear-gradient(135deg, #f9f5f0, #fbf9f4);
  box-shadow:var(--shadow);
}

.room-hero h2 {
  max-width:880px;
  font-size:clamp(32px, 5vw, 64px);
  line-height:0.98;
  margin:12px 0;
}

.room-hero p,
.presence-card p {
  color:var(--muted);
}

.presence-card,
.room-card {
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.presence-card {
  padding:16px;
}

.presence-stack {
  display:flex;
  margin:16px 0;
}

.presence-stack span {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  margin-right:-8px;
  border:2px solid var(--surface);
  border-radius:999px;
  background:var(--surface-2);
  color:var(--ink);
  font-size:12px;
  font-weight:900;
}

.room-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.room-card {
  min-height:220px;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
}

.room-card.active {
  border-color:rgba(127,122,113,0.48);
}

.room-card > div,
.room-card footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}

.room-card p,
.decision-list span {
  color:var(--muted);
}

.room-card footer {
  margin-top:auto;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.room-card footer a {
  color:var(--accent-2);
}

.clickable {
  cursor:pointer;
  transition:transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.clickable:hover,
.clickable:focus-visible {
  transform:translateY(-1px);
  border-color:rgba(223,113,59,0.52);
}

.decision-list {
  padding:16px;
}

.decision-list div,
.decision-button {
  display:grid;
  gap:4px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
}

.decision-button {
  width:100%;
  text-align:left;
  background:transparent;
  border-left:0;
  border-right:0;
  border-top:0;
  color:var(--text);
  border-radius:0;
}

.decision-button:hover,
.decision-button:focus-visible,
.work-item:hover,
.work-item:focus-visible {
  background:rgba(223,113,59,0.08);
}

.decision-list div:last-child,
.decision-button:last-child {
  border-bottom:0;
}

.personal-chat {
  overflow:hidden;
}

.chat-thread {
  min-height:520px;
  max-height:520px;
  overflow:auto;
  padding:16px;
}

.chat-bubble {
  display:grid;
  grid-template-columns:42px minmax(0, 1fr);
  gap:12px;
  margin-bottom:16px;
}

.chat-bubble p {
  margin:4px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.chat-bubble.user .avatar {
  color:var(--accent-2);
}

.chat-composer {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  padding:12px;
  border-top:1px solid var(--line);
}

.chat-composer input,
.transfer-form select,
.transfer-form textarea {
  width:100%;
  min-height:44px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fcf9f5;
  color:var(--ink);
  padding:0 12px;
}

.chat-composer button {
  min-height:44px;
  padding:0 16px;
  border:1px solid var(--accent);
  border-radius:10px;
  background:var(--accent);
  color:#fcf9f5;
  font-weight:900;
}

.transfer-form,
.personal-vault,
.transfer-log {
  display:grid;
  gap:12px;
  padding:16px;
  border-bottom:1px solid var(--line);
}

.transfer-form label {
  display:grid;
  gap:8px;
  color:var(--muted);
  font-weight:800;
}

.transfer-form textarea {
  min-height:126px;
  padding:12px;
  resize:vertical;
  line-height:1.5;
}

.personal-vault {
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.personal-vault h3,
.transfer-log h3 {
  grid-column:1 / -1;
  margin:0;
}

.vault-chip {
  min-height:38px;
  display:flex;
  align-items:center;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-2);
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.transfer-item {
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.transfer-item a {
  color:var(--ink);
  text-decoration:none;
}

.transfer-item a:hover {
  color:var(--accent);
}

.transfer-item span,
.transfer-item small,
.empty-note {
  color:var(--muted);
}

.transfer-item p {
  margin:8px 0;
  color:var(--ink);
  line-height:1.45;
}

.chat-console {
  display:grid;
  grid-template-columns:minmax(280px, 320px) minmax(0, 1fr);
  gap:16px;
  align-items:stretch;
}

.project-chat-console {
  display:grid;
  grid-template-columns:250px minmax(0, 1fr) 340px;
  gap:16px;
  align-items:stretch;
}

.thread-sidebar,
.chat-main,
.chat-side-panel,
.room-context-panel {
  overflow:hidden;
}

.thread-sidebar {
  min-height:640px;
  padding:12px;
}

.thread-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:42px;
  padding:0 4px 10px;
  color:var(--muted);
}

.thread-head button {
  width:34px;
  height:34px;
  border-radius:10px;
  background:var(--surface-2);
  color:var(--ink);
  font-size:18px;
  font-weight:900;
}

.thread-item {
  width:100%;
  display:grid;
  gap:4px;
  text-align:left;
  text-decoration:none;
  padding:12px;
  margin-bottom:6px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:var(--ink);
}

.thread-links {
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.thread-item span {
  color:var(--muted);
  font-size:12px;
}

.thread-item.active,
.thread-item:hover {
  border-color:rgba(127,122,113,0.32);
  background:rgba(127,122,113,0.1);
}

.chat-titlebar {
  min-height:82px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
}

.chat-titlebar h2,
.chat-titlebar p {
  margin-bottom:0;
}

.chat-titlebar p {
  color:var(--muted);
}

.chat-title-actions {
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
}

.chat-action-menu {
  position:relative;
}

.chat-action-menu > summary {
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2);
  color:var(--ink);
  font-weight:900;
  list-style:none;
  cursor:pointer;
  white-space:nowrap;
}

.chat-action-menu > summary::-webkit-details-marker {
  display:none;
}

.assign-menu-panel {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:45;
  width:min(430px, calc(100vw - 42px));
  max-height:min(680px, calc(100vh - 150px));
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(251,248,244,0.98);
  box-shadow:var(--shadow);
}

.compact-transfer,
.compact-transfer-log {
  border-bottom:0;
  padding:14px;
}

.compact-transfer-log {
  border-top:1px solid var(--line);
}

.compact-transfer-log h3 {
  margin:0;
}

.chat-main .chat-thread,
.chat-main .room-chat {
  min-height:560px;
  max-height:560px;
  padding:20px;
}

.chat-main .chat-bubble {
  max-width:980px;
  margin:0 auto 18px;
  padding:14px;
  border:1px solid transparent;
  border-radius:14px;
}

.chat-main .chat-bubble.user {
  border-color:var(--line);
  background:var(--surface-2);
}

.chat-main .chat-bubble.talos,
.chat-main .chat-bubble.transfer {
  background:transparent;
}

.chat-main .chat-composer {
  padding:14px;
  background:#fcf9f5;
}

.chat-main .chat-composer input {
  min-height:50px;
  border-radius:14px;
}

.thread-search {
  display:grid;
  gap:6px;
  padding:0 4px 12px;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.thread-search input {
  width:100%;
  min-height:40px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f6;
  color:var(--ink);
  padding:0 12px;
  text-transform:none;
}

.chat-workbar {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px 18px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg, rgba(223,113,59,0.08), transparent 45%),
    rgba(252,250,246,0.72);
}

.chat-workbar button,
.composer-hints button,
.message-tool {
  min-height:34px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(35,34,31,0.03);
  color:var(--muted);
  padding:0 12px;
  font-size:12px;
  font-weight:900;
}

.chat-workbar button:hover,
.composer-hints button:hover,
.message-tool:hover {
  border-color:rgba(223,113,59,0.45);
  color:var(--ink);
}

.bubble-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.message-tool {
  min-height:28px;
  padding:0 9px;
  opacity:0;
  transition:opacity 0.16s ease;
}

.chat-bubble:hover .message-tool,
.chat-bubble:focus-within .message-tool {
  opacity:1;
}

.chat-bubble p a {
  color:var(--accent-2);
  font-weight:900;
}

.chat-main .chat-composer {
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  padding:14px;
  background:linear-gradient(180deg, rgba(35,34,31,0.03), transparent),
    #fcf9f5;
}

.chat-main .chat-composer textarea {
  width:100%;
  min-height:58px;
  max-height:180px;
  resize:none;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fcfaf6;
  color:var(--ink);
  padding:14px 16px;
  line-height:1.5;
  box-shadow:inset 0 0 0 1px rgba(35,34,31,0.02);
}

.composer-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.composer-hints,
.composer-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.composer-actions button {
  min-height:40px;
  border-radius:12px;
  padding:0 14px;
}

.composer-actions button:first-child {
  border:1px solid rgba(127,122,113,0.42);
  background:rgba(127,122,113,0.12);
  color:var(--accent-2);
  font-weight:900;
}

.composer-actions button:disabled {
  cursor:wait;
  opacity:0.58;
}

.context-stack {
  display:grid;
  gap:10px;
  padding:16px;
}

.context-stack div {
  display:grid;
  gap:5px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.context-stack span {
  color:var(--muted);
  line-height:1.45;
}

.project-room {
  display:grid;
  gap:16px;
}

.employee-room-hero {
  min-height:220px;
}

.employee-room-hero h2 {
  font-size:clamp(28px, 4vw, 48px);
  line-height:1.04;
}

.team-chat-panel {
  overflow:hidden;
}

.live-pill {
  background:rgba(127,122,113,0.16);
  color:var(--teal);
  border-color:rgba(127,122,113,0.36);
}

.shared-chat {
  display:grid;
  gap:10px;
  max-height:360px;
  overflow:auto;
  padding:16px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:rgba(251,248,244,0.18);
}

.shared-message {
  display:grid;
  grid-template-columns:38px minmax(0, 1fr);
  gap:10px;
  align-items:start;
  padding:12px;
  border:1px solid rgba(35,34,31,0.07);
  border-radius:12px;
  background:rgba(35,34,31,0.035);
}

.shared-message p {
  margin:4px 0;
  color:var(--text);
}

.shared-message small {
  color:var(--muted);
}

.shared-chat-form {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  padding:14px 16px 16px;
}

.shared-chat-form input {
  min-height:44px;
}

.project-room-tabs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  padding:10px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(35,34,31,0.035);
}

.project-room-tabs .tab {
  min-height:40px;
  padding:0 16px;
}

.file-filter-bar,
.team-chat-prompts {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:0 16px 16px;
}

.file-filter-bar button,
.team-chat-prompts button {
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(35,34,31,0.04);
  color:var(--muted);
}

.file-filter-bar button.active,
.file-filter-bar button:hover,
.team-chat-prompts button:hover {
  border-color:rgba(223,113,59,0.56);
  color:var(--text);
  background:rgba(223,113,59,0.12);
}

.project-tab-section {
  display:none;
}

.project-tab-section.active {
  display:block;
}

.project-chat-console.project-tab-section.active,
.project-room-grid.project-tab-section.active,
.project-room-grid.compact.project-tab-section.active {
  display:grid;
}

.active-files-panel.project-tab-section.active {
  display:block;
}

.room-brief-panel {
  display:grid;
  grid-template-columns:minmax(0, 1fr) 320px;
  gap:16px;
}

.room-brief-main,
.room-brief-side {
  padding:18px;
}

.room-brief-main {
  min-height:180px;
  display:grid;
  align-content:end;
  gap:10px;
  background:linear-gradient(135deg, rgba(169,113,66,0.1), transparent 420px),
    var(--surface);
}

.room-brief-main h2 {
  margin:4px 0 0;
  font-size:clamp(26px, 3vw, 40px);
}

.room-brief-main p {
  max-width:780px;
  margin-bottom:0;
  color:var(--muted);
  line-height:1.55;
}

.room-brief-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.room-brief-side {
  display:grid;
  gap:10px;
}

.room-brief-side div {
  display:grid;
  gap:4px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.room-brief-side span {
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.active-files-panel {
  border:1px solid rgba(127,122,113,0.42);
  border-radius:var(--radius);
  background:linear-gradient(135deg, rgba(127,122,113,0.12), transparent 360px),
    var(--surface);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.active-files {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  padding:16px;
}

.active-file-card {
  min-height:190px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(252,249,245,0.8);
}

.active-file-card strong {
  display:block;
  margin:12px 0 8px;
  overflow-wrap:anywhere;
}

.active-file-card p,
.file-row p {
  color:var(--muted);
  line-height:1.45;
}

.active-file-card footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.project-room-grid {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(320px, 0.62fr);
  gap:16px;
}

.project-room-grid.compact {
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.project-chat-panel,
.file-library-panel {
  overflow:hidden;
}

.room-chat {
  min-height:500px;
  max-height:500px;
  overflow:auto;
  padding:16px;
}

.chat-bubble.transfer .avatar {
  color:var(--warn);
}

.chat-bubble small,
.approval-row span,
.decision-list small,
.file-row span {
  display:block;
  color:var(--muted);
  margin-top:4px;
  font-size:12px;
}

.file-library,
.approval-list {
  display:grid;
  gap:10px;
  padding:16px;
}

.file-row,
.approval-row {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.file-row.draft {
  border-color:rgba(169,113,66,0.48);
}

.file-row.archived {
  opacity:0.62;
}

.file-row strong,
.approval-row strong {
  overflow-wrap:anywhere;
}

.file-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.active-file-card button,
.file-actions button,
.approval-row button {
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid rgba(127,122,113,0.36);
  border-radius:10px;
  background:rgba(127,122,113,0.12);
  color:var(--accent-2);
  font-weight:900;
}

.approval-row button {
  border-color:var(--accent);
  background:var(--accent);
  color:#fcf9f5;
}

.source-table div {
  display:grid;
  grid-template-columns:220px minmax(0, 1fr) 120px;
  gap:14px;
  padding:14px 0;
  border-bottom:1px solid var(--line);
}
.source-table div:last-child { border-bottom:0; }
.source-table span, .source-table em { color:var(--muted); font-style:normal; }

.audit-result {
  padding:16px;
  display:grid;
  gap:16px;
}

.audit-strip {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:1px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--line);
}

.audit-strip div {
  min-width:0;
  padding:14px;
  background:var(--surface-2);
}

.audit-strip strong,
.audit-strip span {
  display:block;
  min-width:0;
}

.audit-strip strong {
  font-size:22px;
  overflow-wrap:anywhere;
}

.audit-strip span,
.audit-section p,
.audit-section li {
  color:var(--muted);
}

.audit-section {
  padding-top:14px;
  border-top:1px solid var(--line);
}

.audit-section h3 {
  margin-bottom:8px;
  font-size:15px;
}

.audit-section ul {
  margin:0;
  padding-left:18px;
}

.audit-section p {
  white-space:pre-wrap;
}

.steps { margin:0; list-style:none; counter-reset:step; display:grid; gap:12px; }
.steps li {
  counter-increment:step;
  display:grid;
  grid-template-columns:42px minmax(0, 1fr);
  gap:12px;
  align-items:start;
  min-width:0;
}
.steps li:before {
  content:counter(step);
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--ink);
  color:#2c2a27;
  font-weight:900;
}
.steps strong,
.steps span {
  min-width:0;
  overflow-wrap:normal;
}
.steps span { display:block; color:var(--muted); margin-top:3px; }

.control-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
.control-grid label { display:grid; gap:8px; color:var(--muted); font-weight:800; }
.system-box {
  width:calc(100% - 32px);
  min-height:300px;
  margin:16px;
  padding:14px;
  resize:vertical;
  line-height:1.55;
}

.setting-card {
  min-height:210px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.setting-card p { color:var(--muted); }

.setting-card-top,
.connector-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.google-card {
  grid-column:span 2;
}

.connector-detail {
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(35,34,31,0.04);
}

.workspace-probe-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin:14px 0;
}

.workspace-probe-grid div {
  min-width:0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(35,34,31,0.035);
}

.workspace-probe-grid strong,
.workspace-probe-grid span {
  display:block;
  overflow-wrap:anywhere;
}

.workspace-probe-grid strong {
  color:var(--text);
  margin-bottom:5px;
}

.workspace-probe-grid span {
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.workspace-probe-grid div[data-state="approved"] {
  border-color:rgba(127,122,113,0.3);
}

.workspace-probe-grid div[data-state="disabled"] {
  border-color:rgba(166,53,48,0.3);
}

.model-status-result {
  margin:16px;
  margin-top:0;
}

.connector-actions {
  justify-content:flex-start;
  flex-wrap:wrap;
}

.admin-grid {
  display:grid;
  gap:16px;
}

.admin-hero {
  min-height:178px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:22px;
  background:radial-gradient(circle at 82% 24%, rgba(223,113,59,0.18), transparent 260px),
    var(--surface);
}

.admin-hero p,
.admin-user-meta,
.admin-user-row small {
  color:var(--muted);
}

.admin-stats {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.admin-stats span {
  min-width:116px;
  display:grid;
  gap:4px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.admin-stats strong {
  font-size:28px;
}

.admin-stats small {
  color:var(--muted);
  font-weight:900;
}

.admin-user-list {
  display:grid;
  gap:10px;
  padding:16px;
}

.admin-user-row {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcf9f5;
}

.admin-user-row strong {
  display:block;
  overflow-wrap:anywhere;
}

.admin-user-meta {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:5px;
  font-size:12px;
}

.status-badge {
  min-height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  border-radius:999px;
  background:rgba(169,113,66,0.14);
  color:var(--warn);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.status-badge.approved {
  background:rgba(127,122,113,0.14);
  color:var(--good);
}

.status-badge.disabled {
  background:rgba(166,53,48,0.14);
  color:var(--bad);
}

.admin-user-actions {
  display:flex;
  gap:8px;
  justify-content:flex-end;
}

.admin-user-actions button {
  min-height:36px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2);
  color:var(--ink);
  font-weight:900;
}

.admin-user-actions button.primary {
  border-color:var(--accent);
  background:var(--accent);
  color:#fcf9f5;
}

.toast {
  position:fixed;
  right:18px;
  bottom:18px;
  min-width:min(360px, calc(100vw - 36px));
  min-height:48px;
  display:none;
  align-items:center;
  padding:12px 14px;
  border:1px solid #a97142;
  border-radius:12px;
  background:var(--surface);
  box-shadow:var(--shadow);
  z-index:50;
}
.toast.show { display:flex; }

.workspace-dialog {
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(254,253,251,0.58);
  z-index:80;
}

.workspace-dialog.show {
  display:flex;
}

.workspace-dialog-card {
  position:relative;
  width:min(560px, 100%);
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  box-shadow:var(--shadow);
  padding:22px;
}

.workspace-dialog-card h2 {
  margin:0 36px 12px 0;
}

.dialog-close {
  position:absolute;
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface-2);
  color:var(--muted);
}

.workspace-dialog-body {
  display:grid;
  gap:12px;
  color:var(--muted);
  line-height:1.5;
}

.workspace-dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}

.detail-list {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin:0;
}

.detail-list div {
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:var(--surface-2);
}

.detail-list dt {
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.detail-list dd {
  margin:4px 0 0;
  color:var(--text);
  font-weight:900;
}

@media (max-width:1180px) {
  .dashboard-grid, .project-grid, .settings-grid, .employee-dashboard, .portfolio-strip, .workspace-probe-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .google-card { grid-column:span 2; }
  .intro-panel, .two-column, .knowledge-layout, .model-layout, .cad-layout, .chat-layout, .document-layout, .document-form-row, .room-hero, .project-room-grid, .project-room-grid.compact, .home-workspace, .employee-hero, .briefing-grid, .room-brief-panel { grid-template-columns:1fr; }
  .hero-sigil {
    justify-self:start;
    width:min(62vw, 260px);
  }
  .chat-console { grid-template-columns:minmax(240px, 280px) minmax(0, 1fr); }
  .project-chat-console { grid-template-columns:220px minmax(0, 1fr); }
  .chat-side-panel,
  .room-context-panel {
    grid-column:1 / -1;
  }
  .active-files { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .people-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .room-grid { grid-template-columns:1fr; }
}

@media (max-width:900px) {
  .app { display:block; }
  .sidebar {
    position:sticky;
    top:0;
    bottom:auto;
    height:auto;
    z-index:20;
    border-right:0;
    border-bottom:1px solid var(--line);
    padding:8px 10px;
  }
  .brand {
    min-height:44px;
    gap:0;
  }
  .brand span:last-child,
  .sidebar-card { display:none; }
  .brand-mark {
    width:44px;
    height:44px;
    flex-basis:44px;
  }
  .nav {
    display:flex;
    overflow-x:auto;
    gap:6px;
    padding-bottom:2px;
  }
  .nav-link {
    flex:0 0 auto;
    min-height:46px;
    padding:0 14px;
  }
  .main { padding:16px; }
  .topbar { align-items:flex-start; flex-direction:column; }
  .main,
  .panel,
  .chat-main,
  .terminal-panel,
  .project-chat-console,
  .chat-console,
  .room-brief-panel {
    min-width:0;
  }
  .dashboard-grid, .project-grid, .settings-grid, .employee-dashboard, .portfolio-strip, .workspace-probe-grid { grid-template-columns:1fr; }
  .google-card { grid-column:span 1; }
  .chat-console,
  .project-chat-console {
    grid-template-columns:1fr;
  }
  .thread-sidebar {
    min-height:0;
  }
  .thread-item {
    min-width:220px;
  }
  .thread-sidebar {
    display:flex;
    gap:8px;
    overflow-x:auto;
  }
  .thread-head {
    min-width:128px;
    display:grid;
    align-content:center;
  }
  .thread-search {
    min-width:220px;
    padding-bottom:0;
  }
  .chat-workbar {
    flex-wrap:nowrap;
    overflow-x:auto;
  }
  .chat-main .chat-thread,
  .chat-main .room-chat {
    min-height:460px;
    max-height:460px;
  }
  .chat-titlebar {
    align-items:flex-start;
    flex-direction:column;
  }
  .chat-title-actions {
    width:100%;
    justify-content:space-between;
  }
  .assign-menu-panel {
    position:fixed;
    top:82px;
    left:14px;
    right:14px;
    width:auto;
    max-height:calc(100vh - 112px);
  }
  .active-files { grid-template-columns:1fr; }
  .people-grid { grid-template-columns:1fr; }
  .admin-hero,
  .admin-user-row {
    grid-template-columns:1fr;
  }
  .admin-hero {
    display:grid;
  }
  .admin-user-actions {
    justify-content:stretch;
  }
  .admin-user-actions button {
    flex:1;
  }
  .intro-panel { min-height:0; padding:20px; }
  .intro-panel h2 { font-size:38px; }
  .board { grid-template-columns:repeat(4, 280px); }
  .source-table div { grid-template-columns:1fr; gap:4px; }
  .audit-strip { grid-template-columns:1fr 1fr; }
  .terminal-form { grid-template-columns:1fr; }
  .terminal-form input,
  .chat-composer input,
  .chat-composer textarea,
  .command-compose input,
  .mini-compose input,
  .search-box input {
    min-width:0;
  }
  .control-grid { grid-template-columns:1fr; }
  .file-row,
  .approval-row {
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .file-actions,
  .approval-row button,
  .active-file-card button {
    width:100%;
  }
  .room-chat {
    min-height:420px;
    max-height:420px;
  }
}

@media (max-width:430px) {
  .top-actions { width:100%; }
  .top-actions > * { flex:1; }
  .audit-strip { grid-template-columns:1fr; }
  .mini-compose { flex-direction:column; }
  .command-compose { grid-template-columns:1fr; }
  .chat-composer { grid-template-columns:1fr; }
  .composer-footer {
    align-items:stretch;
    flex-direction:column;
  }
  .composer-actions button {
    flex:1;
  }
  .personal-vault { grid-template-columns:1fr; }
  .intro-panel h2 { font-size:32px; }
  .employee-hero h2 { font-size:32px; }
  .employee-hero {
    min-height:0;
    padding:20px;
  }
  .hero-sigil {
    width:min(70vw, 210px);
  }
  .terminal { min-height:420px; max-height:420px; }
}

/* Dark-mode finish pass:overrides older light project-board constants. */
.tab.active {
  background:var(--accent-2);
  border-color:var(--accent-2);
  color:#fcfaf7;
}

.column {
  background:#faf8f3;
}

.project-icon,
.terminal-form label {
  background:var(--surface-2);
}

.progress {
  background:#f5efe6;
}

.steps li:before {
  background:var(--accent);
  color:#fcf9f5;
}

.toast {
  border-color:var(--line-2);
}

/* ---- Work Zone + Cerebro:day headers and small-screen layout ---- */
.wz-day {
  margin:14px 0 6px;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.65;
}
.wz-day:first-child { margin-top:0; }
#wzAdd, #cb-form { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.work-item em { white-space:nowrap; }

@media (max-width:820px) {
  #wzAdd, #cb-form { flex-direction:column; align-items:stretch; }
  #wzAdd > *, #cb-form > * { width:100%; }
  #wzTalosPanel .panel-head { flex-direction:column; align-items:flex-start; gap:10px; }
  #wzTalosPanel .panel-head > div:last-child { width:100%; }
  #wzTalosPanel .panel-head select { flex:1 1 auto; }
  .board { display:block; }
  .board .column { margin-bottom:18px; }
  .room-grid { grid-template-columns:1fr; }
  .people-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .work-item { flex-wrap:wrap; }
  .work-item em { width:100%; padding-top:4px; }
  .task-card footer { flex-wrap:wrap; gap:4px; }
}
@media (max-width:520px) {
  .people-grid { grid-template-columns:1fr; }
}

/* ---- Pin / Edit / Archive / Delete row ---- */
.tb-manage-row {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(35,34,31,0.08);
}
.tb-manage {
  font:inherit;
  font-size:11px;
  line-height:1;
  padding:6px 9px;
  border-radius:7px;
  cursor:pointer;
  color:inherit;
  background:rgba(35,34,31,0.05);
  border:1px solid rgba(35,34,31,0.14);
}
.tb-manage:hover { background:rgba(35,34,31,0.12); }
.tb-manage.tb-delete:hover { background:rgba(166,48,48,0.28); border-color:rgba(166,48,48,0.5); }
#threadList .tb-manage-row { margin:4px 0 10px; padding-top:6px; border-top:0; }
@media (max-width:820px) {
  .tb-manage { flex:1 1 auto; padding:9px 8px; font-size:12px; }
}

/* ---- Grouped sidebar ---- */
.nav-group {
  display:block;
  margin:14px 0 4px 12px;
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.45;
}
.nav-group:first-child { margin-top:0; }
.nav-link { gap:10px; }
.nav-ico {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  flex:0 0 18px;
  opacity:.8;
}
.nav-ico svg { width:18px; height:18px; }
.nav-link.active .nav-ico { opacity:1; }
@media (max-width:820px) {
  .nav-group { display:none; }
}

/* ---- Quieter sidebar ---- */
.nav-group { display:none !important; }
.nav-link[data-jarvis-sub]::after,
.nav-link[data-jarvis-sub]::before { content:none !important; display:none !important; }
.nav-sep {
  display:block;
  height:1px;
  margin:10px 12px;
  background:rgba(35,34,31,0.08);
}

/* ---- Menu:give the two new pages glyphs, drop the subtitles ---- */
.jarvis-brain .nav-link[href$="workzone.html"]:before { content:"\2692\FE0E"; }
.jarvis-brain .nav-link[href$="cerebro.html"]:before  { content:"\269B\FE0E"; }
.jarvis-brain .nav-link:after { content:none !important; }
.jarvis-brain .nav-link { grid-template-rows:auto !important; }
.nav-ico { display:none !important; }
.nav-group { display:none !important; }
.nav-sep { display:block; height:1px; margin:8px 10px; background:rgba(35,34,31,0.07); }

/* ---- kill both label layers ---- */
.jarvis-brain .nav:before { content:none !important; padding:0 !important; }
.nav-group { display:none !important; }

/* ---- Own the nav icon slot:SVGs in, pseudo-element glyphs out ---- */
.jarvis-brain .nav-link:before { content:none !important; display:none !important; }
.jarvis-brain .nav-link {
  grid-template-columns:24px minmax(0, 1fr) !important;
  grid-template-rows:auto !important;
  align-items:center !important;
}
.nav-ico {
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  color:var(--accent);
  opacity:.85;
}
.nav-ico svg { width:18px; height:18px; }
.jarvis-brain .nav-link.active .nav-ico { opacity:1; }
.jarvis-brain .nav-link > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- Voice controls ---- */
.talos-voice { display:flex; gap:6px; align-items:center; margin-left:6px; }
.talos-mic, .talos-speak {
  font:inherit; font-size:11px; line-height:1;
  padding:9px 11px; border-radius:8px; cursor:pointer; white-space:nowrap;
  color:inherit; background:rgba(35,34,31,0.05); border:1px solid rgba(35,34,31,0.15);
}
.talos-mic:hover, .talos-speak:hover { background:rgba(35,34,31,0.12); }
.talos-mic.on { background:rgba(166,48,48,0.3); border-color:rgba(166,48,48,0.6); }
.talos-speak.on { color:var(--accent); border-color:var(--accent); }
@media (max-width:820px) { .talos-voice { width:100%; margin:6px 0 0; } .talos-mic, .talos-speak { flex:1 1 auto; } }

.talos-voicepick {
  font:inherit; font-size:11px; padding:8px 9px; border-radius:8px; max-width:170px;
  color:inherit; background:rgba(35,34,31,0.05); border:1px solid rgba(35,34,31,0.15);
}
@media (max-width:820px) { .talos-voicepick { max-width:100%; flex:1 1 100%; } }

/* ---- Live voice mode ---- */
.lv-fab {
  position:fixed; right:20px; bottom:74px; z-index:150;
  width:58px; height:58px; border-radius:50%; cursor:pointer;
  display:grid; place-items:center; color:var(--accent);
  background:radial-gradient(circle at 35% 30%, #f3ece0, #fcf9f5);
  border:1px solid #a97142;
  box-shadow:0 14px 40px rgba(36,35,33,0.154), 0 0 24px rgba(169,113,66,0.18);
}
.lv-fab:hover { box-shadow:0 14px 40px rgba(36,35,33,0.168), 0 0 34px rgba(169,113,66,0.35); }
.lv-fab svg { width:24px; height:24px; }
@media (max-width:900px) { .lv-fab { bottom:calc(96px + env(safe-area-inset-bottom)); right:16px; } }

.lv-overlay {
  position:fixed; inset:0; z-index:400;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px;
  padding:28px; text-align:center;
  background:radial-gradient(circle at 50% 40%, rgba(247,243,236,0.96), rgba(253,252,250,0.99));
  backdrop-filter:blur(14px);
}
.lv-close {
  position:absolute; top:20px; right:20px; font:inherit; font-size:12px;
  padding:9px 14px; border-radius:9px; cursor:pointer; color:inherit;
  background:rgba(35,34,31,0.06); border:1px solid rgba(35,34,31,0.18);
}
.lv-orb {
  position:relative; width:168px; height:168px; border-radius:50%; cursor:pointer;
  display:grid; place-items:center;
  background:radial-gradient(circle at 40% 35%, rgba(169,113,66,0.3), rgba(252,249,245,0.9) 70%);
  border:1px solid rgba(169,113,66,0.4);
  box-shadow:0 0 60px rgba(169,113,66,0.22), inset 0 0 50px rgba(169,113,66,0.12);
}
.lv-orb span { width:54px; height:54px; border-radius:50%; background:var(--accent); opacity:.85; }
.lv-orb i {
  position:absolute; inset:-14px; border-radius:50%;
  border:1px solid rgba(169,113,66,0.28); opacity:0;
}
.lv-orb[data-state="listening"] i { animation:lv-ring 1.8s ease-out infinite; }
.lv-orb[data-state="listening"] i:nth-child(2) { animation-delay:.9s; }
.lv-orb[data-state="thinking"] span { animation:lv-pulse 1s ease-in-out infinite; }
.lv-orb[data-state="speaking"] span { animation:lv-pulse .5s ease-in-out infinite; }
@keyframes lv-ring { 0% { transform:scale(.9); opacity:.7 } 100% { transform:scale(1.5); opacity:0 } }
@keyframes lv-pulse { 50% { transform:scale(.72); opacity:.55 } }
.lv-state { margin:0; font:700 10px ui-monospace, monospace; letter-spacing:.18em;
  text-transform:uppercase; color:var(--accent); }
.lv-said { margin:0; max-width:620px; font-size:19px; line-height:1.45; min-height:28px; }
.lv-reply { margin:0; max-width:620px; font-size:14px; line-height:1.6; opacity:.72; }
.lv-voice { position:absolute; bottom:26px; font:inherit; font-size:11px; max-width:240px;
  padding:9px 11px; border-radius:9px; color:inherit;
  background:rgba(35,34,31,0.06); border:1px solid rgba(35,34,31,0.18); }

/* ---- Cedalion orb ---- */
.lv-core { position:relative; display:grid; place-items:center; width:min(72vw, 300px); aspect-ratio:1; }
.lv-orb {
  --amp:0;
  position:relative; width:62%; aspect-ratio:1; border-radius:50%; cursor:pointer;
  display:grid; place-items:center;
  background:radial-gradient(circle at 40% 34%, rgba(169,113,66,0.26), rgba(252,250,247,0.94) 68%);
  border:1px solid rgba(169,113,66,0.45);
  box-shadow:0 0 calc(46px + var(--amp) * 90px) rgba(54,220,255, calc(.18 + var(--amp) * .5)),
              inset 0 0 46px rgba(169,113,66,0.14);
  transform:scale(calc(1 + var(--amp) * .10));
  transition:transform .09s linear, box-shadow .09s linear;
}
.lv-sigil {
  width:74%; border-radius:50%;
  filter:saturate(.7) hue-rotate(118deg) brightness(1.05);
  opacity:calc(.72 + var(--amp) * .28);
}
.lv-ring { position:absolute; border-radius:50%; pointer-events:none; }
.lv-ring.one { inset:-13%; border:1px dashed rgba(169,113,66,0.32); animation:lv-spin 22s linear infinite; }
.lv-ring.two { inset:9%; border:1px solid rgba(169,113,66,0.2); animation:lv-spin 14s linear infinite reverse; }
.lv-amp {
  position:absolute; inset:-6%; border-radius:50%; pointer-events:none;
  border:2px solid rgba(54,220,255, calc(.10 + var(--amp) * .75));
  transform:scale(calc(1 + var(--amp) * .22));
  transition:transform .08s linear;
}
.lv-sweep { position:absolute; inset:-13%; border-radius:50%; pointer-events:none; opacity:0;
  background:conic-gradient(from 0deg, transparent 0 78%, rgba(169,113,66,0.5) 88%, transparent 96%); }
.lv-orb[data-state="thinking"] .lv-sweep { opacity:1; animation:lv-spin 1.1s linear infinite; }
@keyframes lv-spin { to { transform:rotate(360deg) } }

.lv-node {
  position:absolute; padding:6px 9px; border-radius:8px; white-space:nowrap;
  border:1px solid #f1e9db; background:rgba(252,249,245,0.88);
  color:#7f7a71; font:750 8px ui-monospace, monospace; letter-spacing:.12em;
  transition:color .25s, border-color .25s, box-shadow .25s;
}
.lv-node b { color:#a97142; transition:color .25s; }
.lv-node.sense  { top:2%;    left:-4%; }
.lv-node.reason { top:2%;    right:-4%; }
.lv-node.memory { bottom:2%; left:-4%; }
.lv-node.act    { bottom:2%; right:-4%; }
.lv-overlay[data-state="listening"] .lv-node.sense,
.lv-overlay[data-state="thinking"]  .lv-node.reason,
.lv-overlay[data-state="thinking"]  .lv-node.memory,
.lv-overlay[data-state="speaking"]  .lv-node.act {
  color:#2d2b28; border-color:var(--accent);
  box-shadow:0 0 20px rgba(169,113,66,0.3);
}
.lv-overlay[data-state="listening"] .lv-node.sense b,
.lv-overlay[data-state="thinking"]  .lv-node.reason b,
.lv-overlay[data-state="thinking"]  .lv-node.memory b,
.lv-overlay[data-state="speaking"]  .lv-node.act b { color:var(--accent); }
@media (max-width:520px) { .lv-node { font-size:7px; padding:5px 7px; } }

.lv-skip {
  position:absolute; top:20px; right:96px; font:inherit; font-size:12px;
  padding:9px 14px; border-radius:9px; cursor:pointer; color:var(--accent);
  background:rgba(169,113,66,0.08); border:1px solid rgba(169,113,66,0.35);
}
.lv-skip:hover { background:rgba(169,113,66,0.16); }
.lv-overlay:not([data-state="speaking"]) .lv-skip { opacity:.35; }

.lv-controls { position:absolute; bottom:24px; display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.lv-pause { font:inherit; font-size:11px; padding:9px 11px; border-radius:9px; color:inherit;
  background:rgba(35,34,31,0.06); border:1px solid rgba(35,34,31,0.18); }
.lv-voice { position:static !important; }

.tb-clickable { cursor:pointer; transition:background .15s, border-color .15s; }
.tb-clickable:hover { background:rgba(169,113,66,0.07) !important; }
.work-item.tb-clickable:hover strong { color:var(--accent); }

.tb-sec { display:block; margin:18px 0 8px; }
.tb-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.tb-chip { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:99px;
  font-size:11px; background:rgba(169,113,66,0.1); border:1px solid rgba(169,113,66,0.3); color:var(--accent); }
.tb-chip.muted { background:rgba(35,34,31,0.05); border-color:rgba(35,34,31,0.15); color:inherit; opacity:.6; }
.tb-chip button { padding:0 2px; border:0; background:none; color:inherit; cursor:pointer; font-size:12px; opacity:.7; }
.tb-chip button:hover { opacity:1; }
.tb-comments { max-height:220px; overflow:auto; border:1px solid rgba(35,34,31,0.08);
  border-radius:10px; padding:10px; margin-bottom:10px; }
.tb-comment { padding:7px 0; border-bottom:1px solid rgba(35,34,31,0.06); }
.tb-comment:last-child { border-bottom:0; }
.tb-comment strong { font-size:12px; }
.tb-comment em { font-size:10px; opacity:.5; margin-left:8px; font-style:normal; }
.tb-comment p { margin:3px 0 0; font-size:13px; line-height:1.5; }

/* ---- Task / meeting panel ---- */
.task-bubble-overlay { position:fixed; inset:0; z-index:300; display:grid; place-items:center;
  background:rgba(253,252,250,0.78); backdrop-filter:blur(8px); padding:20px; }
.task-bubble { width:min(600px, 100%); max-height:88vh; overflow:auto; padding:20px;
  border-radius:16px; border:1px solid #a97142;
  background:linear-gradient(145deg, rgba(250,247,242,0.99), rgba(252,250,247,0.99));
  box-shadow:0 40px 120px rgba(36,35,33,0.168); }
.task-bubble header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.task-bubble h3 { margin:0; font-size:13px; letter-spacing:.1em; text-transform:uppercase; opacity:.65; }
.task-bubble h2 { font-size:20px; }
.task-bubble label { display:block; margin-bottom:12px; font-size:10px; letter-spacing:.1em;
  text-transform:uppercase; opacity:.6; }
.task-bubble input, .task-bubble select, .task-bubble textarea { display:block; width:100%; margin-top:5px;
  padding:10px 12px; border-radius:8px; font:inherit; font-size:13px; text-transform:none;
  letter-spacing:normal; opacity:1; color:inherit;
  background:rgba(35,34,31,0.05); border:1px solid rgba(35,34,31,0.16); }
.task-bubble .tb-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.task-bubble footer { display:flex; justify-content:flex-end; gap:10px; margin:6px 0 4px; flex-wrap:wrap; }
.task-bubble footer .tb-del { margin-right:auto; }
.task-bubble button { font:inherit; font-size:12px; padding:10px 14px; border-radius:8px; cursor:pointer;
  color:inherit; background:rgba(35,34,31,0.06); border:1px solid rgba(35,34,31,0.16); }
.task-bubble button:hover { background:rgba(35,34,31,0.12); }
.task-bubble .tb-del:hover { background:rgba(166,48,48,0.28); border-color:rgba(166,48,48,0.55); }
.task-bubble .primary-btn { background:var(--accent); border-color:var(--accent); color:#fcfaf7; }
@media (max-width:560px) { .task-bubble .tb-row { grid-template-columns:1fr; } }

/* ---- Documents ---- */
.doc-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:0 0 14px; }
.doc-filters input[type="search"] { flex:1 1 220px; padding:10px 12px; border-radius:8px; font:inherit;
  color:inherit; background:rgba(35,34,31,0.05); border:1px solid rgba(35,34,31,0.16); }
.doc-filters select { padding:10px; border-radius:8px; font:inherit; font-size:12px; color:inherit;
  background:rgba(35,34,31,0.05); border:1px solid rgba(35,34,31,0.16); }
.doc-mine { display:inline-flex; align-items:center; gap:6px; font-size:12px; opacity:.8; }
#docCount { font-size:11px; opacity:.5; margin-left:auto; }
.doc-group { margin-bottom:18px; }
.doc-group .intel-label { display:block; margin-bottom:8px; }
.doc-card { display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:12px 14px; margin-bottom:8px; border-radius:10px;
  background:rgba(35,34,31,0.03); border:1px solid rgba(35,34,31,0.08); }
.doc-card strong { display:block; font-size:14px; }
.doc-card small { display:block; margin-top:3px; font-size:11px; opacity:.6; }
.doc-actions { display:flex; gap:6px; flex-shrink:0; }
.doc-actions .ghost-btn { font-size:11px; padding:7px 10px; }
.doc-collapsed .document-form { display:none; }
.doc-toggle { margin-left:auto; }
@media (max-width:640px) { .doc-card { flex-direction:column; align-items:stretch; } #docCount { margin-left:0; } }

/* ---- Orb geometry:settle the conflict between the two rule sets ---- */
.lv-core {
  width:min(70vw, 300px) !important;
  height:min(70vw, 300px) !important;
  aspect-ratio:auto !important;
  position:relative;
  display:grid;
  place-items:center;
}
.lv-orb {
  width:64% !important;
  height:64% !important;
  aspect-ratio:auto !important;
  border-radius:50% !important;
  position:relative;
  display:grid !important;
  place-items:center;
  overflow:visible;
}
.lv-orb > span { display:none !important; }
.lv-sigil {
  display:block !important;
  width:76% !important;
  height:76% !important;
  object-fit:cover;
  border-radius:50%;
}
.lv-ring, .lv-amp, .lv-sweep { border-radius:50% !important; }

/* ---- Orb:unsquashable ---- */
.lv-overlay { justify-content:center !important; }
.lv-core {
  flex:0 0 auto !important;
  width:300px !important; height:300px !important;
  min-width:300px !important; min-height:300px !important;
  max-width:300px !important; max-height:300px !important;
}
.lv-orb {
  flex:0 0 auto !important;
  width:190px !important; height:190px !important;
  min-width:190px !important; min-height:190px !important;
  max-width:190px !important; max-height:190px !important;
}
.lv-sigil { width:145px !important; height:145px !important; }
@media (max-width:560px) {
  .lv-core { width:230px !important; height:230px !important;
             min-width:230px !important; min-height:230px !important;
             max-width:230px !important; max-height:230px !important; }
  .lv-orb { width:150px !important; height:150px !important;
            min-width:150px !important; min-height:150px !important;
            max-width:150px !important; max-height:150px !important; }
  .lv-sigil { width:112px !important; height:112px !important; }
}

/* ---- Sigil as a background layer, not an element ---- */
.lv-sigil { display:none !important; }
.lv-orb::after {
  content:"";
  position:absolute;
  inset:13%;
  border-radius:50%;
  background:url("./assets/talos-logo.png") center / contain no-repeat;
  filter:none;
  opacity:.85;
  pointer-events:none;
}
.lv-orb[data-state="speaking"]::after { opacity:1; }


/* ===================== TALOS BOARD TOOLS ===================== */
/* Three-dot menu, inline editor, details panel and seen counts on live
   board updates. Colours come from whatever tokens the theme defines, with
   fallbacks, so this does not have to know the palette. */

.board-post-head { position:relative; }

/* .board-post-head > div in the theme would otherwise stretch this to
   half the header, so this is deliberately more specific than that. */
.board-post-head .board-menu,
.board-menu { position:relative; flex:0 0 auto; margin-left:auto; }

.board-menu-dots {
  background:none;
  border:0;
  color:inherit;
  opacity:.55;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  padding:2px 8px;
  border-radius:6px;
}
.board-menu-dots:hover { opacity:1; background:rgba(218,197,164,0.18); }

.board-menu-list {
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  z-index:40;
  min-width:168px;
  display:flex;
  flex-direction:column;
  padding:5px;
  gap:2px;
  border-radius:10px;
  border:1px solid rgba(206,179,135,0.35);
  background:var(--panel-2, var(--panel, var(--card, var(--surface, #f8f5ef))));
  box-shadow:0 12px 28px rgba(36,35,33,0.106);
}
/* display beats the hidden attribute, every time */
.board-menu-list[hidden] { display:none !important; }

.board-menu-list button {
  background:none;
  border:0;
  color:inherit;
  font:inherit;
  text-align:left;
  padding:8px 10px;
  border-radius:7px;
  cursor:pointer;
}
.board-menu-list button:hover { background:rgba(218,197,164,0.18); }
.board-menu-list button.danger { color:var(--danger, var(--red, #a63330)); }

.board-seen {
  background:none;
  border:0;
  color:inherit;
  opacity:.6;
  font:inherit;
  font-size:.85em;
  cursor:pointer;
  padding:2px 4px;
  border-radius:6px;
}
.board-seen:hover { opacity:1; text-decoration:underline; }

/* an empty slot must not leave a gap in the post */
.board-details-slot:empty, .board-edit-slot:empty { display:none; }

.board-details {
  margin:10px 0 4px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(206,179,135,0.28);
  background:rgba(218,197,164,0.09);
  font-size:.9em;
}
.board-details > div {
  display:flex;
  gap:10px;
  padding:3px 0;
  align-items:baseline;
}
.board-details > div strong { flex:0 0 108px; opacity:.7; font-weight:600; }
.board-details > div span { flex:1; min-width:0; }
.board-details-note {
  margin:8px 0 0;
  opacity:.55;
  font-size:.88em;
  line-height:1.4;
}

.board-edit { margin:10px 0 4px; }
.board-edit label {
  display:block;
  font-size:.85em;
  opacity:.65;
  margin-bottom:5px;
}
.board-edit textarea {
  width:100%;
  box-sizing:border-box;
  resize:vertical;
  font:inherit;
  color:inherit;
  padding:9px 11px;
  border-radius:9px;
  border:1px solid rgba(206,179,135,0.38);
  background:rgba(218,197,164,0.1);
}
.board-edit-actions {
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:8px;
}
.board-edit-actions button {
  font:inherit;
  cursor:pointer;
  padding:7px 14px;
  border-radius:8px;
  border:1px solid rgba(206,179,135,0.38);
  background:none;
  color:inherit;
}
.board-edit-save {
  border-color:transparent !important;
  background:var(--accent, var(--primary, #a97142)) !important;
  color:var(--accent-ink, #23221f) !important;
}
.board-edit-save[disabled] { opacity:.55; cursor:default; }

/* the count needs air, or a "+1" icon and a count of 2 read as "+12" */
.board-reaction b { margin-left:5px; }

@media (max-width:560px) {
  .board-menu-list { min-width:148px; }
  .board-details > div { flex-direction:column; gap:1px; }
  .board-details > div strong { flex:none; }
}
/* =================== end TALOS BOARD TOOLS =================== */


/* ===================== TALOS BOARD VISUAL FIXES ===================== */
/* jarvis.css loads after this file, so every rule here is one class more
   specific than the one it corrects. */

/* The post header is a three-column grid (avatar, name, signal dot) but it
   has four children, so the three-dot menu fell into a second row under the
   avatar and its list opened off the left edge of the card. A fourth column
   keeps the dots beside the signal dot where they were meant to be. */
.jarvis-brain .board-post-head { grid-template-columns:40px minmax(0, 1fr) auto auto; }

/* The card and the composer panel clipped everything that opens past their
   edge:the action menu and the @-mention list were cut to a blank strip,
   which is why people were guessing at options. Backgrounds stay rounded
   without overflow:hidden, so nothing else changes. */
.jarvis-brain .board-feed .board-post,
.jarvis-brain .project-board .board-composer-panel { overflow:visible; }

/* With the card no longer clipping, an unbroken link or hash must wrap
   instead of spilling out of it. */
.board-post-message, .board-reply-content p { overflow-wrap:anywhere; }

/* .board-reply-form > div turned the mention list into a flex row, so the
   suggestions sat side by side in one cramped strip. Stack them. */
.board-reply-form .mention-suggestions:not([hidden]) { display:grid; }

/* Pasted or attached screenshots show inline instead of as a download chip. */
.board-image-attachment {
  display:block;
  max-width:100%;
  margin:10px 0 0;
  border-radius:10px;
  border:1px solid rgba(206,179,135,0.28);
  background:rgba(254,253,251,0.25);
}
.board-image-attachment img {
  display:block;
  max-width:100%;
  max-height:520px;
  margin:0 auto;
  object-fit:contain;
}
.board-image-attachment figcaption {
  padding:6px 10px;
  opacity:.6;
  font-size:.8em;
  text-align:right;
}
.board-image-attachment a { color:inherit; text-decoration:none; }
.board-image-attachment a:hover { text-decoration:underline; }
.board-reply-form .board-pending-files { grid-column:2 / -1; }
.board-reply-form .board-pending-files:empty { display:none; }
/* =================== end TALOS BOARD VISUAL FIXES =================== */


/* ===================== TALOS FILE STORE ===================== */
.fs-drop-veil {
  position:fixed;
  inset:0;
  z-index:9000;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(252,250,246,0.62);
  backdrop-filter:blur(2px);
}
.fs-drop-veil.on { display:flex; }
.fs-drop-card {
  display:flex;
  flex-direction:column;
  gap:6px;
  text-align:center;
  padding:26px 40px;
  border-radius:16px;
  border:2px dashed var(--accent, #a97142);
  background:var(--panel-2, var(--panel, #f8f5ef));
  color:inherit;
  box-shadow:0 20px 50px rgba(36,35,33,0.126);
}
.fs-drop-card strong { font-size:1.1em; }
.fs-drop-card span { opacity:.7; font-size:.9em; }

.fs-preview {
  margin:12px 0;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(206,179,135,0.3);
  background:rgba(218,197,164,0.08);
}
.fs-preview img { display:block; width:100%; height:auto; max-height:460px; object-fit:contain; }
.fs-preview iframe { display:block; width:100%; height:460px; border:0; background:#23221f; }

.fs-empty { opacity:.65; font-size:.92em; margin:10px 0; }

.fs-trail-slot:empty { display:none; }
.fs-trail-slot h4 { margin:14px 0 6px; font-size:.95em; opacity:.8; }
ul.fs-trail { list-style:none; margin:0; padding:0; font-size:.9em; }
ul.fs-trail li {
  display:flex;
  gap:10px;
  align-items:baseline;
  flex-wrap:wrap;
  padding:6px 0;
  border-top:1px solid rgba(206,179,135,0.2);
}
ul.fs-trail .fs-v { font-weight:600; flex:0 0 30px; }
ul.fs-trail .fs-who { flex:0 0 auto; }
ul.fs-trail .fs-when, ul.fs-trail .fs-size { opacity:.6; }
ul.fs-trail .fs-note { flex:1 1 100%; opacity:.7; font-style:italic; }
ul.fs-trail a { margin-left:auto; }

@media (max-width:560px) {
  .fs-preview iframe { height:300px; }
  ul.fs-trail li { gap:6px; }
}
/* =================== end TALOS FILE STORE =================== */

/* ---- sidebar sub-items under Access & Policy ---- */
.nav-link.nav-sub { padding-left:2.4em; font-size:.95em; opacity:.78; }
.nav-link.nav-sub:hover, .nav-link.nav-sub.active { opacity:1; }
/* ---- end sidebar sub-items ---- */

/* ---- department workspaces ---- */
.dept-stats { display:flex; flex-wrap:wrap; gap:12px; margin:4px 0 18px; }
.dept-stat { flex:1 1 130px; padding:12px 14px; border-radius:12px;
  border:1px solid rgba(206,179,135,0.28); background:rgba(218,197,164,0.07); }
.dept-stat b { display:block; font-size:1.6em; line-height:1.1; }
.dept-stat span { opacity:.7; font-size:.86em; }
.dept-block { margin:0 0 26px; }
.dept-block h2 { font-size:1.05em; letter-spacing:.04em; text-transform:uppercase;
  opacity:.72; margin:0 0 10px; }
.dept-grid { display:grid; gap:14px;
  grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); }
.dept-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.dept-list li { padding:10px 12px; border-radius:10px;
  border:1px solid rgba(206,179,135,0.22); display:grid; gap:3px; }
.dept-list li span { font-size:.9em; }
.dept-dim { opacity:.62; font-size:.84em; }
.dept-people { display:flex; flex-wrap:wrap; gap:10px; }
.dept-person { padding:8px 12px; border-radius:10px;
  border:1px solid rgba(206,179,135,0.22); display:grid; }
.dept-person small { opacity:.6; }
/* ---- end department workspaces ---- */

/* ---- department pipeline + gantt ---- */
.pipe-head { display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin:0 0 10px; }
.pipe-head h2 { margin:0; font-size:1.05em; letter-spacing:.04em;
  text-transform:uppercase; opacity:.72; }
.pipe-mini { font:inherit; font-size:.84em; color:inherit; cursor:pointer;
  padding:4px 10px; margin-left:6px; border-radius:7px;
  border:1px solid rgba(206,179,135,0.38); background:rgba(218,197,164,0.12); }
.pipe-mini:hover { background:rgba(218,197,164,0.24); }
.gantt { display:grid; gap:6px; }
.gantt-row { display:grid; grid-template-columns:180px 1fr auto; gap:10px;
  align-items:center; }
.gantt-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-size:.92em; }
.gantt-track { position:relative; height:26px; border-radius:7px;
  background:rgba(218,197,164,0.12); overflow:hidden; }
.gantt-bar { position:absolute; top:3px; bottom:3px; border-radius:5px;
  font-size:.76em; line-height:20px; padding:0 8px; white-space:nowrap;
  overflow:hidden; color:#fdfbf9; font-weight:600; }
.gantt-empty { position:absolute; left:10px; line-height:26px; font-size:.8em;
  opacity:.45; }
.pipe-board { display:flex; gap:10px; overflow-x:auto; padding-bottom:6px;
  align-items:flex-start; }
.pipe-col { flex:0 0 210px; border-radius:11px; padding:8px;
  border:1px solid rgba(206,179,135,0.24); background:rgba(218,197,164,0.06);
  min-height:90px; }
.pipe-col > header { display:flex; align-items:baseline; gap:6px;
  font-size:.82em; text-transform:uppercase; letter-spacing:.04em;
  opacity:.8; padding:2px 4px 8px; }
.pipe-col > header b { margin-left:auto; opacity:.6; }
.pipe-col > header small { width:100%; opacity:.6; text-transform:none;
  letter-spacing:0; }
.pipe-card { position:relative; display:grid; gap:2px; padding:8px 26px 8px 10px;
  margin-bottom:7px; border-radius:8px; cursor:grab;
  border:1px solid rgba(206,179,135,0.26); background:var(--panel,#faf6f2); }
.pipe-card:active { cursor:grabbing; }
.pipe-card strong { font-size:.92em; }
.pipe-amt { font-size:.86em; opacity:.85; }
.pipe-x { position:absolute; top:4px; right:4px; border:0; background:none;
  color:inherit; opacity:.35; cursor:pointer; font-size:1.05em; line-height:1; }
.pipe-x:hover { opacity:.9; }
.pipe-col.s0 header,.gantt-bar.s0 { --c:#a97142 } .pipe-col.s1 header,.gantt-bar.s1 { --c:#a97142 }
.pipe-col.s2 header,.gantt-bar.s2 { --c:#2f6a4e } .pipe-col.s3 header,.gantt-bar.s3 { --c:#a97142 }
.pipe-col.s4 header,.gantt-bar.s4 { --c:#a97142 } .pipe-col.s5 header,.gantt-bar.s5 { --c:#a63030 }
.pipe-col.s6 header,.gantt-bar.s6 { --c:#a97142 } .pipe-col.s7 header,.gantt-bar.s7 { --c:#a97142 }
.gantt-bar.s8 { --c:#7f7a71 }
.gantt-bar { background:var(--c,#7f7a71); }
.pipe-col > header { color:var(--c,inherit); }
@media (max-width:700px) { .gantt-row { grid-template-columns:110px 1fr auto; } }
/* ---- end department pipeline + gantt ---- */

/* ---- products board ---- */
.prod-card { padding-right:10px; }
.prod-shelves { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.prod-shelf { font-size:.7em; padding:2px 6px; border-radius:5px; opacity:.45;
  border:1px solid rgba(206,179,135,0.3); }
.prod-shelf.has { opacity:1; background:rgba(218,197,164,0.16); }
.prod-warn { font-size:.74em; color:var(--danger,#a63030); }
.prod-open { font-size:.8em; margin-top:4px; }
/* ---- end products board ---- */

/* ---- cad linker ---- */
.cadp { margin:0 0 22px; padding:12px 14px; border-radius:12px;
  border:1px solid rgba(206,179,135,0.24); }
.cadp > header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.cadp > header strong { font-size:1.02em; }
.cadp > header button { margin-left:auto; }
.cad-grid { display:grid; gap:12px;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); }
.cad-tile { margin:0; border-radius:10px; overflow:hidden;
  border:1px solid rgba(206,179,135,0.22); background:rgba(218,197,164,0.06); }
.cad-tile img { display:block; width:100%; height:150px; object-fit:contain;
  background:#fcf9f5; }
.cad-tile img.bad { display:none; }
.cad-tile figcaption { display:grid; gap:3px; padding:8px 10px; font-size:.88em; }
.cad-tile figcaption button { justify-self:start; margin:2px 0 0; }
/* ---- end cad linker ---- */

/* ---- cad chips on product cards ---- */
.prod-cad { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin-top:5px; }
.prod-cadthumb { line-height:0; border-radius:5px; overflow:hidden;
  border:1px solid rgba(206,179,135,0.28); }
.prod-cadthumb img { width:34px; height:34px; object-fit:contain; background:#fcf9f5; }
.prod-cadthumb img.bad { display:none; }
.prod-cad button { margin-left:0; }
/* ---- end cad chips ---- */

/* ---- cad viewer ---- */
.cadv { position:fixed; inset:0; z-index:9000; background:rgba(253,252,249,0.72);
  display:flex; align-items:center; justify-content:center; padding:18px; }
.cadv[hidden] { display:none; }
.cadv-panel { width:min(1100px,96vw); border-radius:14px; overflow:hidden;
  background:var(--panel,#faf7f2); border:1px solid rgba(206,179,135,0.3);
  box-shadow:0 24px 70px rgba(36,35,33,0.14); }
.cadv-panel > header { display:flex; align-items:center; gap:10px;
  padding:10px 14px; border-bottom:1px solid rgba(206,179,135,0.22); }
.cadv-panel > header strong { font-size:1.02em; }
.cadv-panel > header #cadv-close { margin-left:auto; }
.cadv-stage { position:relative; height:min(70vh,620px); background:#fcf9f5; }
#cadv-mount, #cadv-mount canvas { display:block; width:100%; height:100%; }
.cadv-msg { position:absolute; inset:auto 12% 44%; text-align:center;
  font-size:.92em; opacity:.85; pointer-events:none; }
.cad-tile[data-view] { cursor:pointer; }
.cad-tile[data-view]:hover img { outline:1px solid rgba(169,113,66,0.55); }
button.prod-cadthumb { padding:0; background:none; cursor:pointer; }
/* ---- end cad viewer ---- */

/* ---- real cad terminal ---- */
.cad-layout.one { display:block; }
.ct-cmd { color:#a97142; margin:8px 0 2px; }
.ct-ok { color:#6f6a63; }
.ct-bad { color:#a64330; }
.ct-dim { opacity:.66; }
.ct-code { margin:4px 0 8px; padding:8px 10px; border-radius:8px; overflow-x:auto;
  background:rgba(218,197,164,0.13); border:1px solid rgba(206,179,135,0.22);
  font-size:.86em; line-height:1.45; white-space:pre; }
.ct-bar { display:flex; gap:6px; flex-wrap:wrap; margin:2px 0 12px; }
.ct-bar a { text-decoration:none; }
#cadOut p { margin:2px 0; }
/* ---- end real cad terminal ---- */

/* ---- cad markup ---- */
.cadv.has-markup .cadv-panel { display:grid; grid-template-columns:1fr 300px;
  grid-template-rows:auto 1fr; }
.cadv.has-markup .cadv-panel > header { grid-column:1 / -1; }
.cadm { border-left:1px solid rgba(206,179,135,0.22); padding:10px 12px;
  overflow:auto; max-height:min(70vh,620px); font-size:.9em; }
.cadm > header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.cadm > header button { margin-left:auto; }
.cadm textarea { width:100%; margin:5px 0; border-radius:6px; padding:6px;
  background:rgba(218,197,164,0.12); color:inherit; font:inherit;
  border:1px solid rgba(206,179,135,0.28); }
#cadm-where { display:block; font-size:.84em; opacity:.8; }
#cadm-list { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:6px; }
#cadm-list li { padding:7px 9px; border-radius:8px; cursor:pointer;
  background:rgba(218,197,164,0.1); border:1px solid rgba(206,179,135,0.2); }
#cadm-list li.done { opacity:.5; }
#cadm-list li b { display:block; font-size:.8em; opacity:.75; }
#cadm-list li span { display:block; font-size:.76em; opacity:.6; }
@media (max-width:900px) {
  .cadv.has-markup .cadv-panel { grid-template-columns:1fr; }
  .cadm { border-left:0; border-top:1px solid rgba(206,179,135,0.22);
    max-height:32vh; }
}
/* ---- end cad markup ---- */
