/* Help Center — public + in-app guide. Own stylesheet (no dependency on the Tailwind bundle). Light by default,
   follows the dashboard's `html.dark` switch. All classes are prefixed hc-. */
.hc {
    --hc-bg: #ffffff; --hc-soft: #f8fafc; --hc-line: #e2e8f0; --hc-text: #0f172a; --hc-muted: #64748b; --hc-accent: #059669;
    --hc-accent-soft: #ecfdf5; --hc-warn-bg: #fffbeb; --hc-warn: #b45309; --hc-radius: 14px;
    color: var(--hc-text); font-size: 15px; line-height: 1.65; max-width: 1080px; margin: 0 auto; padding: 8px 0 40px;
}
html.dark .hc {
    --hc-bg: #0f172a; --hc-soft: #111c33; --hc-line: #243049; --hc-text: #e5edf8; --hc-muted: #94a3b8; --hc-accent: #34d399;
    --hc-accent-soft: #0b2a22; --hc-warn-bg: #2b2208; --hc-warn: #fbbf24;
}
.hc * { box-sizing: border-box; }
.hc a { color: var(--hc-accent); text-decoration: none; }
.hc a:hover { text-decoration: underline; }
.hc-public { padding: 28px 20px 56px; }

/* hero + search */
.hc-hero { text-align: center; padding: 34px 16px 26px; background: linear-gradient(180deg, var(--hc-accent-soft), transparent); border-radius: 22px; }
.hc-hero h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.15; font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em; }
.hc-hero p { color: var(--hc-muted); margin: 0 auto 20px; max-width: 620px; font-size: 16px; }
.hc-search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.hc-search input {
    width: 100%; font: inherit; padding: 15px 70px 15px 48px; border: 2px solid var(--hc-line); border-radius: 14px;
    background: var(--hc-bg); color: var(--hc-text); box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
}
.hc-search input:focus { outline: none; border-color: var(--hc-accent); box-shadow: 0 0 0 4px rgba(5, 150, 105, .15); }
.hc-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--hc-muted); }
.hc-search kbd { position: absolute; right: 14px; top: 50%; margin-top: -11px; font: 12px/1 monospace; padding: 5px 8px; border: 1px solid var(--hc-line); border-radius: 6px; color: var(--hc-muted); background: var(--hc-soft); }
.hc-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--hc-bg); border: 1px solid var(--hc-line);
    border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 23, 42, .18); max-height: 420px; overflow: auto; display: none;
}
.hc-results.is-open { display: block; }
.hc-result { display: block; padding: 11px 16px; border-bottom: 1px solid var(--hc-line); color: var(--hc-text) !important; text-decoration: none !important; }
.hc-result:last-child { border-bottom: 0; }
.hc-result:hover, .hc-result.is-active { background: var(--hc-accent-soft); }
.hc-result b { display: block; font-weight: 700; }
.hc-result span { display: block; font-size: 13px; color: var(--hc-muted); }
.hc-result em { font-style: normal; font-size: 11px; color: var(--hc-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hc-empty { padding: 16px; color: var(--hc-muted); }

/* language switcher */
.hc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 18px 0; }
.hc-langs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hc-langs a { padding: 5px 12px; border: 1px solid var(--hc-line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--hc-muted); background: var(--hc-bg); }
.hc-langs a.is-on { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff; }
.hc-langs a:hover { text-decoration: none; border-color: var(--hc-accent); }
.hc-progress { font-size: 13px; color: var(--hc-muted); display: flex; gap: 8px; align-items: center; }
.hc-progress i { display: inline-block; width: 120px; height: 7px; border-radius: 99px; background: var(--hc-line); overflow: hidden; }
.hc-progress i b { display: block; height: 100%; background: var(--hc-accent); }
.hc-tips { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 0; padding: 8px 12px; border: 1px dashed var(--hc-line); border-radius: 10px; font-size: 13px; color: var(--hc-muted); }
.hc-tips button { border: 0; background: transparent; color: var(--hc-accent); font-weight: 600; cursor: pointer; padding: 2px 4px; }
.hc-tips button:disabled { opacity: .5; cursor: default; }

/* grids + cards */
.hc-h2 { font-size: 20px; font-weight: 800; margin: 30px 0 14px; letter-spacing: -.01em; }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hc-card { background: var(--hc-bg); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); padding: 16px 18px; transition: box-shadow .15s, transform .15s, border-color .15s; display: block; color: var(--hc-text) !important; text-decoration: none !important; }
.hc-card:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, .09); transform: translateY(-2px); border-color: var(--hc-accent); }
.hc-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.hc-card p { margin: 0; color: var(--hc-muted); font-size: 14px; }
.hc-card .hc-meta { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--hc-accent); }
.hc-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--hc-accent-soft); color: var(--hc-accent); margin-bottom: 10px; font-size: 18px; font-weight: 800; }
.hc-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--hc-accent-soft); color: var(--hc-accent); }
.hc-read { color: var(--hc-accent); font-weight: 800; }
.hc-list { list-style: none; margin: 0; padding: 0; background: var(--hc-bg); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); overflow: hidden; }
.hc-list li { border-bottom: 1px solid var(--hc-line); }
.hc-list li:last-child { border-bottom: 0; }
.hc-list a { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; padding: 12px 16px; color: var(--hc-text); }
.hc-list a:hover { background: var(--hc-soft); text-decoration: none; }
.hc-list small { color: var(--hc-muted); }

