:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --line: #dfE3e8;
  --line-soft: #ebedf1;
  --ink: #1f2328;
  --muted: #697386;
  --soft: #f2f4f7;
  --blue: #2f80ed;
  --blue-soft: #e9f2ff;
  --critical: #c52828;
  --high: #d97706;
  --med: #6d7a8c;
  --success: #1f9d55;
  --shadow: 0 10px 32px rgba(13, 23, 39, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.dash-demo-page {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.dash-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 72px 1fr;
}

.dash-rail {
  border-right: 1px solid #c8d1de;
  background: #f4f5f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 11px 10px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail-top,
.rail-bottom {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.rail-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #556173;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.rail-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  shape-rendering: geometricPrecision;
}

.rail-icon:not(.logo-icon) svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.rail-icon:hover {
  background: #edf1f5;
  border-color: #dfe4ec;
  color: #3e4a5d;
}

.rail-icon.active {
  background: #e7edf5;
  border-color: #d0d8e4;
  color: #2f3a4a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.logo-icon {
  margin-bottom: 3px;
  color: #12161d;
}

.dropbox-logo-mark {
  width: 24px;
  height: 24px;
  display: block;
}

.rail-plus {
  margin-top: 6px;
}

.rail-separator {
  width: 32px;
  height: 1px;
  background: #d2d8e1;
  margin: 6px 0;
}

.rail-pill {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rail-pill svg {
  width: 16px;
  height: 16px;
}

.rail-pill-slack {
  background: #4a154b;
}

.rail-pill-notion {
  background: #111111;
}

.rail-pill-asana {
  background: #f06a6a;
}

.rail-pill-teal {
  background: #0f7f8d;
}

.rail-utility {
  color: #636f83;
}

.rail-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d4d9e1;
  background: #d0d6e3;
  color: #273043;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dash-main {
  padding: 12px 24px 22px;
}

.dash-canvas {
  max-width: 1180px;
  margin: 0 auto;
}

.dash-topbar {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  align-items: flex-start;
}

.search-shell {
  width: min(860px, 100%);
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid #d4ddea;
  border-radius: 24px;
  padding: 12px 14px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(16, 24, 38, 0.08),
    0 2px 6px rgba(16, 24, 38, 0.05);
}

.search-shell input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  font-size: 17px;
  line-height: 24px;
  letter-spacing: -0.005em;
  font-weight: 500;
  padding: 0 10px;
  color: var(--ink);
}

.search-shell input:focus {
  outline: 2px solid #d6e5ff;
  outline-offset: 1px;
}

.search-shell input::placeholder {
  color: #8b95a6;
  opacity: 1;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-left: 4px;
}

.next-actions-shell {
  border: 1px solid #dde4ee;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
  margin: 0 0 12px;
  box-shadow: 0 8px 20px rgba(16, 24, 38, 0.07);
}

.next-actions-title {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: #647286;
  margin-bottom: 8px;
}

.next-actions-shell .briefing-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.next-actions-shell .brief-card {
  border-radius: 10px;
  padding: 10px 10px 9px;
  box-shadow: 0 8px 18px rgba(16, 24, 38, 0.08);
}

.next-actions-shell .brief-card h3 {
  font-size: 14px;
  gap: 6px;
}

.next-actions-shell .card-type-icon {
  width: 18px;
  height: 18px;
}

.next-actions-shell .brief-card p {
  font-size: 12px;
  line-height: 1.34;
  margin: 6px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.next-actions-shell .brief-card-meta {
  margin-bottom: 8px;
}

.next-actions-shell .brief-card footer {
  gap: 6px;
}

.next-actions-shell .brief-cta {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  white-space: nowrap;
}

.next-actions-shell .brief-dismiss {
  font-size: 11px;
  white-space: nowrap;
}

.chip {
  border-radius: 999px;
  border: 1px solid #e0e4ea;
  background: #f0f1f3;
  color: #404754;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}

.chip:hover {
  background: #eceff3;
}

.chip-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #d5dae3;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #596377;
}

.btn-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #d8dce5;
  background: #f7f9fc;
  color: #5c687f;
  font-size: 9px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.chip-icon svg,
.btn-icon svg,
.filter-icon svg,
.card-type-icon svg,
.persona-icon svg,
.search-item-icon svg {
  width: 13px;
  height: 13px;
  display: block;
}

.chip-icon svg *,
.btn-icon svg *,
.filter-icon svg *,
.card-type-icon svg *,
.persona-icon svg *,
.search-item-icon svg:not(.brand-logo) * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-icon svg {
  width: 12px;
  height: 12px;
}

.search-item-icon svg {
  width: 14px;
  height: 14px;
}

.demo-review-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  width: min(332px, calc(100vw - 32px));
  border: 1px solid #dde3ec;
  background: #f8fafd;
  border-radius: 10px;
  padding: 8px 10px 9px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1);
}

