/* CMO-graph — B&W network visualization for STRATEGILABBET method-page.
   Pure CSS + SVG; no inline styles to satisfy CSP and brand. */

.cmo-graph-container {
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto;
    background: #fff;
    border: 1px solid #000;
}

.cmo-graph-svg {
    width: 100%;
    height: auto;
    display: block;
    font-family: 'Inter', sans-serif;
}

/* Node base */
.cmo-node rect,
.cmo-node circle,
.cmo-node ellipse {
    fill: #fff;
    stroke: #000;
    stroke-width: 1.5px;
    transition: fill 0.15s ease, stroke-width 0.15s ease;
}

.cmo-node text {
    fill: #000;
    font-size: 11px;
    text-anchor: middle;
    pointer-events: none;
}

.cmo-node--input rect {
    stroke-dasharray: 0;
}

.cmo-node--mechanism rect {
    rx: 12;
    ry: 12;
}

.cmo-node--anchor ellipse {
    stroke-dasharray: 4 3;
}

.cmo-node--outcome rect {
    fill: #000;
}

.cmo-node--outcome text {
    fill: #fff;
    font-weight: 500;
}

/* Hover/active */
.cmo-node:hover rect,
.cmo-node:hover ellipse,
.cmo-node--active rect,
.cmo-node--active ellipse {
    fill: #f0f0f0;
    stroke-width: 3px;
    cursor: pointer;
}

.cmo-node--outcome:hover rect,
.cmo-node--outcome.cmo-node--active rect {
    fill: #333;
}

/* Edges */
.cmo-edge {
    stroke: #888;
    stroke-width: 1px;
    fill: none;
    transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

.cmo-edge--anchor {
    stroke-dasharray: 4 3;
    stroke: #aaa;
}

.cmo-edge--active {
    stroke: #000;
    stroke-width: 2.5px;
}

.cmo-edge--dimmed {
    stroke: #e8e8e8;
}

.cmo-arrowhead {
    fill: #888;
    transition: fill 0.15s ease;
}

.cmo-arrowhead--active {
    fill: #000;
}

/* Legend */
.cmo-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.875rem;
}

.cmo-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cmo-legend-swatch {
    width: 20px;
    height: 14px;
    border: 1.5px solid #000;
}

.cmo-legend-swatch--mechanism {
    border-radius: 6px;
}

.cmo-legend-swatch--anchor {
    border-radius: 50%;
    border-style: dashed;
}

.cmo-legend-swatch--outcome {
    background: #000;
}

/* Detail panel */
.cmo-detail {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #000;
    background: #fafafa;
    min-height: 6rem;
}

.cmo-detail h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.cmo-detail p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cmo-detail--empty {
    color: #666;
    font-style: italic;
}

@media (max-width: 720px) {
    .cmo-graph-svg {
        font-size: 9px;
    }
}