/* breadcrumb + article */
.hc-crumbs { font-size: 13px; color: var(--hc-muted); display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.hc-crumbs a { color: var(--hc-muted); }
.hc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .hc-layout { grid-template-columns: 1fr; } }
.hc-article h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em; }
.hc-lead { font-size: 17px; color: var(--hc-muted); margin: 0 0 14px; }
.hc-info { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; color: var(--hc-muted); margin-bottom: 18px; }
.hc-cover { width: 100%; border: 1px solid var(--hc-line); border-radius: var(--hc-radius); box-shadow: 0 10px 34px rgba(15, 23, 42, .08); margin: 6px 0 22px; display: block; background: var(--hc-soft); }
.hc-body h2 { font-size: 22px; font-weight: 800; margin: 28px 0 10px; letter-spacing: -.01em; }
.hc-body h3 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; }
.hc-body p, .hc-body ul, .hc-body ol { margin: 0 0 14px; }
.hc-body ul, .hc-body ol { padding-left: 22px; }
.hc-body li { margin: 4px 0; }
.hc-body blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--hc-accent); background: var(--hc-accent-soft); border-radius: 0 10px 10px 0; }
.hc-body img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--hc-line); }
.hc-body table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 14px; }
.hc-body th, .hc-body td { border: 1px solid var(--hc-line); padding: 8px 10px; text-align: left; }
.hc-body code, .hc-body kbd { background: var(--hc-soft); border: 1px solid var(--hc-line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.hc-body pre { background: var(--hc-soft); border: 1px solid var(--hc-line); border-radius: 10px; padding: 12px 14px; overflow: auto; }
.hc-body .hc-note { background: var(--hc-warn-bg); border: 1px solid var(--hc-warn); color: var(--hc-warn); border-radius: 10px; padding: 10px 14px; }

/* steps */
.hc-steps { list-style: none; counter-reset: hcstep; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.hc-step { counter-increment: hcstep; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 16px; border: 1px solid var(--hc-line); border-radius: var(--hc-radius); background: var(--hc-bg); }
.hc-step::before { content: counter(hcstep); width: 36px; height: 36px; border-radius: 50%; background: var(--hc-accent); color: #fff; font-weight: 800; display: grid; place-items: center; }
.hc-step b { display: block; font-size: 16px; margin-bottom: 2px; }
.hc-step p { margin: 0; color: var(--hc-text); }
.hc-step img { margin-top: 10px; max-width: 100%; border: 1px solid var(--hc-line); border-radius: 10px; }

/* video */
.hc-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--hc-radius); overflow: hidden; background: #000; border: 1px solid var(--hc-line); margin: 6px 0 22px; }
.hc-video iframe, .hc-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* faq */
.hc-faq details { border: 1px solid var(--hc-line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; background: var(--hc-bg); }
.hc-faq summary { cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.hc-faq summary::-webkit-details-marker { display: none; }
.hc-faq summary::after { content: "+"; color: var(--hc-accent); font-size: 20px; line-height: 1; }
.hc-faq details[open] summary::after { content: "–"; }
.hc-faq details p { margin: 0 0 14px; color: var(--hc-muted); }

/* side + nav */
.hc-side { position: sticky; top: 90px; display: grid; gap: 14px; }
.hc-box { border: 1px solid var(--hc-line); border-radius: var(--hc-radius); padding: 14px 16px; background: var(--hc-bg); }
.hc-box h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--hc-muted); }
.hc-box a { display: block; padding: 4px 0; font-size: 14px; }
.hc-btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 10px; font-weight: 700; border: 1px solid var(--hc-line); background: var(--hc-bg); color: var(--hc-text) !important; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none !important; }
.hc-btn.is-primary { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff !important; }
.hc-btn:hover { filter: brightness(.97); }
.hc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.hc-pager a { border: 1px solid var(--hc-line); border-radius: 12px; padding: 12px 14px; color: var(--hc-text); background: var(--hc-bg); }
.hc-pager a:hover { border-color: var(--hc-accent); text-decoration: none; }
.hc-pager small { display: block; color: var(--hc-muted); }
.hc-pager .is-next { text-align: right; }
.hc-cta { margin-top: 34px; padding: 26px; border-radius: 18px; background: #0b1220; color: #cbd5e1; text-align: center; }
.hc-cta h3 { color: #fff; margin: 0 0 6px; font-size: 20px; }
.hc-cta p { margin: 0 0 16px; }
.hc-notice { padding: 10px 14px; border-radius: 10px; background: var(--hc-warn-bg); color: var(--hc-warn); border: 1px solid var(--hc-warn); margin-bottom: 16px; font-size: 14px; }
@media (max-width: 560px) {
    .hc-hero { padding: 24px 10px 20px; }
    .hc-step { grid-template-columns: 32px 1fr; padding: 12px; }
    .hc-step::before { width: 30px; height: 30px; }
    .hc-pager { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .hc-card { transition: none; } }