.demo-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.demo-review-title {
  font-size: 11px;
  font-weight: 700;
  color: #4f5d73;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-review-note {
  font-size: 11px;
  color: #6c788c;
  border: 1px solid #dbe2ec;
  background: #eef3f9;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.top-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 0;
}

.persona-switch {
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}

.persona-switch select {
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fff;
  padding: 0 9px;
  font-size: 12px;
  color: var(--ink);
}

.top-link-btn {
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line-soft);
  background: #fff;
  padding: 0 10px;
  cursor: pointer;
  color: #535e72;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.top-link-btn:hover {
  background: var(--soft);
}

.dash-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 28px;
}

.dash-main.chat-open .dash-canvas {
  display: none;
}

.dash-chat-workspace {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 10px;
}

.dash-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.dash-chat-header-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.chat-back-btn {
  height: 34px;
  border-radius: 9px;
  border: 1px solid #d8dee8;
  background: #f8fafd;
  color: #334055;
  padding: 0 11px 0 9px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.chat-back-btn .btn-icon {
  margin-right: 6px;
}

.dash-chat-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #1f2734;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.beta-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #d6dce8;
  background: #f4f6fa;
  color: #758196;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0 7px;
}

.dash-chat-header-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chat-scope-label {
  font-size: 11px;
  color: #6f7a8d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.chat-scope-select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d8dfea;
  background: #fff;
  color: #314057;
  font-size: 12px;
  padding: 0 9px;
}

.dash-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 0.42fr);
  gap: 12px;
  height: clamp(520px, calc(100vh - 124px), 760px);
  min-height: clamp(520px, calc(100vh - 124px), 760px);
  max-height: clamp(520px, calc(100vh - 124px), 760px);
  align-items: stretch;
}

.dash-chat-thread-panel {
  border: 1px solid #dbe2ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 24, 38, 0.09);
  display: grid;
  grid-template-rows: 1fr auto auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.dash-chat-messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px 8px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.chat-msg {
  max-width: 88%;
  border-radius: 12px;
  border: 1px solid #dde3ef;
  padding: 9px 10px;
  box-shadow: 0 5px 14px rgba(16, 24, 38, 0.06);
}

.chat-msg.user {
  margin-left: auto;
  background: #eef3fc;
  border-color: #d4deef;
}

.chat-msg.assistant {
  background: #fff;
}

.chat-msg-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6f7c90;
  font-weight: 700;
  margin-bottom: 4px;
}

.chat-msg-text {
  font-size: 14px;
  color: #273246;
  line-height: 1.45;
  white-space: pre-wrap;
}

