.deck-article, .viz-tip {
  --s-hero: #c98500; --s-rival: #3987e5;
  --s-rest: color-mix(in srgb, var(--text) 26%, var(--bg));
  --viz-grid: color-mix(in srgb, var(--text) 10%, transparent);
  --viz-surface: var(--bg);
}
:root[data-theme="light"] .deck-article, :root[data-theme="light"] .viz-tip {
  --s-hero: #eda100; --s-rival: #2a78d6;
  --s-rest: color-mix(in srgb, var(--text) 22%, var(--bg));
}
.viz-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.viz-title { margin-right: auto; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.viz-seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); }
.viz-seg button {
  border: 0; background: none; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--muted);
}
.viz-seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-sizing: border-box; }
.viz-legend i.k-up { border-radius: 50%; background: color-mix(in srgb, var(--text) 60%, var(--bg)); }
.viz-legend i.k-down { border-radius: 50%; background: var(--bg); border: 2px solid var(--s-rest); }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-svg text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.viz-svg .grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-svg .spoke.is-on { stroke: color-mix(in srgb, var(--text) 45%, transparent); }
.viz-svg .axis { font-size: 15px; font-weight: 600; }
.viz-svg .axis.is-on { fill: var(--text); }
.viz-svg .line-hero { fill: none; stroke: var(--s-hero); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-svg .line-rival { fill: none; stroke: var(--s-rival); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-svg .dot-hero { fill: var(--s-hero); stroke: var(--viz-surface); stroke-width: 2; pointer-events: none; }
.viz-svg .dot-rival { fill: var(--s-rival); stroke: var(--viz-surface); stroke-width: 2; pointer-events: none; }
.viz-svg .hit { fill: transparent; cursor: default; outline: none; }
.peer-net .link { stroke: color-mix(in srgb, var(--text) 22%, transparent); stroke-width: 1.5; transition: stroke 0.15s ease, opacity 0.15s ease; }
.peer-net .node { outline: none; cursor: default; transition: opacity 0.15s ease; }
.peer-net .node .name { fill: var(--text); font-size: 14px; font-weight: 600; }
.peer-net .node .tag { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; }
.peer-net.narrow .node .name { font-size: 12.5px; }
.peer-net .peer .mark { stroke-width: 2; }
.peer-net .peer.up .mark { fill: color-mix(in srgb, var(--text) 60%, var(--bg)); stroke: var(--viz-surface); }
.peer-net .peer.down .mark { fill: var(--viz-surface); stroke: var(--s-rest); }
.peer-net .center .mark { stroke: var(--viz-surface); stroke-width: 3; }
.peer-net.is-focus .link { opacity: 0.25; }
.peer-net.is-focus .node { opacity: 0.3; }
.peer-net.is-focus .link.is-on { opacity: 1; stroke: color-mix(in srgb, var(--text) 70%, transparent); stroke-width: 2; }
.peer-net.is-focus .node.is-on { opacity: 1; }
.viz-tip {
  position: fixed; z-index: 80; pointer-events: none;
  min-width: 150px; max-width: 240px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 92%, var(--text)); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 12.5px; line-height: 1.5; color: var(--text);
  opacity: 0; transform: translateY(4px); transition: opacity 0.12s ease, transform 0.12s ease;
}
.viz-tip.on { opacity: 1; transform: none; }
.viz-tip b { display: block; font-size: 13px; margin-bottom: 4px; }
.viz-tip .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.viz-tip .row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.viz-tip .row span:last-child { font-variant-numeric: tabular-nums; }
.viz-tip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  .peer-net .link, .peer-net .node { transition: none; }
}
.peer-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.peer-col { min-width: 0; }
.peer-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.peer-name i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.role-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.role-cards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.role-card { display: grid; gap: 4px; padding: 14px 14px 13px; border: 1px solid var(--border); border-radius: 12px; }
.role-card b { font-size: 15px; color: var(--text); }
.role-card span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 640px) {
  .peer-pair, .role-pair { grid-template-columns: minmax(0, 1fr); }
}
.deck-article .slide:has(.viz-host[data-viz="skills"]) { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.deck-article .slide.flip:has(.viz-host[data-viz="skills"]) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .deck-article .slide:has(.viz-host[data-viz="skills"]), .deck-article .slide.flip:has(.viz-host[data-viz="skills"]) { grid-template-columns: minmax(0, 1fr); } }
.deck-article .role-cards { margin: 10px 0 0; padding: 0; }
.deck-article .role-cards li { margin: 0; }
.role-card { padding: 0 0 12px; overflow: hidden; gap: 3px; }
.role-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; margin-bottom: 8px; }
.role-card b, .role-card span { padding: 0 12px; }
