/* Cognex Company Brain quality pass — intentionally loaded after index.html. */

/* Node detail: summary is a true glanceable header, knowledge is the rich body. */
.ddet-summary p {
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.42;
  font-weight: 520;
}
.ddet-knowledge-list { display: flex; flex-direction: column; gap: 10px; }
.ddet-knowledge-source {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.ddet-knowledge-source > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid transparent;
  font-size: 11px;
  color: var(--ink-faint);
}
.ddet-knowledge-source[open] > summary { border-bottom-color: var(--border-soft); }
.ddet-knowledge-source > summary::-webkit-details-marker { display: none; }
.ddet-knowledge-source > summary .ddet-source-name { color: var(--ink-soft); font-weight: 600; }
.ddet-knowledge-body { padding: 11px 12px 12px; font-size: 13px; line-height: 1.52; color: var(--ink-soft); }
.ddet-knowledge-body > :first-child { margin-top: 0; }
.ddet-knowledge-body > :last-child { margin-bottom: 0; }
.ddet-knowledge-body p { margin: 0 0 9px; }
.ddet-knowledge-body .md-h3,
.ddet-knowledge-body .md-h4,
.ddet-knowledge-body .md-h5 { margin: 12px 0 6px; font-size: 12.5px; color: var(--ink); }
.ddet-knowledge-body .md-list { margin: 6px 0 9px; padding-left: 20px; }
.ddet-knowledge-body .md-table-wrap { margin: 8px 0 10px; overflow-x: auto; }
.ddet-subsec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ddet-subsec-grid .ddet-subsec { margin: 0; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface-2); }
.ddet-subsec-grid .ddet-subsec h5 { margin: 0 0 5px; }
.ddet-subsec-grid .ddet-subsec p,
.ddet-subsec-grid .ddet-subsec ul { margin-bottom: 0; }

/* Mobile Company Brain: smaller physical nodes + thinner strands creates real
   whitespace without changing the semantic radial layout. The desktop board is
   untouched. */
@media (max-width: 640px) {
  .brain-board {
    width: calc(100% + 8px);
    max-width: none;
    margin: 8px -4px 2px;
  }
  .brain-core {
    width: 68px;
    height: 68px;
    box-shadow: 0 0 0 4px var(--surface), 0 3px 10px rgba(0,0,0,.06);
  }
  .brain-core-icon svg { width: 20px; height: 20px; }
  .brain-core .board-count { font-size: 8px; margin-top: 3px; }

  .board-node { width: 78px; }
  .board-node .board-node-bubble {
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border-width: 1.5px;
    font-size: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
  }
  .board-node .board-node-title {
    font-size: 7.5px;
    line-height: 1.12;
    font-weight: 560;
    -webkit-line-clamp: 2;
  }
  .board-node.depth-1 { width: 62px; }
  .board-node.depth-1 .board-node-bubble { width: 34px; height: 34px; font-size: 12px; }
  .board-node.depth-1 .board-node-title { font-size: 6.8px; }
  .board-node.depth-2 { width: 52px; }
  .board-node.depth-2 .board-node-bubble { width: 28px; height: 28px; font-size: 10px; }
  .board-node.depth-2 .board-node-title { font-size: 6.2px; }
  .board-node.crowded { width: 46px; }
  .board-node.crowded .board-node-bubble { width: 25px; height: 25px; font-size: 9px; }
  .board-node.crowded .board-node-title { font-size: 5.8px; }
  .board-node-children { transform: scale(.78); transform-origin: center; }
  .board-node-del { transform: scale(.72); transform-origin: center; }

  .board-line-main { stroke-width: .52px !important; opacity: .38; }
  .board-line-flow { stroke-width: .7px !important; opacity: .16; }
  .board-sector-arc { stroke-width: 1.35px !important; opacity: .48 !important; }
  .board-sector-hit { stroke-width: 7px !important; }
  .board-legend { gap: 4px 10px; font-size: 9.5px; line-height: 1.25; }
  .board-legend-dot { width: 6px; height: 6px; }

  .modal-card.board-detail-card { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .board-detail-body { gap: 16px; }
  .ddet-summary p { font-size: 13px; line-height: 1.4; }
  .ddet-knowledge-body { font-size: 12px; padding: 10px; }
  .ddet-knowledge-source > summary { padding: 8px 10px; font-size: 10px; }
  .ddet-subsec-grid { grid-template-columns: 1fr; }
}