.chat-msg-citations {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-chat-followups {
  border-top: 1px solid #edf1f7;
  padding: 8px 12px 0;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.chat-followup-chip {
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d5e1f6;
  background: #f2f6ff;
  color: #365c98;
  font-size: 12px;
  padding: 0 11px;
  cursor: pointer;
}

.dash-chat-composer {
  border-top: 1px solid #e8edf4;
  padding: 10px 12px 11px;
  display: grid;
  gap: 8px;
}

.dash-chat-composer textarea {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 11px;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  color: #273246;
  resize: vertical;
  min-height: 72px;
  max-height: 160px;
}

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

.chat-privacy-note {
  font-size: 11px;
  color: #7a8598;
}

.dash-chat-composer-footer button {
  height: 34px;
  border-radius: 9px;
  border: 1px solid #12345d;
  background: #132d4f;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.dash-chat-composer-footer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dash-chat-doc-panel {
  border: 1px solid #dbe2ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 24, 38, 0.09);
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.dash-chat-doc-header {
  padding: 10px 12px;
  border-bottom: 1px solid #ebeff6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.doc-toolbar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-tool-btn,
.doc-export-btn {
  height: 31px;
  border-radius: 8px;
  border: 1px solid #d8dfea;
  background: #f8fafd;
  color: #46556d;
  font-size: 12px;
  padding: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.dash-chat-doc-content {
  min-height: 0;
  padding: 16px 16px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 10px;
}

.dash-chat-doc-content h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #222d3d;
}

.dash-chat-doc-body {
  font-size: 15px;
  line-height: 1.58;
  color: #2f3c50;
  white-space: pre-wrap;
}

.dash-chat-doc-citations {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feed-pane {
  min-width: 0;
}

.feed-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 6px;
}

.feed-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  width: 100%;
}

.feed-tab {
  border: 0;
  background: transparent;
  color: #505b6f;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.012em;
  cursor: pointer;
  padding: 12px 2px 10px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.feed-tab.active {
  color: #1e242d;
  border-bottom-color: #2f333a;
}

.feed-actions {
  margin-left: 14px;
  padding-bottom: 8px;
}

.feed-icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #596377;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.feed-icon-btn svg {
  width: 15px;
  height: 15px;
}

.feed-icon-btn:hover {
  border-color: #d8dce4;
  background: #f2f4f7;
}

.feed-filter-row {
  display: flex;
  gap: 8px;
  margin: 14px 0 14px;
}

.filter-chip {
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d9dee6;
  background: #f4f5f7;
  color: #4f5969;
  font-size: 12px;
  padding: 0 12px 0 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  background: #eceff4;
}

.filter-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #d6dde8;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #5b667b;
}

.briefing-cards {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.feed-separator {
  position: relative;
  margin: 5px 2px 13px;
  height: 1px;
  background: linear-gradient(90deg, rgba(190, 198, 212, 0.3) 0%, rgba(190, 198, 212, 0.85) 18%, rgba(190, 198, 212, 0.85) 82%, rgba(190, 198, 212, 0.3) 100%);
}

.feed-separator span {
  position: absolute;
  top: -10px;
  left: 0;
  background: var(--bg);
  color: #7b8799;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  padding-right: 10px;
}

.brief-card {
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px 11px;
  box-shadow: 0 10px 24px rgba(18, 29, 51, 0.09);
}

.brief-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.brief-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.card-type-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #d7deea;
  background: #f3f6fb;
  color: #56627a;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brief-card p {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.brief-card-meta {
  margin: 0 0 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.brief-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brief-cta {
  border: 1px solid #c7d3eb;
  background: #f7faff;
  border-radius: 8px;
  height: 30px;
  padding: 0 10px;
  cursor: pointer;
  color: #254d98;
  font-size: 12px;
}

.brief-dismiss {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.severity-pill.low {
  background: #ebf8ef;
  color: var(--success);
}

.severity-pill.medium {
  background: #fff7ed;
  color: var(--high);
}

.severity-pill.high {
  background: #fff2f2;
  color: var(--critical);
}

.feed-content {
  display: grid;
  gap: 12px;
  background: transparent;
}

.feed-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.feed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(145deg, #cfd6e4, #aeb9cf);
  color: #273247;
  border: 1px solid #c5ccda;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.stack-avatar {
  background: linear-gradient(145deg, #bdd5eb, #89b4de);
  border-color: #9ebddd;
  color: #1d3f62;
}

.feed-row-card {
  border: 1px solid #dde2ea;
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(16, 24, 38, 0.09);
}

.feed-row-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.feed-file-tile {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f2c3e;
  border: 1px solid #d5dce7;
  background: #edf2f8;
  box-shadow: 0 3px 10px rgba(16, 24, 38, 0.08);
}

.brand-logo {
  width: 17px;
  height: 17px;
  display: block;
  flex: 0 0 auto;
}

.brand-logo-fallback {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid #d5dce7;
  background: #ffffff;
  color: #5f697d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.app-dropbox {
  background: #e8f1ff;
  border-color: #cfe0ff;
  color: #2358a7;
}

.app-google,
.app-google-drive {
  background: #edf7ef;
  border-color: #cee8d2;
  color: #2f7a3d;
}

.app-microsoft,
.app-onedrive {
  background: #ecf3ff;
  border-color: #d1def8;
  color: #365a9c;
}

.app-gmail {
  background: #fff0f0;
  border-color: #f1d0d0;
  color: #9c3c3c;
}

.app-asana {
  background: #fff0f8;
  border-color: #f3d3e5;
  color: #a34375;
}

.app-calendar {
  background: #edf7ff;
  border-color: #d0e6fb;
  color: #2f6ea6;
}

.app-teams {
  background: #f0edff;
  border-color: #dad2ff;
  color: #5d4eb0;
}

.app-workday {
  background: #fff5ea;
  border-color: #f4dec1;
  color: #a06228;
}

.app-stack {
  background: #eaf5ff;
  border-color: #d0e6ff;
  color: #285f96;
}

.app-default {
  background: #eef2f6;
  border-color: #d8dde6;
  color: #445065;
}

.feed-row-body {
  min-width: 0;
}

.feed-row-title {
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.013em;
  margin-top: 1px;
  font-weight: 600;
  color: #1f2630;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.feed-row-title-line .feed-row-title {
  flex: 1;
  min-width: 0;
}

.feed-row-meta {
  font-size: 13px;
  line-height: 18px;
  color: #747f91;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 3px;
}

.file-type-pill,
.info-pill-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d5ddec;
  border-radius: 999px;
  padding: 2px 8px 2px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4d5b75;
  background: #f2f5fb;
  white-space: nowrap;
}

.file-type-icon,
.info-pill-icon {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(118, 133, 157, 0.35);
  background: rgba(255, 255, 255, 0.78);
  color: #5c6a83;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.file-type-icon svg,
.info-pill-icon svg {
  width: 10px;
  height: 10px;
}

.file-type-icon svg *,
.info-pill-icon svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-type-doc,
.file-type-docx {
  background: #eaf1ff;
  border-color: #cfe0ff;
  color: #2f61a6;
}

.file-type-pdf {
  background: #fff0f0;
  border-color: #f3d3d3;
  color: #a14141;
}

.file-type-ppt,
.file-type-pptx {
  background: #fff4ea;
  border-color: #f3dbc0;
  color: #a1622d;
}

.file-type-xls,
.file-type-xlsx,
.file-type-csv {
  background: #ebf7ee;
  border-color: #cde9d6;
  color: #2f7b4d;
}

.file-type-png,
.file-type-jpg,
.file-type-jpeg,
.file-type-svg {
  background: #f1ecff;
  border-color: #dcd0f9;
  color: #6150ae;
}

.file-type-folder,
.file-type-stack {
  background: #eaf6ff;
  border-color: #cee5f7;
  color: #2f6f96;
}

.feed-row-excerpt {
  font-size: 14px;
  line-height: 21px;
  color: #4e596c;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.link-btn {
  border: 1px solid #d6dce7;
  border-radius: 7px;
  background: #fff;
  color: #4f596d;
  font-size: 12px;
  height: 30px;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.link-btn:hover {
  background: #f4f6f9;
}

.link-btn-icon {
  width: 48px;
  justify-content: center;
  padding: 0;
}

.context-pane {
  display: grid;
  gap: 12px;
  align-content: start;
}

.context-card {
  border: 1px solid #dde2ea;
  border-radius: 12px;
  background: #fff;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.09);
}

.context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.context-card h2 {
  margin: 0;
  font-size: 15px;
  color: #2a3039;
}

.context-icon-btn {
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #586478;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.context-icon-btn svg {
  width: 14px;
  height: 14px;
}

.context-icon-btn:hover {
  border-color: #dae0ea;
  background: #f2f5f8;
}

.event-item {
  border-top: 1px solid #ebeff5;
  padding: 9px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.event-item strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #242b35;
}

.event-item span {
  font-size: 12px;
  color: #707b8d;
  line-height: 1.35;
}

.event-time {
  font-size: 12px;
  color: #3e4d67;
  font-weight: 600;
  min-width: 60px;
  margin-top: 1px;
}

.event-body {
  min-width: 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trust-cell {
  border: 1px solid #eceff4;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 6px 14px rgba(15, 23, 39, 0.07);
}

.trust-cell strong {
  display: block;
  font-size: 16px;
}

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

.context-action {
  margin-top: 10px;
  width: 100%;
  height: 34px;
  border: 1px solid #d8dfe9;
  border-radius: 8px;
  background: #f6f8fb;
  cursor: pointer;
  color: #465368;
  font-size: 12px;
}

.context-action:hover {
  background: #eff3f8;
}

.search-dropdown {
  position: absolute;
  inset: calc(100% + 8px) 0 auto 0;
  z-index: 40;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 460px;
  overflow: auto;
}

.search-group {
  border-top: 1px solid #eef1f5;
}

.search-group:first-child {
  border-top: 0;
}

.search-group-header {
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #748093;
  text-transform: uppercase;
  padding: 9px 14px 6px;
  font-weight: 600;
}

.search-item {
  border: 0;
  width: 100%;
  text-align: left;
  background: #fff;
  padding: 8px 12px 9px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  cursor: pointer;
}

.search-item:hover,
.search-item.active {
  background: #f3f6fa;
}

.search-empty-state .search-item + .search-item {
  border-top: 1px solid #eef1f5;
}

.search-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid #d9dfe8;
  background: #f2f4f8;
  color: #526079;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.search-item-icon .brand-logo {
  width: 16px;
  height: 16px;
}

.search-item-icon.tone-action {
  background: #eff2f7;
  border-color: #d7deea;
  color: #5f6b80;
}

.search-item-icon.tone-document {
  background: #eaf1ff;
  border-color: #cfe0ff;
  color: #2f61a6;
}

.search-item-icon.tone-people {
  background: #eaf3ff;
  border-color: #cbddff;
  color: #2f63a4;
}

.search-item-icon.tone-email {
  background: #fff2e9;
  border-color: #f5d8c7;
  color: #a86439;
}

.search-item-icon.tone-event {
  background: #f1edff;
  border-color: #dbd0f9;
  color: #5e4eae;
}

.search-item-icon.tone-app {
  background: #ebf8ef;
  border-color: #cee9d8;
  color: #2f7c4e;
}

.search-item-icon.tone-stack {
  background: #e8f7fb;
  border-color: #cae8f1;
  color: #2d6f84;
}

.search-item-icon.tone-decision {
  background: #ebf6ff;
  border-color: #cfe5f8;
  color: #2f628d;
}

.search-item-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.search-item-title {
  font-size: 13px;
  line-height: 1.3;
  color: #1f2733;
}

.search-item-meta {
  font-size: 11px;
  color: #6c7789;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-pill {
  border: 1px solid #dde3ec;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f5f7fa;
  color: #657286;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-pill-app,
.info-pill-app {
  background: #f4f7fb;
}

.meta-app-logo,
.info-pill-app-logo {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.meta-app-logo .brand-logo,
.info-pill-app-logo .brand-logo {
  width: 13px;
  height: 13px;
}

.meta-pill-file .meta-app-logo svg {
  width: 10px;
  height: 10px;
}

.meta-pill-file .meta-app-logo svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-pill {
  border: 1px solid #d9e0eb;
  border-radius: 999px;
  background: #f5f7fb;
  color: #5e6b80;
  font-size: 11px;
  padding: 2px 8px 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}

.reason-chip {
  border: 1px solid #d8e3f8;
  background: #eef4ff;
  color: #365b95;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
}

.overlay-shell {
  position: fixed;
  inset: 0;
  background: rgba(33, 39, 48, 0.42);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 60;
}

.overlay-card {
  width: min(840px, 92vw);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e4ea;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.overlay-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 31px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.overlay-card p {
  margin: 0 0 16px;
  color: #616c80;
  font-size: 15px;
  line-height: 22px;
}

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

.persona-option {
  border: 1px solid #d8dee9;
  background: #fff;
  border-radius: 10px;
  text-align: left;
  padding: 12px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  position: relative;
}

.persona-option strong {
  font-size: 15px;
}

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

.persona-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #d6ddeb;
  background: #f3f6fb;
  color: #4f5d75;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.persona-option.selected {
  border-color: #94b1ee;
  background: #f3f8ff;
}

.remember-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #4f5a6b;
}

.continue-btn {
  margin-top: 14px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 0 15px;
  cursor: pointer;
}

.continue-btn:disabled {
  background: #9da8bd;
  cursor: not-allowed;
}

.welcome-shell {
  position: fixed;
  inset: 0;
  z-index: 98;
}

.welcome-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(14, 20, 30, 0.56);
  backdrop-filter: blur(3px);
}

.welcome-panel {
  position: relative;
  width: min(1040px, 95vw);
  max-height: min(90vh, 860px);
  margin: min(5.5vh, 44px) auto 0;
  background: #fff;
  border: 1px solid #d8e1ed;
  border-radius: 16px;
  box-shadow: 0 26px 56px rgba(8, 15, 25, 0.34);
  overflow: visible;
}

.welcome-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #dce5f1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #244666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.welcome-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 520px;
  max-height: min(calc(90vh - 78px), 790px);
  overflow: auto;
  border-radius: 16px;
}

.welcome-hero {
  position: relative;
  padding: 30px 32px 28px;
  color: #083654;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0 24%, rgba(255, 255, 255, 0.04) 24% 100%),
    linear-gradient(125deg, #d8efff 0%, #9ad0f4 47%, #76bdea 100%);
  overflow: hidden;
}

.welcome-hero::before,
.welcome-hero::after {
  content: "";
  position: absolute;
  right: -150px;
  width: 360px;
  height: 360px;
  transform: rotate(45deg);
  border: 10px solid rgba(25, 116, 180, 0.24);
}

.welcome-hero::before {
  top: -130px;
}

.welcome-hero::after {
  bottom: -170px;
  border-color: rgba(255, 255, 255, 0.32);
}

.welcome-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #1b4f78;
}

.welcome-hero h2 {
  margin: 0;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 440px;
}

.welcome-lede {
  margin: 18px 0 12px;
  max-width: 470px;
  font-size: 15px;
  line-height: 1.5;
  color: #174564;
}

.welcome-bullets {
  margin: 0;
  padding-left: 18px;
  max-width: 470px;
  display: grid;
  gap: 8px;
}

.welcome-bullets li {
  color: #1a4a6b;
  font-size: 14px;
  line-height: 1.45;
}

.welcome-footer {
  margin: 16px 0 0;
  max-width: 450px;
  font-size: 13px;
  line-height: 1.5;
  color: #184664;
}

.welcome-side {
  padding: 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%);
  border-left: 1px solid #dbe5f2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-content: start;
}

.welcome-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.welcome-tab {
  height: 33px;
  border: 1px solid #d3dfef;
  border-radius: 8px;
  background: #f5f9ff;
  color: #46607f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.welcome-tab.active {
  border-color: #9eb7e5;
  background: #ffffff;
  color: #173f63;
  box-shadow: inset 0 0 0 1px rgba(82, 126, 198, 0.12);
}

.welcome-tab-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.welcome-tab-panel[hidden] {
  display: none;
}

.welcome-card {
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  background: #fff;
  padding: 12px 12px 11px;
  box-shadow: 0 8px 20px rgba(27, 63, 99, 0.08);
}

.welcome-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #173b5b;
}

.welcome-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #51627a;
}

.welcome-card-list {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #4f6078;
}

.welcome-start-btn {
  margin-top: 4px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #0f2a44;
  background: #111f32;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.welcome-start-btn:hover {
  background: #0d1a2b;
}

#welcomeCloseBtn[data-tooltip]:hover::after,
#welcomeCloseBtn[data-tooltip]:focus-visible::after {
  bottom: auto;
  top: calc(100% + 8px);
}

#welcomeCloseBtn[data-tooltip]:hover::before,
#welcomeCloseBtn[data-tooltip]:focus-visible::before {
  bottom: auto;
  top: calc(100% + 3px);
  border-top: 0;
  border-bottom: 5px solid #121722;
}

