:root {
    --help-blue: var(--mcs-legacy-help-blue);
    --help-blue-dark: var(--mcs-legacy-help-blue-dark);
    --help-green: var(--mcs-legacy-help-green);
    --help-ink: var(--mcs-legacy-help-ink);
    --help-muted: var(--mcs-legacy-help-muted);
    --help-line: var(--mcs-legacy-help-line);
    --help-surface: var(--mcs-surface);
    --help-soft: var(--mcs-background);
    --help-orange: var(--mcs-warning);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--help-ink);
    background: var(--help-soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}
a { color: var(--help-blue-dark); }
button, input { font: inherit; }
.help-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: var(--help-blue-dark); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.help-header { position: sticky; z-index: 30; top: 0; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--help-line); backdrop-filter: blur(12px); }
.help-header__inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.help-brand { display: flex; align-items: center; gap: 10px; color: var(--help-ink); text-decoration: none; }
.help-brand__mark { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3b82f6, #10b981); border-radius: 11px; }
.help-brand span:last-child { display: grid; line-height: 1.1; }
.help-brand small { color: var(--help-muted); font-size: .72rem; }
.help-header__actions { display: flex; gap: 10px; }
.help-header__actions a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: var(--help-ink); background: #eef4fb; border: 1px solid var(--help-line); border-radius: 10px; font-size: .86rem; font-weight: 750; text-decoration: none; }
.help-header__actions .help-header__login { color: #fff; background: var(--help-blue); border-color: var(--help-blue); }

.help-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #18356e 0%, #255ec8 58%, #079a79 135%); }
.help-hero::after { content: "?"; position: absolute; right: max(4vw, 30px); bottom: -150px; color: rgba(255,255,255,.07); font-size: 34rem; font-weight: 900; line-height: 1; }
.help-hero__content { position: relative; z-index: 1; padding-block: 64px 58px; }
.help-eyebrow { margin: 0 0 6px; color: #4f8df7; font-size: .74rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.help-hero .help-eyebrow { color: #b7f4e2; }
.help-hero h1 { max-width: 780px; margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.04em; }
.help-hero__content > p:not(.help-eyebrow) { max-width: 760px; margin: 18px 0 0; color: #e5efff; font-size: 1.08rem; }

.help-search { max-width: 760px; margin-top: 30px; }
.help-search label { display: block; margin-bottom: 8px; font-weight: 800; }
.help-search__field { display: flex; align-items: center; gap: 10px; padding: 5px 7px 5px 16px; background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(13, 37, 82, .24); }
.help-search__field i { color: #71839d; }
.help-search input { min-width: 0; flex: 1; padding: 10px 0; color: var(--help-ink); background: transparent; border: 0; outline: 0; }
.help-search button { padding: 8px 11px; color: var(--help-blue-dark); background: #eaf1fd; border: 0; border-radius: 9px; font-weight: 750; cursor: pointer; }
.help-search__status { min-height: 1.4em; margin: 7px 2px 0; color: #dbeafe; font-size: .82rem; }
.help-audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 850px; margin-top: 24px; }
.help-audiences a { display: flex; align-items: center; gap: 11px; padding: 13px; color: #fff; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.25); border-radius: 13px; text-decoration: none; }
.help-audiences i { width: 30px; text-align: center; font-size: 1.15rem; }
.help-audiences span { display: grid; }
.help-audiences small { color: #dbeafe; }

.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; padding-block: 42px 70px; }
.help-sidebar { align-self: start; position: sticky; top: 92px; }
.help-sidebar nav { display: grid; gap: 3px; padding: 15px; background: #fff; border: 1px solid var(--help-line); border-radius: 15px; box-shadow: 0 10px 26px rgba(31, 55, 90, .06); }
.help-sidebar strong { padding: 6px 10px 9px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.help-sidebar a { padding: 7px 10px; color: var(--help-muted); border-radius: 8px; font-size: .86rem; font-weight: 700; text-decoration: none; }
.help-sidebar a:hover, .help-sidebar a:focus-visible, .help-sidebar a.is-active { color: var(--help-blue-dark); background: #edf4ff; }
.help-content { min-width: 0; }
.help-chapter { margin-top: 54px; scroll-margin-top: 92px; }
.help-chapter:first-of-type { margin-top: 34px; }
.help-chapter__heading { display: flex; align-items: center; gap: 14px; margin-bottom: 17px; }
.help-chapter__heading > span { width: 46px; height: 46px; display: grid; flex: 0 0 auto; place-items: center; color: #fff; background: linear-gradient(135deg, var(--help-blue), var(--help-green)); border-radius: 13px; font-weight: 850; }
.help-chapter__heading h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.15; }
.help-chapter__heading .help-eyebrow { margin: 0; }

.help-article, .glossary-card { scroll-margin-top: 92px; background: var(--help-surface); border: 1px solid var(--help-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(31, 55, 90, .055); }
.help-article { margin-top: 14px; padding: 24px 26px; }
.help-article h3, .glossary-card h3 { margin: 0 0 10px; line-height: 1.25; }
.help-article p { margin: 10px 0 0; }
.help-article ol { margin: 13px 0 0; padding-left: 1.35rem; }
.help-article ul { margin: 13px 0 0; padding-left: 1.35rem; }
.help-article li + li { margin-top: 7px; }
.account-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.account-guide section { min-width: 0; padding: 18px; border: 1px solid var(--help-line); border-radius: 13px; background: #f8fbff; }
.account-guide h4 { margin: 0 0 12px; color: var(--help-blue-dark); font-size: 1rem; }
.account-guide dl { display: grid; gap: 11px; margin: 0; }
.account-guide dl > div { display: grid; grid-template-columns: 5.7rem minmax(0, 1fr); gap: 10px; padding-top: 11px; border-top: 1px solid var(--help-line); }
.account-guide dl > div:first-child { padding-top: 0; border-top: 0; }
.account-guide dt { color: var(--help-blue-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.account-guide dd { margin: 0; color: var(--help-muted); line-height: 1.5; }
.account-guide dd strong { color: var(--help-ink); }
.help-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: #fff;
    background: var(--help-blue);
    border: 1px solid var(--help-blue);
    border-radius: 10px;
    font-size: .86rem;
    font-weight: 750;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.help-action:hover,
.help-action:focus-visible {
    color: #fff;
    background: var(--help-blue-dark);
    border-color: var(--help-blue-dark);
}
.help-purpose { color: var(--help-muted); }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.role-grid div { padding: 15px; background: var(--help-soft); border-radius: 11px; }
.role-grid p { color: var(--help-muted); font-size: .9rem; }

.help-notice { display: flex; align-items: flex-start; gap: 12px; margin-top: 17px; padding: 14px 16px; color: #24446f; background: #edf5ff; border-left: 4px solid var(--help-blue); border-radius: 10px; }
.help-content > .help-notice { margin-top: 0; }
.help-notice i { margin-top: .25em; }
.help-notice p { margin: 0; }
.help-notice strong { display: block; }
.help-notice--warning { color: #7c4307; background: #fff7e8; border-left-color: var(--help-orange); }
.help-notice--danger { color: #8b2635; background: #fff0f2; border-left-color: #dc3f52; }
.help-notice--info { color: #145c4c; background: #eafaf5; border-left-color: var(--help-green); }

.glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.glossary-card { padding: 20px; }
.glossary-card h3 { color: var(--help-blue-dark); font-size: 1rem; }
.glossary-card p { margin: 0; color: var(--help-muted); font-size: .92rem; }
.faq-list details { padding-block: 19px; }
.faq-list summary { font-weight: 800; cursor: pointer; }
.faq-list details[open] summary { color: var(--help-blue-dark); }
.help-no-results { padding: 30px; text-align: center; color: var(--help-muted); background: #fff; border: 1px dashed #a9b8cc; border-radius: 15px; }
[hidden] { display: none !important; }

.term-help {
    position: relative;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.term-help[data-definition]::after {
    content: attr(data-definition);
    position: absolute;
    z-index: 50;
    left: 50%;
    bottom: calc(100% + 10px);
    width: min(310px, 78vw);
    padding: 11px 13px;
    color: #ffffff;
    background: #172033;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
    font-size: 0.79rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 5px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.term-help[data-definition]::before {
    content: "";
    position: absolute;
    z-index: 51;
    left: 50%;
    bottom: calc(100% + 4px);
    border: 6px solid transparent;
    border-top-color: #172033;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 140ms ease;
}

.term-help[data-definition]:hover::after,
.term-help[data-definition]:focus-visible::after,
.term-help[data-definition]:hover::before,
.term-help[data-definition]:focus-visible::before {
    opacity: 1;
}

.term-help[data-definition]:hover::after,
.term-help[data-definition]:focus-visible::after {
    transform: translate(-50%, 0);
}

.back-to-top { position: fixed; z-index: 20; right: 22px; bottom: 22px; width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--help-blue); border-radius: 50%; box-shadow: 0 9px 22px rgba(37, 99, 235, .28); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .15s ease, transform .15s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 840px) {
    .help-layout { grid-template-columns: 1fr; }
    .help-sidebar { position: static; }
    .help-sidebar nav { display: flex; overflow-x: auto; }
    .help-sidebar strong { display: none; }
    .help-sidebar a { white-space: nowrap; }
    .help-audiences { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 600px) {
    .help-container { width: min(100% - 28px, 1180px); }
    .help-header__actions a:first-child { display: none; }
    .help-header__actions span { display: none; }
    .help-hero__content { padding-block: 46px 42px; }
    .help-layout { padding-top: 24px; }
    .help-article { padding: 20px; }
    .role-grid, .glossary-grid, .account-guide { grid-template-columns: 1fr; }
    .account-guide dl > div { grid-template-columns: 1fr; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .back-to-top { transition: none; }
    .term-help[data-definition]::after,
    .term-help[data-definition]::before { transition: none; }
}
