/* Shared: tokens, dialog, drawer. White ground, one red. */
:root { color-scheme: light; --bg: #fff; --ink: #0a0a0b; --soft: #3b3d42; --muted: #6f727a; --faint: #a6a9b0; --line: rgba(10, 10, 11, .08); --line-2: rgba(10, 10, 11, .14); --surface: #f6f6f7; --red: #f0142a; --red-deep: #c50d21; --red-soft: rgba(240, 20, 42, .08); --gut-l: max(20px, env(safe-area-inset-left, 0px)); --gut-r: max(20px, env(safe-area-inset-right, 0px)); --ease: cubic-bezier(.2, .7, .2, 1); --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }
* { box-sizing: border-box; } html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; } button { font: inherit; color: inherit; cursor: pointer; } a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; } h1, h2 { text-wrap: balance; }
.pk-lock { overflow: hidden; }
.pk-layer { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 11, 0); transition: background .22s; display: flex; }
.pk-layer.is-in { background: rgba(10, 10, 11, .32); }
.pk-center { align-items: center; justify-content: center; padding: 16px; }
.pk-dialog { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 40px 80px -20px rgba(10, 10, 11, .35), 0 0 0 1px rgba(10, 10, 11, .06); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .22s, transform .22s var(--ease); }
.is-in .pk-dialog { opacity: 1; transform: none; }
.pk-dialog h2 { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.pk-sub { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.45; } .pk-sub b { color: var(--ink); font-weight: 500; font-family: var(--mono); font-size: .92em; }
.pk-x { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); } .pk-x:hover { background: var(--surface); color: var(--ink); }
.pk-tabs { display: inline-flex; margin-top: 24px; padding: 3px; background: var(--surface); border-radius: 10px; gap: 2px; max-width: 100%; }
.pk-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pk-tabs [aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(10, 10, 11, .12), 0 0 0 1px rgba(10, 10, 11, .04); }
.pk-cmd { margin-top: 12px; background: var(--ink); border-radius: 14px; padding: 16px 16px 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.pk-cmd code { flex: 1; min-width: 0; font: 400 13.5px/1.6 var(--mono); color: #f3f3f4; overflow-wrap: anywhere; } .pk-cmd:not(.is-prompt) code::before { content: "$ "; color: var(--red); }
.pk-copy { flex: none; border: 0; background: var(--red); color: #fff; font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 9px; min-width: 76px; transition: background .15s, transform .1s; } .pk-copy:hover { background: var(--red-deep); } .pk-copy:active { transform: scale(.97); } .pk-copy.is-done { background: #fff; color: var(--ink); }
.pk-steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.pk-steps li { counter-increment: s; font-size: 13.5px; line-height: 1.4; } .pk-steps li::before { content: counter(s); display: block; font: 500 12px var(--mono); color: var(--red); margin-bottom: 8px; }
.pk-steps b { display: block; font-weight: 600; } .pk-steps span { color: var(--muted); display: block; margin-top: 3px; }
.pk-side { justify-content: flex-end; }
.pk-drawer { width: min(600px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -30px 0 80px -20px rgba(10, 10, 11, .25); transform: translateX(32px); opacity: 0; transition: transform .26s var(--ease), opacity .22s; }
.is-in .pk-drawer { transform: none; opacity: 1; }
.pk-drawer header { flex: none; position: relative; display: flex; align-items: center; min-height: 64px; padding: 0 64px 0 28px; border-bottom: 1px solid var(--line); } .pk-drawer .pk-x { top: 14px; }
.pk-path { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 28px 28px 40px; }
.pk-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.18; overflow-wrap: break-word; }
.pk-by { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.pk-list { margin-top: 24px; display: grid; gap: 14px; }
.pk-problem { border-radius: 16px; padding: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(10, 10, 11, .04); min-width: 0; scroll-margin-top: 16px; } .pk-problem.is-target { box-shadow: 0 0 0 1.5px var(--red); }
.pk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pk-id { font: 400 12.5px var(--mono); color: var(--muted); } .pk-attr { font-size: 14px; font-weight: 500; }
.pk-chip { margin-left: auto; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-deep); white-space: nowrap; } .pk-chip.is-done { background: var(--ink); color: #fff; }
.pk-statement { margin-top: 14px; font-size: 15.5px; line-height: 1.62; color: var(--soft); overflow-wrap: break-word; max-height: 46vh; overflow: auto; overscroll-behavior: contain; } .pk-statement p { margin: 0 0 10px; } .pk-statement .katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.pk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pk-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--red); color: #fff; font-size: 14px; font-weight: 500; transition: background .15s, transform .1s; } .pk-btn:hover { background: var(--red-deep); } .pk-btn:active { transform: scale(.98); }
.pk-btn.pk-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); } .pk-btn.pk-ghost:hover { background: var(--surface); }
.pk-skel { height: 132px; border-radius: 16px; background: linear-gradient(100deg, var(--surface) 30%, #fff 50%, var(--surface) 70%); background-size: 200% 100%; animation: pk-sk 1.2s linear infinite; } .pk-skel-s { height: 72px; }
@keyframes pk-sk { to { background-position: -200% 0; } }
.pk-empty { color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .pk-dialog { padding: 24px 20px; border-radius: 18px; } .pk-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; } .pk-cmd { flex-direction: column; } .pk-copy { align-self: flex-end; } .pk-body { padding: 22px 20px 32px; } .pk-drawer header { padding-left: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.pk-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; } .pk-opts div { border-radius: 14px; background: var(--surface); padding: 16px; } .pk-opts b { display: block; font-weight: 600; font-size: 15.5px; } .pk-opts span { display: block; margin-top: 5px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.pk-wide { width: 100%; justify-content: center; height: 46px; margin-top: 16px; font-size: 15px; }
@media (max-width: 560px) { .pk-opts { grid-template-columns: minmax(0, 1fr); } }

.no-support [data-support] { display: none !important; }
.pk-origin { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); } .pk-origin a { text-decoration: underline; text-underline-offset: 3px; }

/* live attack */
.live-mark { display: inline-flex; align-items: center; gap: 7px; }
.live-mark i { display: none; } .live-mark.is-on { color: var(--red, #f0142a) !important; font-weight: 600; } .live-mark.is-on i { display: block; }
.live-mark i, .lv-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live-mark.is-on i, .lv.is-on .lv-pill i { animation: lv-beat 1.6s ease-in-out infinite; }
@keyframes lv-beat { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-mark.is-on i, .lv.is-on .lv-pill i { animation: none; } }