.drawer-shell,
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 24, 39, 0.46);
  cursor: default;
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(700px, 92vw);
  height: 100%;
  background: #fff;
  border-left: 1px solid #dfe5ef;
  box-shadow: -6px 0 22px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-rows: auto 1fr;
}

.inspector-panel {
  width: min(420px, 92vw);
}

.drawer-header,
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2,
.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-header button,
.modal-header button {
  border: 0;
  background: transparent;
  font-size: 18px;
  color: #4c5768;
  cursor: pointer;
}

.drawer-body {
  overflow: auto;
  padding: 12px 16px 18px;
  display: grid;
  gap: 14px;
}

.brief-section {
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  padding: 10px;
}

.brief-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.brief-meta-line {
  font-size: 13px;
  color: #4d596c;
  margin: 3px 0;
}

.brief-evidence-item,
.brief-person-item {
  border-top: 1px solid #edf1f6;
  padding: 8px 0;
}

.brief-evidence-item:first-child,
.brief-person-item:first-child {
  border-top: 0;
}

.ask-section textarea,
.ask-section select {
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font: inherit;
}

.ask-section button {
  border: 1px solid #b9c8e6;
  background: #f2f6ff;
  color: #294f96;
  border-radius: 8px;
  height: 32px;
  padding: 0 11px;
  cursor: pointer;
}

