/* Help center search + legal pages (terms / privacy): table of contents with scroll-spy and a reading-progress bar. */

/* ---------- help search ---------- */
.hsearch { position: relative; max-width: 640px; margin: 22px auto 6px; padding: 0 20px; }
.hsearch > i { z-index: 2; position: absolute; left: 38px; top: 50%; translate: 0 -50%; color: #8b8497; pointer-events: none; transition: color .2s, transform .3s; }
.hsearch input { width: 100%; height: 56px; padding: 0 70px 0 52px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .12); background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)); color: #fff; font: inherit; font-size: 1rem; outline: none; backdrop-filter: blur(12px); box-shadow: 0 30px 60px -40px #a855f7; transition: border-color .25s, box-shadow .25s; }
.hsearch input::placeholder { color: #7f7894; }
.hsearch input:focus { border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168, 85, 247, .25), 0 30px 60px -40px #a855f7; } .hsearch input:focus ~ i, .hsearch:focus-within > i { color: #c084fc; transform: translateY(0) scale(1.15); }
.hsearch kbd { z-index: 2; position: absolute; right: 38px; top: 50%; translate: 0 -50%; font: 600 .68rem var(--id-mono, monospace); color: #8b8497; border: 1px solid rgba(255, 255, 255, .15); border-radius: 7px; padding: 3px 8px; pointer-events: none; } .hsearch:focus-within kbd { opacity: 0; }
.hnone { text-align: center; max-width: 520px; margin: 26px auto 0; padding: 28px 22px; border-radius: 22px; border: 1px dashed rgba(255, 255, 255, .16); color: #a29bb4; } .hnone[hidden] { display: none; } .hnone::before { content: "∅"; display: block; font: 800 2.6rem var(--id-disp, inherit); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.h-hide { display: none !important; }
mark.hm { background: rgba(168, 85, 247, .35); color: #fff; border-radius: 4px; padding: 0 2px; }

/* ---------- legal pages ---------- */
.lg-prog { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 120; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--id-tape, linear-gradient(90deg, #f43f5e, #8b5cf6)); background-size: 28px 28px; box-shadow: 0 0 14px rgba(244, 63, 94, .6); pointer-events: none; }
.lg-toc { display: none; }
@media (min-width: 1180px) {
  .lg-toc { display: block; position: fixed; top: 128px; left: max(18px, calc(50% - 380px - 270px)); width: 230px; max-height: calc(100vh - 170px); overflow: auto; scrollbar-width: none; padding: 18px 8px 18px 4px; }
  .lg-toc h5 { font: 700 .62rem var(--id-mono, monospace); letter-spacing: .2em; text-transform: uppercase; color: #77708a; margin: 0 0 12px 14px; }
  .lg-toc a { position: relative; display: block; padding: 8px 12px 8px 16px; border-radius: 10px; color: #9a92ad; font-size: .84rem; line-height: 1.35; text-decoration: none; transition: color .25s, background .25s, transform .3s cubic-bezier(.3, 1.4, .5, 1); }
  .lg-toc a::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; border-radius: 3px; translate: 0 -50%; background: linear-gradient(#c084fc, #f43f5e); transition: height .3s cubic-bezier(.3, 1.4, .5, 1); }
  .lg-toc a:hover { color: #fff; background: rgba(255, 255, 255, .04); transform: translateX(3px); } .lg-toc a.on { color: #fff; background: rgba(168, 85, 247, .12); } .lg-toc a.on::before { height: 60%; }
}
.legal h2 { scroll-margin-top: 110px; }
.legal h1 { font-family: var(--id-disp, inherit); font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -.055em; line-height: 1; }
.legal .upd { display: inline-block; font-family: var(--id-mono, monospace); font-size: .72rem; letter-spacing: .08em; padding: 5px 12px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #a29bb4; }
@media (prefers-reduced-motion: reduce) { .lg-prog { transition: none; } }
