/* Help Center — public pages + editor preview. Built on style.css tokens. */
:root { --amber: #eab308; --blue: #7cc4f5; }
.c-accent { --c: var(--accent); --c-soft: rgba(207,132,230,0.1); --c-line: rgba(207,132,230,0.3); }
.c-green  { --c: var(--green);  --c-soft: rgba(126,224,163,0.09); --c-line: rgba(126,224,163,0.3); }
.c-amber  { --c: var(--amber);  --c-soft: rgba(234,179,8,0.09);  --c-line: rgba(234,179,8,0.3); }
.c-blue   { --c: #7cc4f5; --c-soft: rgba(124,196,245,0.09); --c-line: rgba(124,196,245,0.3); }
.c-cyan   { --c: #5fd4d4; --c-soft: rgba(95,212,212,0.09);  --c-line: rgba(95,212,212,0.3); }
.c-lime   { --c: #b6e05a; --c-soft: rgba(182,224,90,0.09);  --c-line: rgba(182,224,90,0.3); }
.c-orange { --c: #f0a060; --c-soft: rgba(240,160,96,0.09);  --c-line: rgba(240,160,96,0.3); }
.c-red    { --c: #f08a8a; --c-soft: rgba(240,138,138,0.09); --c-line: rgba(240,138,138,0.3); }
.c-pink   { --c: #f08fc0; --c-soft: rgba(240,143,192,0.09); --c-line: rgba(240,143,192,0.3); }
.c-neutral{ --c: var(--muted);  --c-soft: rgba(255,255,255,0.05); --c-line: var(--border-strong); }
.fi { line-height: 1; }

/* search */
.faq-hero .search-wrap { position: relative; max-width: 620px; margin-top: 2rem; }
.search-wrap .fi { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search-input { width: 100%; padding: 1rem 1.25rem 1rem 3rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); font: inherit; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.search-input::placeholder { color: var(--dim); }
.search-input:focus { border-color: var(--accent); }
.search-hint { margin-top: 0.7rem; font-size: 0.75rem; color: var(--dim); font-family: 'DM Mono', monospace; }
.search-hint kbd { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 5px; padding: 0.05rem 0.4rem; font: inherit; color: var(--muted); }

/* category grid */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.5rem; }
.faq-cat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; scroll-margin-top: 90px; transition: border-color 0.25s; }
.faq-cat:hover, .faq-cat:target { border-color: var(--c-line); }
.faq-cat-head { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.15rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.faq-ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--c); background: var(--c-soft); border: 1px solid var(--c-line); }
.faq-cat-head h3 { font-size: 1.05rem; }
.cat-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.cat-count { display: block; margin-top: 0.2rem; font: 500 0.68rem 'DM Mono', monospace; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.article-list { display: flex; flex-direction: column; }
.article-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.8rem 0.75rem; border-radius: 8px; transition: background 0.2s; }
.article-row:hover { background: var(--surface-2); }
.article-row .fi { color: var(--dim); font-size: 0.9rem; margin-top: 0.25rem; flex-shrink: 0; transition: color 0.2s; }
.article-row:hover .fi, .article-row:hover h4 { color: var(--accent); }
.article-row h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.1rem; transition: color 0.2s; }
.article-row p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.no-results { display: none; text-align: center; padding: 4rem 1rem; color: var(--muted); }
.no-results .fi { display: block; font-size: 2rem; color: var(--dim); margin-bottom: 1rem; }
.no-results h3 { color: var(--text); margin-bottom: 0.4rem; }

/* article */
.article-wrap { max-width: 780px; margin: 0 auto; padding: 8.5rem clamp(1.25rem, 4vw, 2rem) 4rem; }
.breadcrumb { font-size: 0.8rem; color: var(--dim); margin-bottom: 2rem; }
.breadcrumb a { color: var(--muted); transition: color 0.2s; } .breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 0.5rem; }
.cat-badge { display: inline-block; font: 500 0.7rem 'DM Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c); background: var(--c-soft); border: 1px solid var(--c-line); padding: 0.3rem 0.8rem; border-radius: 6px; margin-bottom: 0.9rem; }
.article-wrap h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 0.75rem; }
.article-meta { font: 0.78rem 'DM Mono', monospace; color: var(--dim); margin-bottom: 2.25rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }

.article-body > :first-child { margin-top: 0; }
.article-body h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; margin: 2.5rem 0 0.8rem; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.08rem; font-weight: 700; margin: 1.75rem 0 0.55rem; scroll-margin-top: 90px; }
.article-body p, .article-body li { color: var(--muted); font-size: 0.97rem; line-height: 1.8; }
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.1rem 1.4rem; }
.article-body li { margin-bottom: 0.4rem; } .article-body li::marker { color: var(--accent); }
.article-body a { color: var(--accent); } .article-body a:hover { text-decoration: underline; }
.article-body a.btn { text-decoration: none; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body code { font-family: 'DM Mono', monospace; font-size: 0.85em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.1rem 0.4rem; color: var(--text); }
.article-body pre { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 1.1rem 1.25rem; overflow-x: auto; margin: 1.25rem 0; }
.article-body pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; line-height: 1.7; color: var(--muted); }
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.25rem 0; }
.article-body ul.checks { list-style: none; margin-left: 0; }
.article-body ul.checks li { position: relative; padding-left: 1.7rem; }
.article-body ul.checks li::before { content: ''; position: absolute; left: 0.1rem; top: 0.55em; width: 0.85rem; height: 0.45rem; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; border: 1px solid var(--border); border-radius: 10px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 440px; background: var(--surface); }
.article-body th, .article-body td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); color: var(--muted); }
.article-body tr:last-child td { border-bottom: 0; }
.article-body th { background: var(--surface-2); color: var(--text); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.article-body td:first-child { color: var(--text); font-weight: 500; }
.note-box { display: flex; gap: 0.85rem; padding: 1rem 1.25rem; border-radius: 10px; font-size: 0.9rem; line-height: 1.65; margin: 1.5rem 0; border: 1px solid; }
.note-box .fi { margin-top: 0.2rem; flex-shrink: 0; }
.note-box, .article-body .note-box div { color: var(--muted); }
.note-box.tip { background: rgba(126,224,163,0.07); border-color: rgba(126,224,163,0.25); } .note-box.tip .fi { color: var(--green); }
.note-box.info { background: var(--accent-soft); border-color: var(--accent-line); } .note-box.info .fi { color: var(--accent); }
.note-box.warning { background: rgba(234,179,8,0.06); border-color: rgba(234,179,8,0.25); } .note-box.warning .fi { color: var(--amber); }
ol.steps { list-style: none; margin: 1.25rem 0 1.5rem; counter-reset: st; }
ol.steps li { counter-increment: st; position: relative; padding: 0 0 1.25rem 3.2rem; margin: 0; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font: 500 0.85rem 'DM Mono', monospace; display: flex; align-items: center; justify-content: center; }
ol.steps li::after { content: ''; position: absolute; left: 1.05rem; top: 2.3rem; bottom: 0.2rem; width: 1px; background: var(--border-strong); }
ol.steps li:last-child::after { display: none; }
ol.steps h4 { font-size: 0.98rem; color: var(--text); margin: 0.2rem 0 0.15rem; }
ol.steps p { margin: 0; font-size: 0.92rem; }
.fig { margin: 1.5rem 0; } .fig img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); display: block; }
.fig figcaption { font-size: 0.8rem; color: var(--dim); margin-top: 0.6rem; text-align: center; }
blockquote { margin: 1.5rem 0; padding: 0.4rem 0 0.4rem 1.25rem; border-left: 3px solid var(--accent); }
blockquote p { color: var(--text) !important; font-size: 1.05rem !important; font-style: italic; margin-bottom: 0.4rem !important; }
blockquote cite { font-size: 0.8rem; color: var(--dim); font-style: normal; font-family: 'DM Mono', monospace; }
.btn-row { margin: 1.5rem 0 !important; }
.acc-group { margin: 1.25rem 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.acc { border-bottom: 1px solid var(--border); background: var(--surface); } .acc:last-child { border-bottom: 0; }
.acc summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; color: var(--accent); font-family: 'DM Mono', monospace; font-size: 1.1rem; line-height: 1; }
.acc[open] summary::after { content: '–'; }
.acc > div { padding: 0 1.25rem 1.1rem; color: var(--muted); font-size: 0.93rem; line-height: 1.75; }
.toc { display: flex; flex-direction: column; gap: 0.35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.4rem; margin-bottom: 2rem; }
.toc span { font: 500 0.68rem 'DM Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.2rem; }
.toc a { color: var(--muted); font-size: 0.9rem; } .toc a:hover { color: var(--accent); }

.helpful-box, .related-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.helpful-box { margin-top: 3.5rem; padding: 2rem; text-align: center; }
.helpful-box h3 { font-size: 1.05rem; margin-bottom: 0.3rem; } .helpful-box p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; }
.helpful-btns { display: flex; gap: 0.75rem; justify-content: center; }
.helpful-btn { padding: 0.6rem 1.75rem; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: 600 0.85rem 'Plus Jakarta Sans', sans-serif; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.helpful-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.helpful-thanks { display: none; color: var(--green); font-weight: 600; font-size: 0.9rem; }
.related-box { margin-top: 1.25rem; padding: 1.5rem; }
.related-box h3 { font: 500 0.72rem 'DM Mono', monospace; color: var(--dim); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 0.6rem; }
.back-link { display: inline-block; margin-top: 2.25rem; color: var(--muted); font-size: 0.88rem; font-weight: 500; } .back-link:hover { color: var(--text); }

/* staff-only edit pill (shown by faq.js only when signed in) */
.staff-pill { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.5rem 0.95rem; font: 500 0.78rem 'DM Mono', monospace; transition: color 0.2s, border-color 0.2s; }
.staff-pill:hover { color: var(--accent); border-color: var(--accent-line); }