.ask-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.ask-answer {
  margin-top: 10px;
  font-size: 14px;
  color: #1d2531;
  white-space: pre-wrap;
}

.ask-citations {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.citation-chip {
  font-size: 11px;
  border: 1px solid #d8e3fb;
  background: #f4f8ff;
  color: #2f5aab;
  border-radius: 999px;
  padding: 3px 8px;
}

.modal-panel {
  width: min(1200px, 96vw);
  max-height: min(88vh, 860px);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dce3ee;
  box-shadow: 0 16px 42px rgba(15, 22, 35, 0.22);
  margin: 6vh auto;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  z-index: 1;
}

.risk-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 500px;
}

.risk-filter-pane {
  border-right: 1px solid #e4e9f1;
  background: #f8fafc;
  padding: 14px 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.risk-filter-pane h3 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.risk-filter-subtitle {
  margin: 0;
  color: #778293;
  font-size: 12px;
}

.risk-preset-list {
  display: grid;
  gap: 3px;
}

.risk-preset {
  border: 1px solid transparent;
  border-radius: 8px;
  height: 32px;
  background: transparent;
  text-align: left;
  padding: 0 9px;
  color: #4f5a6e;
  font-size: 12px;
  cursor: pointer;
}

.risk-preset:hover {
  background: #eef2f7;
}

.risk-preset.active {
  background: #e8eff9;
  border-color: #d2dceb;
  color: #2e4f83;
}

.risk-filter-label {
  font-size: 12px;
  color: #6f7b8f;
}

.risk-filter-pane select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d5dce8;
  background: #fff;
  padding: 0 10px;
  font: inherit;
}

