/* Purple Help Center — Wallet-style. Self-contained, no Webflow deps. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:#f6f5f0;color:#15130f;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased;
}
a{color:inherit}
img{max-width:100%;display:block}

/* ── header ── */
.hd{position:static;background:#f6f5f0;border-bottom:1px solid rgba(0,0,0,.06)}
.hd-in{max-width:1080px;margin:0 auto;padding:.85rem 1.25rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.hd-logo{display:inline-flex;align-items:center}
.hd-logo img{width:140px;height:auto}
@media(max-width:560px){.hd-logo img{width:118px}}
.hd-back{font-size:.92rem;font-weight:600;color:#15130f;text-decoration:none;padding:.45rem .9rem;border-radius:100px;border:1px solid rgba(0,0,0,.12);transition:background .2s}
.hd-back:hover{background:rgba(0,0,0,.05)}

/* ── layout ── */
.hc{max-width:1080px;margin:0 auto;padding:2.5rem 1.25rem 4rem}

/* ── index hero ── */
.hero{margin:1.5rem 0 2.75rem}
.hero h1{font-size:clamp(1.9rem,4.5vw,2.6rem);font-weight:700;letter-spacing:-.02em;margin:0 0 .8rem;line-height:1.1}
.hero p{font-size:1.05rem;color:#6b6b6b;max-width:680px;margin:0;line-height:1.6}

/* ── index knowledge base grid ── */
.kb{display:grid;grid-template-columns:248px 1fr;gap:2.5rem;align-items:start}
.side{position:sticky;top:1.5rem;display:flex;flex-direction:column;gap:1rem}
.search{position:relative}
.search input{width:100%;border:1px solid rgba(0,0,0,.14);background:#fff;border-radius:100px;padding:.7rem 1rem .7rem 2.6rem;font-size:.95rem;font-family:inherit;color:#15130f;outline:none;transition:border-color .2s,box-shadow .2s}
.search input:focus{border-color:#15130f;box-shadow:0 0 0 3px rgba(21,19,15,.08)}
.search::before{content:"";position:absolute;left:1rem;top:50%;width:15px;height:15px;transform:translateY(-50%);background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E")}
.cats{display:flex;flex-direction:column;gap:.15rem}
.cat{display:block;text-align:left;border:0;background:none;font-family:inherit;font-size:.98rem;font-weight:600;color:#3a3833;padding:.7rem 1rem;border-radius:100px;cursor:pointer;text-decoration:none;transition:background .15s,color .15s}
.cat:hover{background:rgba(0,0,0,.05)}
.cat.is-active{background:#15130f;color:#fff}

/* ── index article groups ── */
.cont{min-width:0}
.grp{margin:0 0 2.5rem;scroll-margin-top:5.5rem}
.grp h2{font-size:1.25rem;font-weight:700;margin:0 0 .4rem}
.links{display:flex;flex-direction:column}
.lnk{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem .25rem;color:#2f6fed;text-decoration:none;border-bottom:1px solid rgba(0,0,0,.07);font-size:1.02rem;transition:color .15s}
.lnk:hover{color:#1d4fd0}
.lnk:last-child{border-bottom:0}
.lnk .chev{flex-shrink:0;color:#9db8f0;transition:transform .15s,color .15s}
.lnk:hover .chev{color:#1d4fd0;transform:translateX(3px)}
.noresult{color:#6b6b6b;font-size:1rem;padding:1rem 0}

/* ── article page ── */
.art{max-width:720px;margin:0 auto}
.bc{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;font-size:.9rem;color:#8a8880;margin:0 0 1.25rem}
.bc a{color:#8a8880;text-decoration:none}
.bc a:hover{color:#15130f}
.bc span{color:#c3c1b8}
.art h1{font-size:clamp(1.65rem,3.6vw,2.2rem);font-weight:700;letter-spacing:-.015em;line-height:1.15;margin:0 0 .75rem}
.art .lead{font-size:1.12rem;color:#4a473f;margin:0 0 2rem;line-height:1.55}
.prose{font-size:1.04rem;color:#26241f}
.prose p{margin:0 0 1.1rem}
.prose h2{font-size:1.2rem;font-weight:700;margin:2rem 0 .8rem}
.prose a{color:#2f6fed;text-decoration:underline;text-underline-offset:2px}
.prose a:hover{color:#1d4fd0}
.prose strong{font-weight:700;color:#15130f}
.prose ol.steps{counter-reset:s;list-style:none;margin:0 0 1.3rem;padding:0}
.prose ol.steps li{position:relative;padding:.1rem 0 1rem 2.6rem;margin:0}
.prose ol.steps li::before{counter-increment:s;content:counter(s);position:absolute;left:0;top:0;width:1.7rem;height:1.7rem;background:#15130f;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:700}
.prose ul{margin:0 0 1.2rem;padding-left:1.2rem}
.prose ul li{margin:0 0 .5rem}
.callout{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:1.1rem 1.25rem;margin:0 0 1.3rem;font-size:.98rem;color:#4a473f}
.callout strong{color:#15130f}
.applink{display:inline-flex;align-items:center;gap:.5rem;background:#15130f;color:#fff;text-decoration:none;font-weight:600;font-size:.98rem;padding:.75rem 1.4rem;border-radius:100px;margin:.3rem 0 1.4rem;transition:transform .2s,opacity .2s}
.applink:hover{transform:translateY(-1px);opacity:.92}

/* ── ask box (article) ── */
.ask{margin:3rem 0 0;background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:1.25rem;padding:1.6rem 1.75rem}
.ask h2{font-size:1.15rem;font-weight:700;margin:0 0 .4rem}
.ask p{margin:0 0 1.1rem;color:#6b6b6b;font-size:.98rem}
.btn{display:inline-block;background:#15130f;color:#fff;text-decoration:none;font-weight:600;font-size:.95rem;padding:.7rem 1.4rem;border-radius:100px;transition:transform .2s,opacity .2s}
.btn:hover{transform:translateY(-1px);opacity:.92}

/* ── related ── */
.related{max-width:720px;margin:2.75rem auto 0}
.related h2{font-size:1.05rem;font-weight:700;margin:0 0 .6rem;color:#6b6b6b}
.related .links{border-top:1px solid rgba(0,0,0,.07)}

/* ── assistant (index) ── */
.asyst{max-width:820px;margin:4.5rem 0 0;scroll-margin-top:5.5rem}
.asyst h2{font-size:1.35rem;font-weight:700;margin:0 0 .35rem}
.asyst .sub{color:#6b6b6b;font-size:.98rem;margin:0 0 1.3rem;max-width:620px}
.chat{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:1.4rem;overflow:hidden}
.chat-body{display:flex;flex-direction:column;gap:.9rem;padding:1.25rem;max-height:440px;overflow-y:auto}
.chat-body:empty{display:none}
.msg{display:flex;gap:.6rem;max-width:90%}
.msg .av{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:#ece9e0}
.msg .bub{padding:.65rem .9rem;border-radius:1rem;font-size:.97rem;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.msg.ai .bub{background:#f2f0ea;color:#26241f;border-top-left-radius:.3rem}
.msg.user{align-self:flex-end;flex-direction:row-reverse}
.msg.user .av{display:none}
.msg.user .bub{background:#15130f;color:#fff;border-top-right-radius:.3rem}
.msg.error .bub{background:#fdecea;color:#a23a2c}
.typing{display:inline-flex;gap:4px;padding:.2rem 0}
.typing span{width:6px;height:6px;border-radius:50%;background:#bdbab1;animation:tp 1s infinite}
.typing span:nth-child(2){animation-delay:.15s}
.typing span:nth-child(3){animation-delay:.3s}
@keyframes tp{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.chat-input{display:flex;align-items:center;gap:.6rem;border-top:1px solid rgba(0,0,0,.08);padding:.8rem 1rem}
.chat-input textarea{flex:1;border:0;resize:none;outline:none;background:none;font-family:inherit;font-size:1rem;line-height:1.5;color:#15130f;max-height:140px}
.chat-input button{flex-shrink:0;width:38px;height:38px;border:0;border-radius:50%;background:#15130f;color:#fff;font-size:1.3rem;line-height:1;cursor:pointer;transition:opacity .2s}
.chat-input button:disabled{opacity:.35;cursor:default}

/* ── bottom CTA: open Mini App ── */
.cta-app{max-width:760px;margin:3.5rem auto 0;background:#15130f;color:#fff;border-radius:1.5rem;padding:2.25rem 2rem;text-align:center}
.cta-app h2{font-size:1.4rem;font-weight:700;margin:0 0 .5rem;color:#fff}
.cta-app p{margin:0 auto 1.4rem;color:rgba(255,255,255,.72);font-size:1rem;max-width:480px}
.cta-app a{display:inline-flex;align-items:center;gap:.55rem;background:#fff;color:#15130f;text-decoration:none;font-weight:700;font-size:1rem;padding:.85rem 1.8rem;border-radius:100px;transition:transform .2s,opacity .2s}
.cta-app a:hover{transform:translateY(-2px);opacity:.95}
/* на головній — вирівняти CTA по лівому краю під асистентом (на сторінках-статтях лишається відцентрованим) */
.asyst + .cta-app{max-width:820px;margin-left:0;margin-right:0}

/* ── footer ── */
.ft{border-top:1px solid rgba(0,0,0,.07);margin-top:4rem}
.ft-in{max-width:1080px;margin:0 auto;padding:2rem 1.25rem;display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between}
.ft-in p{margin:0;color:#8a8880;font-size:.9rem}
.ft-in nav{display:flex;flex-wrap:wrap;gap:1.25rem}
.ft-in nav a{color:#6b6b6b;text-decoration:none;font-size:.9rem}
.ft-in nav a:hover{color:#15130f}

/* ── responsive ── */
@media(max-width:820px){
  .kb{grid-template-columns:1fr;gap:1.5rem}
  .side{position:static}
  .cats{flex-direction:row;flex-wrap:wrap;gap:.4rem}
  .cat{font-size:.9rem;padding:.5rem .9rem}
}
@media(max-width:560px){
  .hc{padding:1.75rem 1rem 3rem}
}

/* AI assistant avatar — thin sparkle glyph (added 2026-06-24) */
.msg.ai .av{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315130f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c.6 4.8 4.2 8.4 9 9-4.8.6-8.4 4.2-9 9-.6-4.8-4.2-8.4-9-9 4.8-.6 8.4-4.2 9-9Z'/%3E%3Cpath d='M19 4c.18 1.4.6 1.82 2 2-1.4.18-1.82.6-2 2-.18-1.4-.6-1.82-2-2 1.4-.18 1.82-.6 2-2Z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:15px}
