/* Step-by-step help guides (/help/:slug). Scoped to .help-guide so the shared
   navigation and footer keep their own styling. */
.help-guide {
    --hg-ink: #0b1220;
    --hg-ink-2: #1f2937;
    --hg-muted: #556070;
    --hg-line: #e3e6ef;
    --hg-bg: #f6f7fb;
    --hg-brand: #4f46e5;
    --hg-brand-strong: #4338ca;
    --hg-brand-soft: #eef0ff;
    --hg-violet: #7c3aed;
    color: var(--hg-ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
.help-guide *, .help-guide *::before, .help-guide *::after { box-sizing: border-box; }
.help-guide svg { width: 18px; height: 18px; flex: none; }
.hg-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .hg-wrap { padding: 0 32px; } }

/* Hero */
.hg-hero {
    position: relative; isolation: isolate; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #5b21b6 100%);
    padding: 28px 0 40px;
}
@media (min-width: 768px) { .hg-hero { padding: 40px 0 64px; } }
.hg-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(40% 70% at 85% 20%, rgba(167, 139, 250, .45), transparent 70%), radial-gradient(35% 60% at 10% 100%, rgba(99, 102, 241, .45), transparent 70%);
}
.hg-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .25;
    background-image: radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%); mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.hg-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .875rem; color: #c7d2fe; }