.risk-main-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.risk-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e8ecf3;
}

.risk-controls button {
  height: 30px;
  border-radius: 8px;
  border: 1px solid #d7dce7;
  background: #f7f9fc;
  padding: 0 9px;
  font-size: 12px;
  color: #4a566c;
  cursor: pointer;
}

.risk-controls button:hover {
  background: #eff3f8;
}

.risk-table-wrap {
  overflow: auto;
  min-height: 0;
}

.risk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.risk-table th,
.risk-table td {
  border-bottom: 1px solid #edf2f7;
  padding: 8px 10px;
  text-align: left;
}

.risk-table th {
  font-size: 11px;
  color: #697589;
  background: #f7f9fc;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.risk-action-log {
  border-top: 1px solid #e8ecf3;
  padding: 9px 12px;
  font-size: 12px;
  color: #59667a;
  max-height: 92px;
  overflow: auto;
}

.kpi-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(340px, 90vw);
  background: #ffffff;
  border-left: 1px solid var(--line);
  z-index: 55;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.kpi-panel.open {
  transform: translateX(0);
}

.kpi-panel header {
  border-bottom: 1px solid #edf1f6;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-panel h2 {
  margin: 0;
  font-size: 16px;
}

.kpi-panel header button {
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.kpi-metrics {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f6;
  display: grid;
  gap: 8px;
}

.metric-cell {
  border: 1px solid #e8edf6;
  border-radius: 9px;
  padding: 8px 10px;
}

.metric-cell strong {
  display: block;
  font-size: 17px;
}

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

.event-log-section {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.event-log-section h3 {
  margin: 0;
  padding: 12px 14px 8px;
  font-size: 14px;
}

.event-log {
  overflow: auto;
  padding: 0 14px 14px;
  display: grid;
  gap: 8px;
}

.event-log-item {
  border: 1px solid #e8edf6;
  border-radius: 8px;
  padding: 8px 9px;
}

.event-log-item strong {
  font-size: 12px;
}

.event-log-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.strategy-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  border-radius: 999px;
  border: 1px solid #d6dbe5;
  background: rgba(255, 255, 255, 0.94);
  color: #6a7383;
  font-size: 12px;
  line-height: 1;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(13, 23, 39, 0.14);
}

.strategy-fab:hover,
.strategy-fab:focus-visible {
  color: #4d5767;
  border-color: #bfc8d8;
}

.strategy-panel .strategy-content {
  overflow: auto;
  padding: 14px 18px 20px;
  display: grid;
  gap: 14px;
}

.strategy-panel h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.strategy-panel p,
.strategy-panel li {
  font-size: 13px;
  color: #4b5768;
  line-height: 1.5;
}

.dash-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 80;
  background: #101726;
  color: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
}

