@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap");

/* SOC-Maddy v2 — minimal. Prefix: sm- */
.sm-root { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 13px; line-height: 20px; -webkit-font-smoothing: antialiased; }
.sm-mono { font-family: var(--font-mono); font-size: 12px; line-height: 18px; }
.sm-label { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); }

/* Button */
.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); height: 28px; padding: 0 var(--space-3);
  border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font: 500 12px/1 var(--font-sans); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.sm-btn:hover { background: var(--surface-300); }
.sm-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sm-btn:disabled { opacity: .4; cursor: not-allowed; }
.sm-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.sm-btn--primary:hover { background: var(--brand); filter: brightness(1.08); }
.sm-btn--danger { border-color: transparent; color: var(--threat); }
.sm-btn--danger:hover { background: var(--threat-soft); }
.sm-btn--ghost { border-color: transparent; color: var(--ink-muted); }
.sm-btn--sm { height: 24px; padding: 0 var(--space-2); font-size: 11px; }

/* Severity: a dot + mono word, no box */
.sm-badge { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/16px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.sm-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sm-badge--critical, .sm-badge--high { color: var(--threat); }
.sm-badge--high::before { border-radius: 1px; }
.sm-badge--medium { color: var(--warn); }
.sm-badge--low { color: var(--ink-muted); }
.sm-badge--ai { color: var(--brand); }
.sm-badge--safe { color: var(--safe); }

/* Status dot (HTML); the map draws a node tile with the same dot in its corner */
.sm-node { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--safe); flex: none; }
.sm-node--watch { background: var(--warn); }
.sm-node--attack { background: var(--threat); }
.sm-node--attack::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--threat); animation: sm-pulse 1.6s ease-out infinite; }
.sm-node--isolated { background: transparent; border: 1.5px dashed var(--isolated); box-sizing: border-box; }
.sm-node--ai { background: var(--brand); }
@keyframes sm-pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

/* Panel */
.sm-panel { background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius-lg); }

/* Metric (status bar) */
.sm-metric { display: grid; gap: 2px; padding: 0 var(--space-4); border-left: 1px solid var(--line); }
.sm-metric:first-child { border-left: 0; padding-left: 0; }
.sm-metric__value { font: 500 20px/24px var(--font-mono); letter-spacing: -.01em; color: var(--ink); }
.sm-metric__value small { font-size: 12px; color: var(--ink-subtle); }
.sm-metric--threat .sm-metric__value { color: var(--threat); }
.sm-metric--safe .sm-metric__value { color: var(--safe); }
.sm-metric--ai .sm-metric__value { color: var(--brand); }

/* Decision */
.sm-decision { border-radius: var(--radius-md); padding: var(--space-3); display: grid; gap: var(--space-2); background: var(--surface-200); border: 1px solid transparent; }
.sm-decision--critical { border-color: var(--threat); }
.sm-decision__head { display: flex; align-items: center; gap: var(--space-2); }
.sm-decision__head .sm-mono { margin-left: auto; color: var(--ink-subtle); font-size: 11px; }
.sm-decision__title { font-weight: 500; font-size: 13px; }
.sm-decision__ai { color: var(--ink-muted); font-size: 12px; line-height: 18px; }
.sm-decision__ai b { display: block; font: 500 10px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.sm-conf { display: flex; align-items: center; gap: var(--space-2); font: 11px/16px var(--font-mono); color: var(--ink-subtle); }
.sm-conf__bar { flex: 1; height: 2px; background: var(--surface-300); overflow: hidden; }
.sm-conf__bar i { display: block; height: 100%; background: var(--brand); }
.sm-decision__actions { display: flex; gap: var(--space-1); }
.sm-decision__actions .sm-btn--primary { flex: 1; }

@media (prefers-reduced-motion: reduce) { .sm-node--attack::after { animation: none; transform: scale(1.5); } }