.hg-crumbs a { color: #e0e7ff; text-decoration: none; }
.hg-crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hg-crumbs [aria-current] { color: #fff; font-weight: 600; }
.help-guide .help-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; padding: 6px 12px 6px 6px; border-radius: 999px;
    background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    font-size: .8125rem; font-weight: 700; letter-spacing: .02em; color: #fff;
}
.hg-eyebrow-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--hg-brand); }
.hg-eyebrow-icon svg { width: 15px; height: 15px; }
.help-guide h1 {
    margin: 16px 0 0; max-width: 46rem; color: #fff;
    font-size: clamp(1.875rem, 1.2rem + 3vw, 3rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 800;
}
.help-guide .help-intro { margin: 16px 0 0; max-width: 44rem; font-size: clamp(1rem, .95rem + .3vw, 1.125rem); line-height: 1.65; color: #e0e7ff; }
.hg-facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.hg-facts li {
    display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .1); font-size: .8125rem; font-weight: 600; color: #eef2ff;
}
.hg-facts svg { width: 15px; height: 15px; color: #a5b4fc; }

/* Layout */
.hg-layout { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 72px; }
@media (min-width: 1024px) {
    .hg-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 104px; }
}
.hg-content { min-width: 0; max-width: 760px; }
.hg-aside { order: 2; }
@media (min-width: 1024px) {
    .hg-aside { order: 0; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
}
.hg-toc { display: none; }
@media (min-width: 1024px) { .hg-toc { display: block; } }
.hg-aside-title { margin: 0 0 10px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hg-muted); }
.hg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--hg-line); }
.hg-toc a {
    display: flex; gap: 10px; margin-left: -2px; padding: 8px 10px 8px 14px; border-left: 2px solid transparent;
    font-size: .875rem; line-height: 1.4; font-weight: 600; color: var(--hg-ink-2); text-decoration: none;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.hg-toc a span { flex: none; width: 18px; color: var(--hg-muted); font-variant-numeric: tabular-nums; }
.hg-toc a:hover { color: var(--hg-brand-strong); background: var(--hg-brand-soft); }
.hg-toc a.is-active { color: var(--hg-brand-strong); border-left-color: var(--hg-brand); }
.hg-toc a.is-active span { color: var(--hg-brand); }
.hg-support { padding: 22px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--hg-line); }
@media (min-width: 1024px) { .hg-support { margin-top: 28px; } }
.hg-support p { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--hg-muted); }
.hg-support .hg-aside-title { margin-bottom: 6px; font-size: 1rem; letter-spacing: -.01em; text-transform: none; color: var(--hg-ink); }
.hg-btn {
    display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 16px; padding: 0 18px; border-radius: 14px;
    font-weight: 700; font-size: .9375rem; color: #fff; text-decoration: none;
    background: linear-gradient(135deg, var(--hg-brand), var(--hg-violet)); box-shadow: 0 10px 22px -12px rgba(79, 70, 229, .8);
    transition: transform .15s ease, box-shadow .2s ease;
}
.hg-btn:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 14px 28px -12px rgba(79, 70, 229, .9); }
.hg-support-link { display: block; margin-top: 12px; text-align: center; font-size: .875rem; font-weight: 700; color: var(--hg-brand); text-decoration: none; }
.hg-support-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Warning and topic links */
.help-guide .help-warning {
    display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 16px 18px; border-radius: 16px;
    background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; font-size: .9375rem; line-height: 1.6; color: #78350f;
}
.help-guide .help-warning strong { color: #78350f; }
.hg-warning-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #fef3c7; color: #b45309; }
.help-related { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.help-related a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
    background: #fff; box-shadow: inset 0 0 0 1px var(--hg-line); font-size: .875rem; font-weight: 700; color: var(--hg-ink-2); text-decoration: none;
    transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.help-related a svg { width: 16px; height: 16px; color: var(--hg-brand); }
.help-related a:hover { color: var(--hg-brand-strong); background: var(--hg-brand-soft); box-shadow: inset 0 0 0 1px #c7cbfb; }

/* Steps timeline */
.help-steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.help-steps > li {
    position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 22px 20px;
    border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--hg-line), 0 1px 2px rgba(15, 23, 42, .03);
    scroll-margin-top: 96px;
}
@media (min-width: 640px) { .help-steps > li { grid-template-columns: 44px minmax(0, 1fr); gap: 20px; padding: 26px 28px; } }
.help-steps > li:target { box-shadow: inset 0 0 0 2px var(--hg-brand), 0 12px 28px -16px rgba(79, 70, 229, .5); }
.help-steps > li:not(:last-child)::after {
    content: ""; position: absolute; left: 39px; top: 70px; bottom: -14px; width: 2px;
    background: linear-gradient(var(--hg-brand-soft), #e0e3ff);
}
@media (min-width: 640px) { .help-steps > li:not(:last-child)::after { left: 49px; top: 78px; } }
.hg-num {
    position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    font-weight: 800; font-size: 1rem; color: #fff; background: linear-gradient(135deg, var(--hg-brand), var(--hg-violet));
    box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .8);
}
@media (min-width: 640px) { .hg-num { width: 44px; height: 44px; } }
.help-steps h2 { margin: 6px 0 0; font-size: 1.125rem; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; color: var(--hg-ink); }
@media (min-width: 640px) { .help-steps h2 { font-size: 1.1875rem; margin-top: 8px; } }
.help-steps p { margin: 8px 0 0; font-size: 1rem; line-height: 1.7; color: #374151; }

/* Next steps, sources, more help */
.hg-next, .hg-sources, .hg-more { margin-top: 48px; }
.help-guide section h2 { margin: 0 0 14px; font-size: 1.375rem; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; color: var(--hg-ink); }
.hg-card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .hg-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hg-card {
    display: flex; align-items: center; gap: 14px; height: 100%; padding: 18px; border-radius: 18px; text-decoration: none;
    background: #fff; box-shadow: inset 0 0 0 1px var(--hg-line); color: var(--hg-ink);
    transition: transform .15s ease, box-shadow .2s ease;
}
.hg-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px #c7cbfb, 0 14px 30px -18px rgba(49, 46, 129, .45); color: var(--hg-ink); }
.hg-card-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--hg-brand-soft); color: var(--hg-brand); }
.hg-card-icon svg { width: 22px; height: 22px; }
.hg-card > span:nth-child(2) { flex: 1; min-width: 0; }
.hg-card strong { display: block; font-size: 1rem; line-height: 1.3; font-weight: 800; }
.hg-card strong + span { display: block; margin-top: 3px; font-size: .875rem; line-height: 1.45; color: var(--hg-muted); }
.hg-card > svg { color: var(--hg-brand); transition: transform .2s ease; }
.hg-card:hover > svg { transform: translateX(3px); }
.hg-sources { padding: 22px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--hg-line); }
.hg-sources h2 { font-size: 1.125rem !important; margin-bottom: 4px !important; }
.hg-sources p { margin: 0; color: var(--hg-muted); font-size: .9375rem; }
.hg-sources ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hg-sources a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px;
    background: var(--hg-bg); box-shadow: inset 0 0 0 1px var(--hg-line); font-size: .875rem; font-weight: 700; color: var(--hg-brand-strong); text-decoration: none;
}
.hg-sources a svg { width: 15px; height: 15px; }
.hg-sources a:hover { background: var(--hg-brand-soft); }
.hg-utility { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0 0; font-size: .9375rem; }
.hg-utility a { font-weight: 600; color: var(--hg-brand-strong); text-decoration: underline; text-decoration-color: rgba(67, 56, 202, .35); text-underline-offset: 3px; }
.hg-utility a:hover { text-decoration-color: currentColor; }
.help-guide .help-reviewed { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--hg-line); font-size: .875rem; line-height: 1.6; color: var(--hg-muted); }

.help-guide a:focus-visible { outline: 3px solid #6366f1; outline-offset: 3px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
    .help-guide *, .help-guide *::before, .help-guide *::after { transition: none !important; }
    html { scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html:has(.help-guide) { scroll-behavior: smooth; } }

/* Phones: number sits beside the heading and the text uses the full card width. */
@media (max-width: 639px) {
    .help-steps > li { grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; row-gap: 0; align-items: center; padding: 18px; }
    .help-steps > li:not(:last-child)::after { display: none; }
    .hg-step-body { display: contents; }
    .hg-num { width: 36px; height: 36px; border-radius: 10px; font-size: .9375rem; }
    .help-steps h2 { margin: 0; }
    .help-steps p { grid-column: 1 / -1; margin-top: 12px; }
    .help-related { flex-wrap: nowrap; overflow-x: auto; margin-left: -20px; margin-right: -20px; padding: 0 20px 4px; scrollbar-width: none; }
    .help-related::-webkit-scrollbar { display: none; }
    .help-related a { flex: none; }
}