.top-link-btn,
.link-btn,
.brief-cta,
.brief-dismiss,
.context-action,
.chip,
.filter-chip,
.risk-controls button,
.risk-preset,
.strategy-fab {
  position: relative;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #121722;
  color: #fff;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  z-index: 120;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #121722;
  z-index: 121;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
}

.tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 17, 25, 0.48);
}

.tour-card {
  position: fixed;
  width: min(360px, 88vw);
  background: #fff;
  border: 1px solid #dbe2ee;
  border-radius: 12px;
  box-shadow: 0 20px 44px rgba(10, 18, 29, 0.3);
  padding: 12px 12px 10px;
  z-index: 96;
}

.tour-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-head p {
  margin: 0;
  font-size: 11px;
  color: #6d798d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.tour-head button {
  border: 0;
  background: transparent;
  color: #59667a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.tour-card h3 {
  margin: 7px 0 6px;
  font-size: 18px;
  line-height: 24px;
}

.tour-card p {
  margin: 0;
  font-size: 13px;
  color: #556277;
  line-height: 1.45;
}

.tour-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tour-actions button {
  height: 32px;
  min-width: 94px;
  border-radius: 8px;
  border: 1px solid #d5dce8;
  background: #fff;
  color: #4f5b70;
  font-size: 12px;
  cursor: pointer;
}

