/* Stream B styles (docs/PHASE-1-PLAN.md): Context Cloud pages. Use vm-* tokens from studio.css;
   every class here starts with cc-. */

/* ── Shared base for Context Cloud pages (list and graph) ────────────────────────────────── */
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.cc-head > div { min-width: 0; max-width: 76ch; }
.cc-head p { text-wrap: pretty; }

/* List | Graph switch */
.cc-toggle { display: inline-flex; border: 1px solid var(--vm-line); border-radius: 999px; background: var(--vm-white); padding: 3px; flex: none; }
.cc-toggle a { padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--vm-muted); text-decoration: none; }
.vm .cc-toggle a:hover { color: var(--vm-blue); }
.vm .cc-toggle a[aria-current="page"] { background: var(--vm-blue); color: var(--vm-white); }

/* Sections and item rows */
.cc-section { display: flex; flex-direction: column; }
.cc-section + .cc-section { margin-top: 14px; }
.cc-section > h2 { font-size: 17px; margin-bottom: 6px; }
.cc-section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cc-item { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--vm-line); font-size: 14.5px; }
.cc-section > h2 + .cc-item, .cc-section-head + .cc-item { border-top: 0; }
.cc-item > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cc-item.more a { font-weight: 700; text-decoration: none; }
.cc-item.proposed > span:first-child { color: var(--vm-muted); }

/* Chips (same shape as vm-chip, quieter) */
.cc-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--vm-mist); color: var(--vm-blue); }
.cc-chip.warn { background: var(--vm-warn-soft); color: var(--vm-warn); }
.cc-chip.ok { background: var(--vm-ok-soft); color: var(--vm-ok); }
.cc-chip.muted { background: #eef0f5; color: var(--vm-muted); }

.cc-empty b { font-size: 16px; }

/* ── Graph ───────────────────────────────────────────────────────────────────────────────── */
.cc-graph-wrap { border: 1px solid var(--vm-line); border-radius: var(--vm-radius); background: var(--vm-white); box-shadow: var(--vm-shadow); overflow: hidden; }
.cc-graph-wrap svg { display: block; width: 100%; height: auto; }
.cc-edge { stroke: #c9d2e6; stroke-width: 1.5; }
.cc-node circle { fill: var(--vm-white); stroke: var(--vm-muted); stroke-width: 1.5; }
.cc-node text { fill: var(--vm-navy); font: 500 12.5px "Inter", system-ui, sans-serif; paint-order: stroke; stroke: var(--vm-white); stroke-width: 4px; stroke-linejoin: round; }
.cc-node.business text { stroke: none; }
.cc-node:focus { outline: none; }
.cc-node:focus-visible circle, .cc-node:hover circle { stroke: var(--vm-blue); stroke-width: 3; }
.cc-node:focus-visible text, .cc-node:hover text { fill: var(--vm-blue); }
.cc-node.business circle { fill: var(--vm-navy); stroke: var(--vm-navy); }
.cc-node.business text, .cc-node.business:hover text, .cc-node.business:focus-visible text { fill: var(--vm-white); font-weight: 700; font-size: 13px; }
.cc-node.event circle { fill: var(--vm-mist); stroke: var(--vm-blue); stroke-width: 2; }
.cc-node.event text { font-weight: 700; font-size: 13.5px; }
.cc-node.event.held circle { fill: var(--vm-white); stroke: var(--vm-muted); stroke-dasharray: 4 3; }
.cc-node.event.held text { fill: var(--vm-muted); }
.cc-node.fact circle { fill: var(--vm-blue); stroke: var(--vm-blue); }
.cc-node.rule circle { fill: var(--vm-violet); stroke: var(--vm-violet); }
.cc-node.rule.proposed circle { fill: var(--vm-white); stroke: var(--vm-violet); stroke-dasharray: 3 3; }
.cc-node.rule.proposed text { fill: var(--vm-muted); font-style: italic; }
.cc-node.agency circle { fill: var(--vm-white); stroke: var(--vm-muted); }
.cc-node.agency text { fill: var(--vm-muted); }
.cc-node.more circle { fill: var(--vm-white); stroke: var(--vm-blue); stroke-dasharray: 2 2; }
.cc-node.more text { fill: var(--vm-blue); font-weight: 700; }

.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.cc-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cc-key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; border: 1.5px solid var(--vm-muted); background: var(--vm-white); }
.cc-key.business { background: var(--vm-navy); border-color: var(--vm-navy); }
.cc-key.event { background: var(--vm-mist); border: 2px solid var(--vm-blue); width: 14px; height: 14px; }
.cc-key.held { border: 1.5px dashed var(--vm-muted); width: 14px; height: 14px; }
.cc-key.fact { background: var(--vm-blue); border-color: var(--vm-blue); }
.cc-key.rule { background: var(--vm-violet); border-color: var(--vm-violet); }
.cc-key.proposed { border: 1.5px dashed var(--vm-violet); }
.cc-hint { margin: 6px 0 0; }

/* The list under the map replaces it when the map would be too small to read (its text
   scales with the box: under ~720px wide it drops below 10px). */
.cc-graph-area { container-type: inline-size; }
.cc-graph-list { display: none; }
.cc-graph-list .cc-item { flex-direction: column; align-items: flex-start; gap: 2px; }
@container (max-width: 720px) {
  .cc-graph { display: none; }
  .cc-graph-list { display: block; }
}
@media (max-width: 480px) {
  .cc-graph { display: none; }
  .cc-graph-list { display: block; }
}
