/* Skill Rank insights: galaxy graph, trending, authors. */
.sg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #8a94a6); box-shadow: 0 0 8px var(--c, #8a94a6); margin-right: 6px; flex: none; vertical-align: 1px; }
.sg-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 500 11px/1 var(--pp-mono); letter-spacing: .14em; text-transform: uppercase; color: #8b98a8; }
.sg-kicker b { width: 7px; height: 7px; border-radius: 50%; background: #35e08a; box-shadow: 0 0 10px #35e08a; animation: sgBlink 2.4s infinite; }
@keyframes sgBlink { 50% { opacity: .35; } }
.sg-h1 { margin: 0; font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; color: #f3f6fa; }
.sg-lead { margin: 8px 0 0; color: #a7b2c0; font-size: 14.5px; line-height: 1.5; max-width: 46ch; }
.sg-upd { margin: 10px 0 0; font: 400 11px/1.4 var(--pp-mono); color: #6f7c8c; }

/* ---------- stage ---------- */
.sg-stage { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: calc(100vh - var(--bar-h, 52px)); height: calc(100dvh - var(--bar-h, 52px)); min-height: 520px; overflow: hidden; color: #e6ebf1;
  background:
    radial-gradient(1200px 700px at 62% 45%, rgba(76, 91, 255, .10), transparent 60%),
    radial-gradient(900px 600px at 20% 80%, rgba(53, 224, 138, .05), transparent 60%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 40px 40px,
    #07090d; }
.sg-stage canvas { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; opacity: 0; transition: opacity .8s ease; }
.sg-stage.is-ready canvas { opacity: 1; }
.sg-stage canvas:active { cursor: grabbing; }
.sg-hud { position: absolute; left: 24px; top: 24px; max-width: 360px; pointer-events: none; z-index: 2; }
.sg-hud > * { pointer-events: auto; }
.sg-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 0; margin-top: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: rgba(10,13,19,.72); backdrop-filter: blur(6px); width: max-content; }
.sg-stats div { padding: 8px 14px 9px; border-right: 1px solid rgba(255,255,255,.07); }
.sg-stats div:last-child { border-right: 0; }
.sg-stats span { display: block; font: 500 10px/1 var(--pp-mono); letter-spacing: .12em; text-transform: uppercase; color: #7d8a9a; }
.sg-stats b { display: block; margin-top: 6px; font: 600 20px/1 var(--pp-mono); color: #f3f6fa; font-variant-numeric: tabular-nums; }
.sg-find { position: absolute; right: 24px; top: 24px; width: min(380px, calc(100vw - 48px)); z-index: 3; }
.sg-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(10,13,19,.82); backdrop-filter: blur(8px); transition: border-color .2s, box-shadow .2s; }
.sg-search:focus-within { border-color: rgba(76,141,255,.7); box-shadow: 0 0 0 3px rgba(76,141,255,.18); }
.sg-search svg { width: 16px; height: 16px; color: #7d8a9a; flex: none; }
.sg-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #eef2f7; font: inherit; font-size: 14px; }
.sg-search input::placeholder { color: #6f7c8c; }
.sg-results { list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(12,15,22,.96); box-shadow: 0 18px 40px rgba(0,0,0,.45); max-height: 340px; overflow: auto; }
.sg-results button { display: flex; align-items: center; gap: 4px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: #e6ebf1; text-align: left; cursor: pointer; font: inherit; font-size: 13.5px; }
.sg-results button:hover, .sg-results button:focus-visible, .sg-results .is-first { background: rgba(255,255,255,.06); outline: 0; }
.sg-results b { flex: 1 1 auto; min-width: 40px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-results small { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-left: auto; padding-left: 10px; color: #7d8a9a; font: 400 11px var(--pp-mono); white-space: nowrap; }
.sg-results__none { padding: 10px; color: #7d8a9a; font-size: 13px; }
.sg-legend { position: absolute; left: 24px; bottom: 54px; display: grid; gap: 6px; z-index: 2; }
.sg-legend button { display: flex; align-items: center; min-width: 190px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; background: rgba(10,13,19,.72); backdrop-filter: blur(6px); color: #d5dce5; font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; }
.sg-legend button em { margin-left: auto; padding-left: 12px; font: 400 11.5px var(--pp-mono); font-style: normal; color: #7d8a9a; }
.sg-legend button:hover { border-color: rgba(255,255,255,.22); }
.sg-legend.has-active button[aria-pressed="false"] { opacity: .45; }
.sg-legend button[aria-pressed="true"] { border-color: rgba(255,255,255,.35); background: rgba(30,36,48,.9); }
.sg-ctrl { position: absolute; right: 24px; bottom: 54px; display: flex; gap: 6px; z-index: 2; }
.sg-ctrl button, .sg-ctrl__link { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: rgba(10,13,19,.8); color: #d5dce5; font: 500 15px/1 var(--pp-mono); cursor: pointer; text-decoration: none; }
.sg-ctrl__link { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #35e08a; border-color: rgba(53,224,138,.45); }
.sg-ctrl button:hover, .sg-ctrl__link:hover { border-color: rgba(255,255,255,.35); color: #fff; }
.sg-card { position: absolute; left: 0; top: 0; z-index: 4; min-width: 200px; max-width: 280px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(12,15,22,.95); box-shadow: 0 18px 50px rgba(0,0,0,.55); backdrop-filter: blur(10px); pointer-events: none; font-size: 13px; }
.sg-card__head { display: flex; align-items: center; gap: 10px; }
.sg-card__head img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); flex: none; }
.sg-card__head b { display: block; color: #fff; font-size: 14px; word-break: break-word; }
.sg-card__head small { display: block; color: #8b98a8; font: 400 11px var(--pp-mono); word-break: break-all; }
.sg-card dl { display: flex; gap: 18px; margin: 10px 0 0; }
.sg-card dt { font: 500 10px var(--pp-mono); letter-spacing: .1em; text-transform: uppercase; color: #6f7c8c; }
.sg-card dd { margin: 3px 0 0; font: 600 13px var(--pp-mono); color: #e6ebf1; display: flex; align-items: center; }
.sg-card__hint { margin: 8px 0 0; color: #35e08a; font: 400 11px var(--pp-mono); }
.sg-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #7d8a9a; font: 400 13px var(--pp-mono); letter-spacing: .08em; pointer-events: none; }
.sg-loading[hidden] { display: none; }
.sg-noscript { position: absolute; left: 24px; bottom: 120px; color: #a7b2c0; }
.sg-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.08); background: rgba(7,9,13,.92); overflow: hidden; z-index: 2; font: 400 12px var(--pp-mono); }
.sg-ticker__tag { flex: none; padding: 0 14px; color: #35e08a; letter-spacing: .14em; border-right: 1px solid rgba(255,255,255,.08); height: 100%; display: grid; place-items: center; background: #07090d; position: relative; z-index: 1; }
.sg-ticker__track { flex: 1; overflow: hidden; }
.sg-ticker__run { display: inline-flex; gap: 28px; padding-left: 24px; white-space: nowrap; animation: sgRun 60s linear infinite; }
.sg-ticker__run b { color: #e6ebf1; font-weight: 500; }
.sg-ticker__run em { font-style: normal; color: #c7d0db; }
.sg-ticker__run em.up { color: #35e08a; }
.sg-ticker__run em.down { color: #ff6b4a; }
.sg-ticker__run small { color: #6f7c8c; }
.sg-ticker:hover .sg-ticker__run { animation-play-state: paused; }
@keyframes sgRun { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .sg-ticker__run { animation: none; } .sg-kicker b { animation: none; } }

@media (max-width: 760px) {
  .sg-stage { height: calc(100svh - var(--bar-h, 52px) - 72px); min-height: 540px; }
  .sg-hud { left: 14px; right: 14px; top: 14px; max-width: none; }
  .sg-h1 { font-size: 24px; }
  .sg-lead { display: none; }
  .sg-stats { grid-template-columns: repeat(4, 1fr); width: 100%; margin-top: 10px; }
  .sg-stats div { padding: 7px 8px; }
  .sg-stats b { font-size: 15px; }
  .sg-upd { display: none; }
  .sg-find { left: 14px; right: 14px; top: auto; bottom: 92px; width: auto; }
  .sg-results { position: absolute; bottom: 46px; left: 0; right: 0; margin: 0; }
  .sg-legend { left: 0; right: 0; bottom: 44px; display: flex; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
  .sg-legend::-webkit-scrollbar { display: none; }
  .sg-legend button { min-width: 0; flex: none; }
  .sg-legend button em { padding-left: 8px; }
  .sg-ctrl { right: 14px; bottom: auto; top: 150px; flex-direction: column; }
  .sg-ctrl__link { display: none; }
}

/* ---------- below graph / shared ---------- */
.sg-below { padding-top: 28px; }
.sg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.sg-tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.sg-tabs a:hover { border-color: var(--ink-3); color: var(--ink); }
.sg-tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sg-catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 22px; margin: 14px 0 30px; }
.sg-catlist h3 { display: flex; align-items: center; margin: 0 0 6px; font-size: 14px; }
.sg-catlist ol { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.75; }
.sg-authorcloud { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.sg-authorcloud li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sg-authorcloud a { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.sg-authorcloud a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-av { border-radius: 50%; flex: none; background: var(--sunk, #222); object-fit: cover; }

/* hero for trending/authors (dark band matching the graph) */
.sg-hero { width: 100vw; margin-left: calc(50% - 50vw); color: #e6ebf1; border-bottom: 1px solid rgba(255,255,255,.06);
  background: radial-gradient(900px 400px at 75% 30%, rgba(76,91,255,.16), transparent 60%), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 40px 40px, #07090d; }
.sg-hero__in { max-width: var(--page, 1200px); margin: 0 auto; padding: 38px 20px 34px; }
.sg-switch { margin: 0 0 10px; }
.sg-table td { vertical-align: middle; }
.sg-repo { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.sg-repo > div { min-width: 0; }
.sg-repo__name { font-weight: 600; }
.sg-repo small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.5; }
.sg-repo small a { color: var(--ink-2); }
.sg-up { color: #0e9f6e; font-weight: 600; }
.sg-down { color: #e0325f; font-weight: 600; }
.sg-spark { color: #4c8dff; display: block; }
.sg-parts { white-space: nowrap; }
.sg-bar { display: inline-block; width: 26px; height: 6px; margin-right: 4px; border-radius: 3px; background: var(--sunk, rgba(127,127,127,.18)); overflow: hidden; vertical-align: middle; }
.sg-bar i { display: block; height: 100%; width: var(--v); background: linear-gradient(90deg, #4c5bff, #2fd3e0); }
.sg-formula { margin: 8px 0 16px; }
.sg-formula summary { cursor: pointer; padding: 12px 16px; }
.sg-formula .pp-panel__body { padding: 0 16px 12px; }
.sg-formula ul { margin: 6px 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
@media (max-width: 760px) { .sg-hide-m { display: none; } .sg-repo { min-width: 0; } }

/* authors */
.sg-podium { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.sg-podium__p { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 18px; min-width: 150px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(12,15,22,.7); color: #e6ebf1; text-decoration: none; transition: transform .2s, border-color .2s; }
.sg-podium__p:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.sg-podium__p img { border-radius: 50%; box-shadow: 0 0 0 2px #07090d, 0 0 0 4px var(--ring, #4c5bff), 0 0 24px var(--ring, #4c5bff); }
.sg-podium__p.p1 { --ring: #ffb547; }
.sg-podium__p.p2 { --ring: #c7d0db; }
.sg-podium__p.p3 { --ring: #ff8a4a; }
.sg-podium__p b { font-size: 15px; }
.sg-podium__p span { font-size: 11.5px; color: #8b98a8; }
.sg-authors { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-author { display: grid; grid-template-columns: 34px 44px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised, transparent); scroll-margin-top: 80px; }
.sg-author.is-target { border-color: var(--sig, #4c5bff); box-shadow: 0 0 0 3px var(--sig-soft, rgba(76,91,255,.2)); }
.sg-author__rank { color: var(--ink-3); font-size: 13px; }
.sg-author.is-top .sg-author__rank { color: var(--sig, #4c5bff); font-weight: 600; }
.sg-author__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-author__name { font-weight: 650; font-size: 15px; }
.sg-author__main > .pp-small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-author details summary { cursor: pointer; color: var(--ink-2); margin-top: 2px; }
.sg-chiplist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sg-chiplist a { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.sg-author__nums { display: flex; gap: 22px; margin: 0; }
.sg-author__nums div { text-align: right; }
.sg-author__nums dt { font: 500 10px var(--pp-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.sg-author__nums dd { margin: 3px 0 0; font: 600 16px var(--pp-mono); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .sg-author { grid-template-columns: 26px 36px 1fr; } .sg-author .sg-av { width: 36px; height: 36px; } .sg-author__nums { grid-column: 2 / -1; justify-content: flex-start; } .sg-author__nums div { text-align: left; } }

/* home banner */
.sg-banner { position: relative; display: flex; align-items: center; gap: 18px; margin: 22px 0 0; padding: 18px 22px; min-height: 92px; border-radius: 14px; overflow: hidden; color: #e6ebf1; text-decoration: none; border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(500px 200px at 80% 50%, rgba(76,91,255,.28), transparent 70%), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 24px 24px, #07090d; transition: border-color .2s, transform .2s; }
.sg-banner:hover { border-color: rgba(76,141,255,.6); transform: translateY(-1px); }
.sg-banner__art { position: absolute; right: 150px; top: 0; bottom: 0; width: 280px; }
.sg-banner__art i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); opacity: .85; animation: sgFloat 6s ease-in-out infinite; animation-delay: calc(var(--s) * -.4s); }
@keyframes sgFloat { 50% { transform: translate(3px, -4px); } }
.sg-banner__txt { position: relative; display: flex; flex-direction: column; gap: 4px; z-index: 1; }
.sg-banner__txt b { font-size: 19px; letter-spacing: -.01em; color: #fff; }
.sg-banner__txt span { font: 400 12px var(--pp-mono); color: #8b98a8; letter-spacing: .02em; }
.sg-banner__cta { position: relative; margin-left: auto; z-index: 1; padding: 9px 14px; border-radius: 8px; border: 1px solid rgba(53,224,138,.5); color: #35e08a; font: 500 12px var(--pp-mono); letter-spacing: .06em; white-space: nowrap; background: rgba(7,9,13,.6); }
.sg-banner__more { display: flex; gap: 16px; margin: 8px 2px 0; font-size: 13px; }
@media (max-width: 760px) { .sg-banner__art { right: -40px; opacity: .6; } .sg-banner { flex-wrap: wrap; } .sg-banner__cta { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .sg-banner__art i { animation: none; } }
html:has(.sg-stage), html:has(.sg-hero) { overflow-x: clip; }

@media (min-width: 761px) and (max-height: 860px) {
  .sg-legend { grid-template-columns: repeat(2, auto); }
  .sg-legend button { min-width: 150px; padding: 5px 9px; }
  .sg-lead { display: none; }
}
