/* ============================================================================
   INSIGHTS — LAYOUT
   Composition only: every surface is a library component, so this sheet only
   spaces them. Semantic tokens only. The page frame (hero + .slate-page) comes
   from the shell; embedded tools sit inside the host workspace's Disclosure.
   ========================================================================= */

.insights,
.insights__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}
.insights--embedded,
.insights--embedded .insights__body { gap: var(--space-5); }

.insights__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.insights__unmodeled {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--warning);
}

.insights__muted {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* start / sit choices */
.insights__choice-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-7);
  border-bottom: 1px solid var(--border-subtle);
}

/* table cells */
.insights__changes,
.insights__decision {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.insights__changes > div {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  white-space: nowrap;
}
.insights__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}
.insights__share {
  display: grid;
  gap: var(--space-2);
  min-width: 96px;
}
.insights__sweep:empty { display: none; }

/* the collapsed tool panel the host workspaces embed */
/* An embedded tool, closed: one balanced row. The label sits on the left, a
   round chevron on the right that turns and fills when open. No icon tile:
   a tinted square around a glyph is decoration that says nothing. */
.insights__tool-card { margin-block: var(--space-6); }
.insights__tool-card > .slate-card__body > .slate-disclosure { border-top: 0; }
.insights__tool .slate-disclosure__trigger {
  min-height: 60px;
  padding: var(--space-4) var(--space-5) var(--space-4) var(--space-7);
  gap: var(--space-5);
  font-size: var(--text-base);
  color: var(--text-strong);
  text-align: left;
}
.insights__tool .slate-disclosure__trigger > span:not(.slate-disclosure__caret) { flex: 1; min-width: 0; }
.insights__tool .slate-disclosure__caret {
  order: 2;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-active);
  color: var(--text-muted);
  transition: transform var(--dur-3) var(--ease-spring), background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.insights__tool .slate-disclosure__trigger:hover .slate-disclosure__caret,
.insights__tool .slate-disclosure__trigger:focus-visible .slate-disclosure__caret { color: var(--text-strong); background: var(--bg-hover); }
.insights__tool.is-open .slate-disclosure__caret { background: var(--accent); color: var(--accent-on); }
.insights__tool.is-open .slate-disclosure__trigger { border-bottom: 1px solid var(--border-subtle); }
.insights__tool .slate-disclosure__body { padding-top: var(--space-6); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .insights__tool:not(.is-open) .slate-disclosure__trigger:hover .slate-disclosure__caret { transform: translateY(2px); }
}

