/* In-page help: "?" button beside the page title + side panel (partials/page-help). */
:root {
    --hh-navy: var(--b-sidebar-bg, var(--clp-primary, #16307a));
    --hh-teal: var(--ws-accent, var(--clp-accent-green, #1ba84c));
    --hh-ink: #0f1d2c; --hh-ink-2: #33475a; --hh-muted: #5d6f80;
    --hh-line: #e4e9ee; --hh-paper: #f5f7f9; --hh-card: #fff;
}
.dark-theme { --hh-ink: #e7ecf6; --hh-ink-2: #c3cbdd; --hh-muted: #93a0b8; --hh-line: #25304a; --hh-paper: #151d2e; --hh-card: #101826; }

.cx-help-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 1.6rem; height: 1.6rem; margin-left: .55rem; padding: 0;
    border: 2px solid currentColor; border-radius: 50%;
    background: color-mix(in srgb, currentColor 8%, transparent);
    color: inherit; opacity: .72;
    font: 800 .92rem/1 "Inter", "Segoe UI", system-ui, sans-serif; letter-spacing: 0;
    vertical-align: .22em; cursor: pointer;
    transition: opacity .15s, transform .15s, background .15s;
}
.cx-help-btn:hover, .cx-help-btn[aria-expanded="true"] { opacity: 1; transform: scale(1.08); background: color-mix(in srgb, currentColor 16%, transparent); }
.cx-help-btn:focus-visible { outline: 3px solid var(--hh-teal); outline-offset: 2px; opacity: 1; }
.cx-help-btn--float {
    position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 1040;
    width: 2.9rem; height: 2.9rem; margin: 0; border: 0; opacity: 1;
    background: var(--hh-navy); color: #fff; font-size: 1.25rem;
    box-shadow: 0 10px 26px rgba(3, 39, 94, .28);
}
.cx-help-btn--float:hover { background: var(--hh-navy); }

.cx-help {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1045;
    display: flex; flex-direction: column;
    width: min(26rem, 100vw);
    border-left: 1px solid var(--hh-line); background: var(--hh-card); color: var(--hh-ink);
    box-shadow: -18px 0 48px rgba(3, 39, 94, .16);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    transform: translateX(104%); transition: transform .2s ease;
}
.cx-help.is-open { transform: none; }
@media (prefers-reduced-motion: reduce) { .cx-help { transition: none; } }
.cx-help__head { display: flex; align-items: flex-start; gap: .8rem; padding: 1.2rem 1.2rem 1rem; background: linear-gradient(120deg, var(--hh-navy), color-mix(in srgb, var(--hh-navy) 78%, var(--hh-teal))); color: #fff; }
.cx-help__badge { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(255,255,255,.16); font-weight: 800; font-size: 1.1rem; }
.cx-help__heading { flex: 1; min-width: 0; }
.cx-help__kicker { margin: 0 0 .15rem; color: color-mix(in srgb, var(--hh-teal) 45%, white); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cx-help h2 { margin: 0; color: #fff; font: 600 1.3rem/1.2 var(--clp-font, "Inter", system-ui, sans-serif); outline: none; }
.cx-help__close { flex: none; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cx-help__close:hover { background: rgba(255,255,255,.14); }
.cx-help__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cx-help__body { flex: 1; overflow-y: auto; padding: 1.1rem 1.2rem 1.4rem; }
.cx-help__intro { margin: 0 0 1.1rem; color: var(--hh-ink-2); font-size: .95rem; line-height: 1.6; }
.cx-help__section { margin: 1.2rem 0 .6rem; color: var(--hh-muted); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cx-help__intro + .cx-help__section { margin-top: 0; }
.cx-help__task { margin-bottom: .5rem; border: 1px solid var(--hh-line); border-radius: .85rem; background: var(--hh-card); }
.cx-help__task[open] { border-color: color-mix(in srgb, var(--hh-teal) 45%, var(--hh-line)); background: color-mix(in srgb, var(--hh-teal) 5%, var(--hh-card)); }
.cx-help__task summary { position: relative; padding: .7rem 2.2rem .7rem .9rem; color: var(--hh-ink); font-size: .92rem; font-weight: 650; cursor: pointer; list-style: none; }
.cx-help__task summary::-webkit-details-marker { display: none; }
.cx-help__task summary::after { content: "+"; position: absolute; right: .9rem; top: .55rem; color: var(--hh-muted); font-size: 1.15rem; font-weight: 400; }
.cx-help__task[open] summary::after { content: "–"; }
.cx-help__task summary:focus-visible { outline: 3px solid var(--hh-teal); outline-offset: -3px; border-radius: .85rem; }
.cx-help__task ol, .cx-help__task p { margin: 0; padding: 0 .9rem .85rem 2.2rem; color: var(--hh-ink-2); font-size: .88rem; line-height: 1.55; }
.cx-help__task p { padding-left: .9rem; }
.cx-help__task li + li { margin-top: .3rem; }
.cx-help__tips { margin: 0; padding: 0; list-style: none; }
.cx-help__tips li { position: relative; margin-bottom: .55rem; padding: .6rem .8rem .6rem 2rem; border-radius: .75rem; background: var(--hh-paper); color: var(--hh-ink-2); font-size: .86rem; line-height: 1.5; }
.cx-help__tips li::before { content: "i"; position: absolute; left: .7rem; top: .62rem; display: grid; place-items: center; width: .95rem; height: .95rem; border-radius: 50%; background: var(--hh-teal); color: #fff; font: 700 .65rem/1 Georgia, serif; }
.cx-help__foot { margin: 0; padding: .75rem 1.2rem; border-top: 1px solid var(--hh-line); color: var(--hh-muted); font-size: .78rem; }
.cx-help kbd { padding: .05rem .4rem; border: 1px solid var(--hh-line); border-radius: .35rem; background: var(--hh-paper); color: var(--hh-ink); font: 600 .78rem/1.4 ui-monospace, Consolas, monospace; }
@media (max-width: 575.98px) { .cx-help__foot { display: none; } }
