.spark-corners { position: absolute; inset: -6px; color: var(--cyan); pointer-events: none; }
.spark-corners .corner { width: 8px; height: 8px; }
.spark-card { position: relative; display: grid; gap: 7px; padding: 12px 14px 11px; border: 1px dashed rgba(77, 141, 255, 0.5); border-radius: 12px; background: linear-gradient(150deg, rgba(15, 98, 221, 0.2), rgba(15, 98, 221, 0) 62%), #080d18; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.85), 0 0 30px -14px rgba(47, 125, 255, 0.6); text-align: start; }
.spark-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); }
.spark-slash { color: var(--accent); margin-inline-end: -2px; }
.spark-card .spark-off { margin-inline-end: 24px; }
.spark-off { margin-inline-start: auto; padding: 2px 7px; border-radius: 6px; background: rgba(77, 141, 255, 0.16); color: #dbe7ff; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.spark-copy { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.spark-code { font-family: var(--font-mono); font-size: 19px; font-weight: 700; letter-spacing: 0.1em; color: #ffffff; white-space: nowrap; }
.spark-card.is-long .spark-code { font-size: 16px; letter-spacing: 0.05em; }
.spark-act { flex-shrink: 0; margin-inline-start: auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color 0.18s ease; }
.spark-copy:hover .spark-act, .spark-copy:focus-visible .spark-act { color: #ffffff; }
.spark-card.is-copied .spark-act { color: var(--ok); }
.spark-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.spark-x { position: absolute; top: 7px; inset-inline-end: 7px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; transition: color 0.18s ease, background 0.18s ease; }
.spark-x svg { display: block; width: 10px; height: 10px; }
.spark-x:hover, .spark-x:focus-visible { color: #ffffff; background: rgba(77, 141, 255, 0.2); }

.spark-clip { position: fixed; left: -100vw; top: 0; opacity: 0; }
.spark-tag { position: relative; max-width: calc(100vw - 20px); border: 1px dashed rgba(77, 141, 255, 0.55); border-radius: 9px; background: linear-gradient(150deg, rgba(15, 98, 221, 0.24), rgba(15, 98, 221, 0) 65%), #080d18; box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.9), 0 0 22px -10px rgba(47, 125, 255, 0.7); color: var(--text); }
.spark-tag-main { display: grid; gap: 3px; min-width: 164px; padding-block: 7px 6px; padding-inline: 10px 30px; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.spark-tag .spark-x { top: 4px; inset-inline-end: 4px; width: 18px; height: 18px; }
.spark-tag-row { display: flex; align-items: center; gap: 8px; }
.spark-tag .spark-code { font-size: 14px; letter-spacing: 0.08em; }
.spark-tag.is-long .spark-code { font-size: 12px; letter-spacing: 0.05em; }
.spark-tag .spark-off { font-size: 10px; padding: 1px 6px; }
.spark-hint { display: grid; width: 0; min-width: 100%; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.35; color: var(--muted); transition: color 0.18s ease; }
.spark-hint > span { grid-area: 1 / 1; opacity: 0; transition: opacity 0.3s ease; }
.spark-hint > span.is-on { opacity: 1; }
.spark-tag-main:hover .spark-hint, .spark-tag-main:focus-visible .spark-hint { color: #dbe7ff; }
.spark-tag.is-copied .spark-hint { color: var(--ok); }
.hero-title[data-spark] { position: relative; width: fit-content; max-width: 100%; cursor: pointer; -webkit-user-select: none; user-select: none; }
.hero-title[data-spark] .spark-corners { inset: -10px -14px; opacity: 0; transform: scale(1.12); transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.hero-title[data-spark] .spark-corners .corner { width: 12px; height: 12px; }
.hero-title.is-spark .spark-line { cursor: pointer; outline-offset: 12px; }
.hero-title .spark-x { top: -38px; inset-inline-end: -18px; width: 26px; height: 26px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease, color 0.18s ease, background 0.18s ease; }
.hero-title .spark-x svg { width: 12px; height: 12px; }
.hero-title.is-spark:not(.is-spark-run) .spark-x { opacity: 1; pointer-events: auto; }
.hero-title.is-spark:not(.is-spark-run) .spark-corners { opacity: 1; transform: none; }
.spark-line { display: inline-block; font-size: calc(1em * var(--spark-fit, 1)); white-space: nowrap; }
.spark-line:dir(rtl) { direction: ltr; unicode-bidi: isolate; }
.hero-title:not(.is-spark) .spark-line { font-size: 1em; white-space: normal; }
.spark-word { display: inline-block; white-space: nowrap; }
.spark-ch { display: inline-block; width: var(--w); overflow: visible; text-align: center; white-space: pre; transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.4s ease, text-shadow 0.4s ease; }
.spark-ch.is-code { text-transform: none; }
.is-spark-run .spark-ch:not(.is-set) { color: var(--cyan); text-shadow: 0 0 18px rgba(77, 141, 255, 0.75); }
.is-spark-run .spark-ch.is-set, .spark-ch.is-hint { animation: sparkSet 0.5s ease-out; }
.hero-title.is-spark .spark-ch { text-shadow: 0 0 26px rgba(77, 141, 255, 0.55); }
.hero-title.is-copied .spark-ch { color: #dbe7ff; }
@keyframes sparkSet { 0% { color: #ffffff; text-shadow: 0 0 22px #ffffff, 0 0 44px rgba(77, 141, 255, 0.95); } 100% { text-shadow: 0 0 26px rgba(77, 141, 255, 0.55); } }
.spark-probe { position: absolute; visibility: hidden; white-space: pre; }
.spark-probe.is-code { text-transform: none; }
.spark-swap { animation: sparkSwap 0.5s ease-out; }
@keyframes sparkSwap { 0% { opacity: 0; translate: 0 6px; } 100% { opacity: 1; translate: 0 0; } }
.spark-more { display: grid; grid-template-rows: 0fr; margin-top: -14px; opacity: 0; transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease; }
.spark-more.is-open { grid-template-rows: 1fr; opacity: 1; }
.spark-more > div { min-height: 0; overflow: hidden; }
.spark-more p { margin: 0; padding-bottom: 16px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; line-height: 1.5; color: var(--muted); }
.pg-aside > .pg-stats { transition: opacity 0.3s ease; }
@media (min-width: 981px) { .pg-aside.is-spark > .pg-stats { opacity: 0; pointer-events: none; } }
.spark-emblem { position: absolute; left: var(--ex, 0px); top: var(--ey, 0px); z-index: 60; width: var(--ew, 300px); opacity: 0; translate: 0 -8px; pointer-events: none; transition: opacity 0.4s ease, translate 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.spark-emblem.is-open { opacity: 1; translate: 0 0; pointer-events: auto; }
@media (min-width: 981px) { .pg-aside.is-spark .sn-emblem { position: relative; } }
.spark-emblem-frame { position: absolute; inset: -4px -10px 0; color: var(--cyan); opacity: 0; transform: scale(1.07); pointer-events: none; transition: opacity 0.2s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease; }
.spark-emblem-frame .spark-corners { inset: 0; color: inherit; }
.spark-emblem-frame .spark-corners .corner { width: 12px; height: 12px; }
.spark-emblem-tip { position: absolute; inset-inline-end: 16px; top: 0; translate: 0 -50%; font-family: var(--font-mono); font-style: normal; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.pg-top.sn-hit .spark-emblem-frame, .spark-emblem-frame.is-copied { opacity: 1; transform: none; }
.spark-emblem-frame.is-copied { color: var(--ok); }
main:has(.pg-top.sn-hit) > .spark-emblem .spark-act { color: #ffffff; }
@media (prefers-reduced-motion: reduce) {
  .spark-emblem, .spark-emblem-frame, .spark-hint > span { transition: none; }
  .spark-ch, .hero-title[data-spark] .spark-corners, .spark-more { transition: none; }
  .is-spark-run .spark-ch.is-set, .spark-ch.is-hint, .spark-swap { animation: none; }
}
