
@font-face {
    font-family: "HS App Sans";
    src: url("/fonts/Geist-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

.am-node {
    --am-accent: #2563eb;
    --am-border: #e2e8f0;
    --am-bs: solid;
    position: relative;
    box-sizing: border-box;
    width: 190px;
    background-color: #fff;
    border: 1.275px var(--am-bs) var(--am-border);
    border-radius: 16px;
    box-shadow:
        rgba(2, 8, 23, 0.545) 0 22px 46px -20px,
        rgba(2, 8, 23, 0.24) 0 3px 10px -2px,
        rgba(255, 255, 255, 0.9) 0 1px 0 inset;
    font-family: "HS App Sans", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    transition: box-shadow 0.35s, border-color 0.35s, background-color 0.35s;
}
.am-node *, .am-node *::before, .am-node *::after { box-sizing: border-box; }
.am-node.is-spark {
    width: 234px;
    border-radius: 18px;
    box-shadow:
        rgba(2, 8, 23, 0.6) 0 22px 46px -20px,
        rgba(2, 8, 23, 0.263) 0 3px 10px -2px,
        rgba(255, 255, 255, 0.9) 0 1px 0 inset;
}

.am-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; }
.am-body { min-width: 0; flex: 1; overflow: hidden; }
.am-title {
    display: block;
    font-size: 12px; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em;
    color: #0f172a;
    white-space: normal; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

.am-tile {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--am-accent);
    box-shadow: rgba(255, 255, 255, 0.28) 0 1px 0 inset, rgba(2, 8, 23, 0.18) 0 1px 2px;
    color: #fff;
    transition: background-color 140ms ease;
}
.am-tile svg { width: 16px; height: 16px; flex: 0 0 auto; display: block; stroke: none; }
.am-tile .k { fill: none; stroke: var(--am-accent); }
.am-tile .kf { fill: var(--am-accent); }
.am-tile[data-hollow] { background: #fff; border: 1.5px dashed #94a3b8; box-shadow: none; color: #94a3b8; }
.am-tile[data-hollow] .k { stroke: #fff; }
.am-tile[data-hollow] .kf { fill: #fff; }

.am-own { display: flex; align-items: center; min-width: 0; gap: 6px; margin-top: 3px; font-size: 11.5px; line-height: 1.15; }
.am-av {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 24px; height: 24px; border-radius: 50%;
    font-size: 10.5px; font-weight: 700; line-height: 1;
    background: color-mix(in srgb, #64748b 14%, transparent); color: #475569;
}
.am-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.am-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #64748b; }
.am-own[data-none] .am-av {
    background: rgba(148, 163, 184, 0.16);
    border: 1.25px dashed color-mix(in srgb, var(--am-accent) 55%, transparent);
}
.am-own[data-none] .am-name { color: #9a3412; font-weight: 600; }

.am-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; padding: 12px 12px 0; }
.am-head-l { display: flex; align-items: center; min-width: 0; gap: 9px; }
.am-node.is-spark .am-tile { width: 28px; height: 28px; }
.am-node.is-spark .am-tile svg { width: 15px; height: 15px; }
.am-meta { min-width: 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; line-height: 24px; }
.am-meta .am-title { display: inline; font-size: 12px; line-height: 1.2; white-space: nowrap; -webkit-line-clamp: none; }
.am-meta .am-own { margin-top: 2px; line-height: 1.2; }
.am-unit { display: block; margin-top: 2px; font-size: 10px; line-height: 1.2; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-metric { display: inline-flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 3px; max-width: 82px; overflow: hidden; }
.am-val {
    font-family: "Satoshi", "HS App Sans", sans-serif;
    font-weight: 700; font-size: 15px; letter-spacing: -0.03em; line-height: 0.9;
    font-variant-numeric: tabular-nums; color: #0f172a;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.am-dlt { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; background: #1e293b; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.am-well {
    position: relative; overflow: hidden; margin: 8px; height: 48px;
    border-radius: 9px;
    border: 1px dashed color-mix(in srgb, #94a3b8 33%, transparent);
    background: radial-gradient(circle, color-mix(in srgb, #e2e8f0 85%, transparent) 1px, transparent 1px) 0 0 / 13px 13px, #f8fafc;
}
.am-spark { position: absolute; inset: 0; color: var(--am-accent); }
.am-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.am-spark .sdot {
    position: absolute; width: 5px; height: 5px; border-radius: 50%;
    transform: translate(-50%, -50%);
    background: currentColor;
    box-shadow: #fff 0 0 0 1.5px, color-mix(in srgb, currentColor 20%, transparent) 0 0 0 2.5px;
}

.am-pill {
    position: absolute; z-index: 3; top: 0; right: 0;
    transform: translateY(calc(-100% - 5px));
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-width: 22px; height: 22px; padding: 0 9px;
    border-radius: 9999px;
    background: var(--am-pill, var(--am-accent));
    color: #fff;
    font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: 0.01em; white-space: nowrap;
    box-shadow: rgba(255, 255, 255, 0.92) 0 0 0 1.5px, rgba(2, 6, 23, 0.32) 0 2px 6px;
}
.am-pill svg { width: 12px; height: 12px; flex: none; fill: none; stroke: #fff; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

@keyframes am-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--am-accent) 28%, transparent), rgba(2, 8, 23, 0.545) 0 22px 46px -20px, rgba(2, 8, 23, 0.24) 0 3px 10px -2px; }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--am-accent) 6%, transparent), rgba(2, 8, 23, 0.545) 0 22px 46px -20px, rgba(2, 8, 23, 0.24) 0 3px 10px -2px; }
}
.am-node[data-pulse] { animation: am-pulse 1.6s ease-in-out infinite; }

.am-edge { fill: none; stroke: #0ea5e9; stroke-width: 2; stroke-linecap: round; }
.am-arrow { fill: #0ea5e9; stroke: #0ea5e9; stroke-width: 1.8; stroke-linejoin: round; }
.am-dot { fill: #0ea5e9; }
.am-mid { position: absolute; width: 0; height: 0; pointer-events: none; }
.am-mark {
    position: absolute; left: -8px; top: -8px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    box-shadow: #fff 0 0 0 1.5px, rgba(15, 23, 42, 0.18) 0 1px 2px;
    color: #fff;
}
.am-mark svg { width: 9px; height: 9px; display: block; }
.am-label {
    position: absolute; top: -9px; left: 12px;
    max-width: 200px; padding: 1px 7px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 9px;
    box-shadow: rgba(15, 23, 42, 0.06) 0 1px 2px;
    font-family: "HS App Sans", "Geist", -apple-system, sans-serif;
    font-size: 11px; font-weight: 500; line-height: 14px; color: #334155;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    -webkit-font-smoothing: antialiased;
}
.am-mid[data-side="left"] .am-label { left: auto; right: 12px; }
.am-mid[data-side="none"] .am-label { display: none; }

@media (prefers-reduced-motion: reduce) {
    .am-node[data-pulse] { animation: none; }
    .am-flow { display: none; }
}
