/* Help & support (Dec 1 2026, site/support.js): the chart's dialog and the form + requests on /help.
   The chart page's colours (charts.css / app.css) where they exist, the site's violet otherwise. */
.sp-veil { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 16px; background: rgba(4, 4, 8, .62);
           animation: sp-in .18s cubic-bezier(.2, 0, 0, 1); }
.sp-box { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 22px 18px; border-radius: 16px;
          background: var(--panel, #0F0F16); color: var(--text, #ECECF1); border: 1px solid var(--line2, rgba(255, 255, 255, .12));
          box-shadow: 0 24px 64px rgba(0, 0, 0, .5); font: 14px/1.5 Manrope, Geist, system-ui, sans-serif; animation: sp-up .22s cubic-bezier(.2, 0, 0, 1); }
.sp-box h2 { margin: 0 0 6px; font: 700 19px Outfit, Geist, system-ui, sans-serif; }
.sp-lead { margin: 0 0 16px; color: var(--dim, #9C9CA8); font-size: 13.5px; }
.sp-lead a { color: var(--v2, #9B83FF); }
.sp-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--dim, #9C9CA8);
        font-size: 22px; line-height: 1; cursor: pointer; }
.sp-x:hover { background: var(--hover, rgba(255, 255, 255, .06)); color: var(--text, #ECECF1); }
@keyframes sp-in { from { opacity: 0; } }
@keyframes sp-up { from { opacity: 0; transform: translateY(10px); } }

.sp-form { display: grid; gap: 10px; }
.sp-l { font-size: 12.5px; font-weight: 600; color: var(--dim, #9C9CA8); }
.sp-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chip { position: relative; cursor: pointer; }
.sp-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sp-chip span { display: inline-block; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line2, rgba(255, 255, 255, .14)); font-size: 13px; color: var(--dim, #9C9CA8);
                transition: background .12s, color .12s, border-color .12s; }
.sp-chip input:checked + span { background: rgba(122, 92, 255, .18); border-color: #7A5CFF; color: var(--text, #ECECF1); }
.sp-chip input:focus-visible + span { outline: 2px solid #9B83FF; outline-offset: 2px; }
.sp-form textarea, .sp-form input[type=email], .sp-reply textarea {
  width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line2, rgba(255, 255, 255, .14));
  background: var(--bg2, rgba(255, 255, 255, .03)); color: var(--text, #ECECF1); font: 14px/1.5 Manrope, Geist, system-ui, sans-serif; resize: vertical; }
.sp-form textarea:focus, .sp-form input[type=email]:focus, .sp-reply textarea:focus { outline: none; border-color: #7A5CFF; box-shadow: 0 0 0 3px rgba(122, 92, 255, .18); }
.sp-email { display: grid; gap: 6px; }
.sp-email[hidden] { display: none; }
.sp-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.sp-check input { width: 16px; height: 16px; accent-color: #7A5CFF; }
.sp-note { margin: 0; font-size: 12.5px; color: var(--faint, #7A7A88); }
.sp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-send, .sp-reply button { padding: 11px 20px; border: 0; border-radius: 11px; background: #7A5CFF; color: #fff; font: 700 14.5px Manrope, Geist, system-ui, sans-serif; cursor: pointer;
                             transition: background .12s, transform .12s; }
.sp-send:hover, .sp-reply button:hover { background: #8A6EFF; }
.sp-send:active, .sp-reply button:active { transform: translateY(1px); }
.sp-send:disabled, .sp-reply button:disabled { opacity: .6; cursor: default; }
.sp-msg { font-size: 13px; color: var(--dim, #9C9CA8); }
.sp-msg.ok { color: #22D3A0; }
.sp-msg.bad { color: #FF6B7A; }

/* "Your requests" (/help) */
.sp-list h2 { margin: 0 0 12px; font: 700 20px Outfit, system-ui, sans-serif; }
.sp-t { margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line, rgba(255, 255, 255, .1)); background: rgba(255, 255, 255, .025); }
.sp-t header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.sp-st { padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgba(255, 193, 7, .14); color: #FFC107; }
.sp-t.answered .sp-st { background: rgba(34, 211, 160, .14); color: #22D3A0; }
.sp-t.closed .sp-st { background: rgba(255, 255, 255, .06); color: var(--dim, #9C9CA8); }
.sp-t header em { margin-left: auto; font-style: normal; color: var(--dim, #9C9CA8); }
.sp-m { margin: 8px 0; }
.sp-m small { display: block; font-size: 11.5px; color: var(--dim, #9C9CA8); }
.sp-m p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-m.us p { padding: 9px 12px; border-radius: 10px; background: rgba(122, 92, 255, .12); }
.sp-reply { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.sp-reply textarea { flex: 1; min-height: 44px; }

/* light chart theme */
:root[data-theme="light"] .sp-box { background: #fff; color: #1D2A2D; border-color: rgba(0, 0, 0, .1); box-shadow: 0 24px 64px rgba(0, 0, 0, .18); }
:root[data-theme="light"] .sp-chip input:checked + span { background: rgba(122, 92, 255, .1); color: #1D2A2D; }

@media (max-width: 600px) {
  .sp-veil { place-items: end stretch; padding: 0; }
  .sp-box { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation-name: sp-sheet; }
  .sp-send { width: 100%; }
  .sp-reply { flex-direction: column; align-items: stretch; }
}
@keyframes sp-sheet { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sp-veil, .sp-box { animation: none; } .sp-send, .sp-chip span { transition: none; } }
