:root{--red:#ef682a;--ink:#111;--mute:#667085;--line:#e4e7ec;--bg:#fff;--card:#fff}
*{box-sizing:border-box}
body{margin:0;font:16px/1.6 Poppins,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg)}
a{color:#c4501a}
h1,h2,h3{font-weight:500;letter-spacing:-.01em}
.wrap{max-width:900px;margin:0 auto;padding:0 20px}
.top{background:#fff;border-bottom:1px solid var(--line);box-shadow:0 4px 14px rgba(0,0,0,.06)}
.logo{height:30px;width:auto;display:block}
.helplbl{font-weight:300;color:var(--mute);letter-spacing:.14em;text-transform:uppercase;font-size:.8rem;border-left:1px solid var(--line);padding-left:12px}
.bar{display:flex;align-items:center;gap:16px;padding-top:12px;padding-bottom:12px}
.brand{font-weight:700;font-size:1.15rem;color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:8px}
.brand .light{font-weight:400;color:var(--mute)}
.dot{width:12px;height:12px;border-radius:50%;background:var(--red);display:inline-block}
.search{flex:1}
.search input{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:8px;font:inherit}
.btn{background:var(--red);color:#111;border:0;border-radius:0;padding:10px 16px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none;display:inline-block}
.btn.small{padding:7px 12px;font-size:.9rem}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}
main{padding-top:24px;padding-bottom:40px}
.hero{text-align:center;padding:28px 0 12px}
.hero h1{font-size:2rem;margin:0 0 6px}
.hero p{color:var(--mute);margin:0}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:16px;text-decoration:none;color:var(--ink);display:flex;flex-direction:column;gap:4px}
.card:hover{border-color:var(--red)}
.card span{color:var(--mute);font-size:.9rem}
.list{list-style:none;padding:0;margin:0}
.list li{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin-bottom:8px}
.list small{color:var(--mute);margin-left:10px}
.crumbs{color:var(--mute);font-size:.9rem}
.article{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 24px 18px}
.body img{display:block;max-width:min(100%,520px);max-height:360px;width:auto;height:auto;object-fit:contain;margin:12px 0;border:1px solid var(--line);border-radius:6px;cursor:zoom-in}
.body img:hover{border-color:var(--red)}
.zoomhint{display:block;font-size:.78rem;color:var(--mute);margin:-6px 0 12px}
.lightbox{position:fixed;inset:0;z-index:2147483600;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;padding:20px;cursor:zoom-out}
.lightbox img{max-width:96vw;max-height:92vh;width:auto;height:auto;background:#fff;border-radius:4px}
.lightbox button{position:absolute;top:12px;right:16px;background:#fff;border:0;border-radius:50%;width:38px;height:38px;font-size:1.3rem;cursor:pointer}
.body iframe{max-width:100%}
.body table{border-collapse:collapse;max-width:100%}
.meta{color:var(--mute);font-size:.85rem}
.callout{background:#fff;border:1px solid var(--line);border-left:4px solid var(--red);border-radius:6px;padding:12px 16px;margin:16px 0}
.flash{padding:10px 14px;border-radius:8px;margin:12px 0}
.flash.ok{background:#e8f6ee;color:#14633a}
.flash.error{background:#fdecea;color:#8a1c14}
.form{display:flex;flex-direction:column;gap:12px;max-width:560px}
.form.narrow{max-width:320px}
.form label,.blk{display:flex;flex-direction:column;gap:4px;font-weight:600}
input,textarea,select{font:inherit;padding:9px 11px;border:1px solid var(--line);border-radius:8px;width:100%;background:#fff}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.85rem}
.hp{position:absolute;left:-9999px;height:0;width:0;opacity:0}
.foot{color:var(--mute);font-size:.85rem;padding-bottom:30px}
.adminnav{display:flex;gap:16px;align-items:center;margin-bottom:8px}
.inline{display:inline}
.linkbtn{background:none;border:0;color:#c4501a;cursor:pointer;font:inherit;text-decoration:underline;padding:0}
.tbl{width:100%;border-collapse:collapse;background:#fff}
.tbl th,.tbl td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);font-size:.92rem;vertical-align:top}
.tabs a{margin-right:14px;text-decoration:none;color:var(--mute)}
.tabs a.on{color:var(--ink);font-weight:700;border-bottom:2px solid var(--red)}
.pre{white-space:pre-wrap}
.chk{display:flex;gap:8px;align-items:center;margin:8px 0}
.chk input{width:auto}
.muted{color:var(--mute)}
h1 small{font-size:.9rem;color:var(--mute);font-weight:400;margin-left:8px}
.preview{background:#fff;border:1px solid var(--line);padding:12px 16px;border-radius:8px}

/* chat widget (inside iframe) */
body.widget{display:flex;flex-direction:column;height:100vh;background:#fff}
.w-head{background:var(--red);color:#fff;padding:12px 14px;font-weight:700;display:flex;gap:8px;align-items:center}
.w-head .dot{background:#fff}
.w-log{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}
.msg{max-width:88%;padding:9px 12px;border-radius:12px;white-space:pre-wrap;word-wrap:break-word;font-size:.95rem}
.msg.bot{background:#fff;border:1px solid var(--line);align-self:flex-start}
.msg.me{background:var(--red);color:#fff;align-self:flex-end}
.msg .src{display:block;margin-top:8px;font-size:.82rem}
.msg .src a{display:block}
.w-input{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}
.w-input input{flex:1}
.askform{background:#fff;border:1px solid var(--line);padding:12px;border-radius:12px;max-width:100%}
.askform .err{color:#8a1c14;font-size:.9rem}
@media (max-width:600px){.bar{flex-wrap:wrap}.search{order:3;flex-basis:100%}}

.msg.typing{display:flex;gap:4px;align-items:center;padding:13px 14px}
.msg.typing span{width:7px;height:7px;border-radius:50%;background:#999;animation:bounce 1.2s infinite ease-in-out}
.msg.typing span:nth-child(2){animation-delay:.2s}
.msg.typing span:nth-child(3){animation-delay:.4s}
@keyframes bounce{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}
@media (prefers-reduced-motion:reduce){.msg.typing span{animation:none;opacity:.7}}

.w-head{display:flex;align-items:center;gap:8px}
.w-title{flex:1}
.w-expand{background:none;border:0;cursor:pointer;font-size:1.1rem;color:#fff;padding:2px 6px;line-height:1}
.w-expand:hover{opacity:.8}
.w-note{font-size:.72rem;color:var(--mute);text-align:center;padding:2px 8px}

.w-attach{background:none;border:1px solid var(--line);border-radius:8px;cursor:pointer;font-size:1.1rem;padding:0 10px}
.w-attach:hover{border-color:var(--red)}
.w-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;border-top:1px solid var(--line);background:#fafafa}
.w-preview[hidden]{display:none}
.w-preview img{height:48px;width:auto;border-radius:4px;border:1px solid var(--line)}
.w-preview button{border:0;background:#eee;border-radius:50%;width:24px;height:24px;cursor:pointer}
.msg .thumb{display:block;max-width:100%;max-height:160px;border-radius:6px;margin-bottom:6px}

/* Ask-first home */
.backlink{font-size:.9rem}
.askhero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:16px;padding:40px 0 8px}
.askhero h1{font-size:2.4rem;line-height:1.15;font-weight:500;margin:0}
.askhero p{margin:0;color:#4a4a4a;font-weight:300;font-size:1.05rem;max-width:620px}
.askbox{display:flex;align-items:center;gap:10px;width:100%;max-width:700px;padding:10px 10px 10px 18px;border:2px solid var(--ink);border-radius:16px;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.08)}
.askbox input{flex:1;min-width:0;border:0;outline:0;font-size:1.05rem;padding:8px 0;width:auto;background:transparent}
.askbox .btn{color:#111;border-radius:10px;padding:12px 24px}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:700px}
.chiplbl{width:100%;text-align:center;font-size:.8rem;color:var(--mute)}
.chip{font:inherit;font-size:.9rem;color:#111;background:#fdeee6;border:1px solid #f6c9b0;border-radius:999px;padding:8px 16px;cursor:pointer}
.chip:hover{border-color:var(--red)}
.readguides{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:40px;padding-top:24px;border-top:1px solid var(--line)}
.topiclinks{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;font-size:.9rem}
.guidesearch input{max-width:320px}

@media (max-width:600px){.askhero h1{font-size:1.8rem}}
.chatimg{display:block;max-width:260px;max-height:200px;margin:8px 0;border:1px solid var(--line);border-radius:6px}
.msg.team{background:#fdeee6;border-color:#f6c9b0}

/* Chat inline on the home page, under the question bar */
.inlinelog{width:100%;max-width:700px;display:flex;flex-direction:column;gap:10px;text-align:left}
.inlinelog[hidden],.chips[hidden],.w-note[hidden]{display:none}
.inlinelog .msg{max-width:92%;font-size:1rem}
.inlinelog .msg.bot{background:#fff}
.inlinelog .askform{width:100%;box-sizing:border-box}
.askbox .w-attach{flex-shrink:0;width:44px;height:44px;padding:0;background:#fff}
.inline-preview{width:100%;max-width:700px;box-sizing:border-box;border:1px solid var(--line);border-radius:10px}
.askhero .w-note{max-width:700px}
@media (max-width:600px){
  .askbox{padding:8px 8px 8px 12px;gap:6px}
  .askbox input{font-size:1rem}
  .askbox .btn{padding:11px 16px}
  .askbox .w-attach{width:40px;height:40px}
  .askhero{padding-top:24px}
  .inlinelog .msg{max-width:100%}
}
.backlink{margin-left:auto}

.askhere{display:flex;flex-direction:column;gap:12px;margin:28px 0 8px;padding:22px 0 0;border-top:1px solid var(--line)}
.askhere h2{margin:0;font-size:1.25rem}
.askhere p{margin:0;color:#4a4a4a}
.askhere .askbox{max-width:100%;box-sizing:border-box}
.askhere .inlinelog,.askhere .inline-preview,.askhere .w-note{max-width:100%}
.article .body{overflow-wrap:anywhere}

.adminnav a,.admin-nav a,nav.admin a{white-space:nowrap}
.adminnav{flex-wrap:wrap;gap:8px 16px}.adminnav .linkbtn{white-space:nowrap}

.inlinelog .xchg{display:flex;flex-direction:column;gap:10px;padding:2px 0 18px}
.inlinelog .xchg + .xchg{padding-top:18px;border-top:1px solid var(--line)}