.tour-actions button:last-child {
  background: #101722;
  color: #fff;
  border-color: #101722;
}

.tour-highlight {
  position: relative;
  z-index: 97;
  box-shadow: 0 0 0 3px rgba(56, 122, 246, 0.42), 0 12px 24px rgba(8, 16, 28, 0.3) !important;
  border-radius: 10px;
}

@media (max-width: 1320px) {
  .next-actions-shell .briefing-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1150px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

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

  .feed-row-title {
    font-size: 16px;
    line-height: 23px;
  }

  .feed-row-excerpt {
    font-size: 14px;
    line-height: 21px;
  }

  .risk-layout {
    grid-template-columns: 1fr;
  }

  .risk-filter-pane {
    border-right: 0;
    border-bottom: 1px solid #e4e9f1;
  }

  .dash-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: none;
    gap: 10px;
  }

  .dash-chat-doc-panel,
  .dash-chat-thread-panel {
    height: min(52vh, 520px);
    min-height: 360px;
    max-height: 520px;
  }
}

@media (max-width: 860px) {
  .dash-app {
    grid-template-columns: 1fr;
  }

  .dash-rail {
    display: none;
  }

  .dash-main {
    padding: 12px;
  }

  .dash-topbar {
    flex-direction: column;
  }

  .demo-review-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 12px;
  }

  .demo-review-head {
    flex-wrap: wrap;
  }

  .top-controls {
    flex-wrap: wrap;
  }

  .search-shell {
    width: 100%;
    border-radius: 16px;
    padding: 8px 10px 10px;
  }

  .search-shell input {
    font-size: 16px;
    line-height: 22px;
    height: 40px;
    border-radius: 10px;
  }

  .chip-row {
    flex-wrap: wrap;
  }

  .dash-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dash-chat-title {
    font-size: 23px;
  }

  .dash-chat-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .dash-chat-doc-panel {
    display: none;
  }

  .dash-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .dash-chat-composer-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-chat-composer-footer button {
    justify-content: center;
  }

  .dash-chat-thread-panel {
    height: min(50vh, 460px);
    min-height: 320px;
    max-height: 460px;
  }

  .next-actions-shell {
    margin-bottom: 10px;
  }

  .next-actions-shell .briefing-cards {
    grid-template-columns: 1fr;
  }

  .feed-tab {
    font-size: 16px;
    line-height: 22px;
    padding-top: 10px;
  }

  .feed-filter-row {
    overflow: auto;
    padding-bottom: 2px;
  }

  .feed-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .feed-avatar {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .feed-row-title {
    font-size: 16px;
    line-height: 22px;
  }

  .feed-row-meta {
    font-size: 12px;
    line-height: 16px;
  }

  .feed-row-excerpt {
    font-size: 14px;
    line-height: 20px;
  }

  .context-card {
    padding: 10px;
  }

  .context-pane {
    grid-template-columns: 1fr;
  }

  .persona-grid {
    grid-template-columns: 1fr;
  }

  .overlay-card h1 {
    font-size: 24px;
    line-height: 29px;
  }

  .overlay-card p {
    font-size: 14px;
    line-height: 20px;
  }

  .welcome-panel {
    width: 97vw;
    max-height: 93vh;
    margin-top: 4vh;
  }

  .welcome-layout {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .welcome-hero {
    padding: 22px 18px 18px;
  }

  .welcome-hero h2 {
    font-size: 30px;
    line-height: 1.04;
    max-width: none;
  }

  .welcome-lede {
    font-size: 14px;
    margin-top: 12px;
  }

  .welcome-bullets li,
  .welcome-footer {
    font-size: 13px;
  }

  .welcome-side {
    border-left: 0;
    border-top: 1px solid #dbe5f2;
    padding: 14px;
    grid-template-rows: auto auto auto;
  }

  .welcome-tabs {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .welcome-tab {
    height: 34px;
  }

  .welcome-tab-panel {
    overflow: visible;
  }

  .strategy-fab {
    right: 10px;
    bottom: 10px;
    font-size: 10px;
    padding: 8px 9px;
  }

  .modal-panel {
    width: 96vw;
    margin: 3vh auto;
  }

  .tour-card {
    width: min(320px, 90vw);
  }
}

@media (max-width: 520px) {
  .dash-chat-thread-panel {
    height: min(46vh, 400px);
    min-height: 280px;
    max-height: 400px;
  }

  .dash-chat-doc-content {
    padding: 12px;
  }

  .dash-chat-composer {
    padding: 8px 10px 10px;
  }
}
