/* In-app help pages (epic #537): FAQ + Quick Start Guide (Views/Help/Faq.cshtml,
   QuickStartGuide.cshtml). The token block is the site-harmonized "Industry" design-system
   set (Bootstrap 3 palette + Helvetica stack). Everything is scoped under .help-page so
   nothing leaks into the rest of the site. Sticky offsets assume the site's fixed 50px
   navbar. */

.help-page {
    --color-bg: #ffffff;
    --color-surface: #f5f5f5;
    --color-text: #333333;
    --color-accent: #337ab7;
    --color-divider: rgba(51,51,51,0.16);

    --color-neutral-400: #b7b7ba;
    --color-neutral-600: #7a7a7d;
    --color-neutral-700: #5d5d60;

    --color-accent-100: #eaf3fa;
    --color-accent-200: #d0e3f0;
    --color-accent-400: #7baed3;
    --color-accent-500: #5193c4;
    --color-accent-700: #286090;
    --color-accent-800: #204d74;
    --color-accent-900: #173a57;

    --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

    --shadow-md: 0 3px 10px color-mix(in srgb, #2b2b2d 16%, transparent);
    --shadow-lg: 0 12px 32px color-mix(in srgb, #2b2b2d 22%, transparent);

    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    min-height: 100vh;
}

html:has(.help-page) { scroll-behavior: smooth; }

@media print {
    .help-page .no-print { display: none !important; }
}

.help-page a { color: var(--color-accent-700); text-underline-offset: 3px; }
.help-page a:hover { color: var(--color-accent-900); }

.help-page h1, .help-page h2, .help-page h3, .help-page h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.015em;
}

.help-page :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* -- blueprint frame (from the design system: hairline border + registration corners) -- */
.help-page .blueprint { position: relative; border: 1px solid var(--color-divider); border-radius: 0; }
.help-page .blueprint > .corner {
    position: absolute; width: 11px; height: 11px;
    color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.help-page .blueprint > .corner::before, .help-page .blueprint > .corner::after {
    content: ""; position: absolute; background: currentColor;
}
.help-page .blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.help-page .blueprint > .corner::after { top: 5px; left: 0; width: 100%; height: 1px; }
.help-page .blueprint > .corner.tl { top: -6px; left: -6px; }
.help-page .blueprint > .corner.tr { top: -6px; right: -6px; }
.help-page .blueprint > .corner.bl { bottom: -6px; left: -6px; }
.help-page .blueprint > .corner.br { bottom: -6px; right: -6px; }

/* -- hero band -- */
.help-page .help-hero { background: var(--color-accent-900); color: #f2f2f3; padding: 44px 24px 40px; }
.help-page .help-hero-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.help-page .help-hero-kicker {
    margin: 0; font-family: var(--font-heading); font-size: 15px;
    letter-spacing: 0.18em; text-transform: uppercase; color: #b5d9fd;
}
.help-page .help-hero h1 { margin: 0; font-size: 54px; line-height: 1.05; color: #ffffff; }
.help-page .help-hero-lead { margin: 0; font-size: 21px; max-width: 760px; color: #dfe7ef; text-wrap: pretty; }

/* -- FAQ search -- */
.help-page .help-search { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.help-page .help-search label {
    margin: 0; font-family: var(--font-heading); font-weight: 400;
    font-size: 19px; letter-spacing: 0.02em; color: #ffffff;
}
.help-page .help-search-row { display: flex; gap: 10px; align-items: stretch; }
.help-page .help-search input {
    flex: 1; min-height: 56px; padding: 10px 16px; font-family: var(--font-body);
    font-size: 19px; color: var(--color-text); background: #ffffff;
    border: 2px solid var(--color-accent-400); border-radius: 4px; outline-offset: 2px;
}
.help-page .help-search-clear {
    min-height: 56px; padding: 0 22px; font-family: var(--font-heading); font-size: 18px;
    letter-spacing: 0.02em; color: #ffffff; background: transparent;
    border: 2px solid var(--color-accent-500); border-radius: 4px; cursor: pointer;
    white-space: nowrap; flex: none;
}
.help-page .help-search-clear:hover { background: var(--color-accent-800); }
.help-page .help-search-count { margin: 2px 0 0; font-size: 16px; color: #b5d9fd; min-height: 22px; }

/* -- content grid: sticky section nav + main column -- */
.help-page .help-grid {
    max-width: 1180px; margin: 0 auto; padding: 36px 24px 64px;
    display: grid; grid-template-columns: 268px 1fr; gap: 44px; align-items: start;
}
.help-page .help-menu-btn { display: none; }
.help-page .help-sidenav {
    position: sticky; top: 68px; display: flex; flex-direction: column;
    max-height: calc(100vh - 88px); overflow-y: auto; overflow-x: hidden; padding: 5px;
}
.help-page .help-nav-link {
    display: flex; gap: 10px; align-items: baseline; padding: 11px 10px;
    font-family: var(--font-heading); font-size: 19px; text-decoration: none;
    color: var(--color-text); border-left: 3px solid transparent;
}
.help-page .help-nav-link:hover { background: var(--color-accent-100); border-left-color: var(--color-accent-400); color: var(--color-text); }
.help-page .help-nav-link.active { background: var(--color-accent-100); border-left-color: var(--color-accent); font-weight: 700; }
.help-page .help-nav-link-more { margin-top: 6px; border-top: 1px solid var(--color-divider); color: var(--color-accent-700); }
.help-page .help-nav-link-more:hover { color: var(--color-accent-700); }

/* -- sections -- */
.help-page .help-section { scroll-margin-top: 68px; margin-bottom: 56px; }
.help-page .help-section-guide { scroll-margin-top: 72px; }
.help-page .help-section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    border-bottom: 2px solid var(--color-accent); padding-bottom: 8px; margin-bottom: 8px;
}
.help-page .help-section-head h2 { margin: 0; font-size: 34px; }
.help-page .help-section-num { font-family: var(--font-heading); font-size: 28px; color: var(--color-neutral-400); }

/* -- FAQ question/answer blocks -- */
.help-page .help-qa { padding: 26px 0; border-bottom: 1px solid var(--color-divider); }
.help-page .help-qa h3 {
    margin: 0 0 14px; display: flex; gap: 14px; align-items: flex-start;
    font-size: 26px; line-height: 1.25;
}
.help-page .help-q-badge {
    flex: none; width: 34px; height: 34px; display: grid; place-items: center;
    background: var(--color-accent); color: #ffffff; font-size: 19px;
}
.help-page .help-answer { display: flex; gap: 14px; align-items: flex-start; }
.help-page .help-a-badge {
    flex: none; width: 34px; height: 34px; display: grid; place-items: center;
    border: 1px solid var(--color-accent); color: var(--color-accent-700);
    font-family: var(--font-heading); font-size: 19px;
}

/* -- checklists (square markers) -- */
.help-page .help-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.help-page .help-checklist li { display: flex; gap: 12px; align-items: flex-start; }
.help-page .help-check-box {
    flex: none; width: 20px; height: 20px; margin-top: 5px;
    border: 2px solid var(--color-accent-500);
}
.help-page .help-checklist-sm { gap: 9px; }
.help-page .help-checklist-sm .help-check-box { width: 18px; height: 18px; margin-top: 6px; }
.help-page .help-still .help-checklist-sm .help-check-box { margin-top: 7px; }

/* -- callouts -- */
.help-page .help-note {
    margin-top: 28px; border: 1px solid var(--color-accent); background: var(--color-accent-100);
    padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start;
}
.help-page .help-note-tag {
    flex: none; font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.14em;
    text-transform: uppercase; background: var(--color-accent); color: #ffffff; padding: 5px 10px;
}
.help-page .help-tip {
    margin-top: 16px; border: 1px solid var(--color-accent); background: var(--color-accent-100);
    padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
}
.help-page .help-tip-tag {
    flex: none; font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.16em;
    text-transform: uppercase; background: var(--color-accent); color: #ffffff; padding: 5px 10px;
}
.help-page .help-tip-tag-important { background: var(--color-accent-900); }

/* -- guide steps -- */
.help-page .help-step {
    display: grid; grid-template-columns: 76px 1fr; gap: 20px;
    padding: 26px 0; border-bottom: 1px solid var(--color-divider);
}
.help-page .help-step-num { font-family: var(--font-heading); line-height: 1.1; }
.help-page .help-step-num b { display: block; font-size: 34px; color: var(--color-accent-700); }
.help-page .help-step-num span {
    font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-neutral-700);
}
.help-page .help-steps-list { margin: 0; padding-left: 24px; display: grid; gap: 8px; }

/* -- cards / chips / status dots (guide) -- */
.help-page .help-card { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.help-page .help-card-kicker {
    font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--color-neutral-700);
}
.help-page .help-chip {
    font-family: var(--font-heading); font-size: 16px; letter-spacing: 0.04em;
    border: 1px solid var(--color-accent-400); color: var(--color-accent-700); padding: 6px 12px;
}
.help-page .help-status-dot { width: 14px; height: 14px; border-radius: 50%; }

/* -- "still need help" panel + footer -- */
.help-page .help-still {
    scroll-margin-top: 68px; border: 1px solid var(--color-divider);
    padding: 32px; display: flex; flex-direction: column; gap: 14px;
}
.help-page .help-footer {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--color-divider);
    font-size: 16px; color: var(--color-neutral-700);
}

/* -- CTAs -- */
.help-page .help-cta-primary {
    display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px;
    font-family: var(--font-heading); font-size: 19px; text-decoration: none;
    background: var(--color-accent); color: #ffffff; border: 1px solid var(--color-accent);
}
.help-page .help-cta-primary:hover {
    background: var(--color-accent-700); border-color: var(--color-accent-700); color: #ffffff;
}
.help-page .help-cta-outline {
    display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px;
    font-family: var(--font-heading); font-size: 19px; text-decoration: none;
    color: var(--color-text); border: 1px solid var(--color-divider);
}
.help-page .help-cta-outline:hover {
    background: var(--color-accent-100); border-color: var(--color-accent-400); color: var(--color-text);
}

/* -- back to top -- */
.help-page .help-backtotop {
    position: fixed; right: 24px; bottom: 24px; min-height: 52px; padding: 0 20px;
    font-family: var(--font-heading); font-size: 18px; color: #ffffff;
    background: var(--color-accent-900); border: 1px solid var(--color-accent-700);
    cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
    /* Above the layout footer (which follows in the DOM and would otherwise paint over
       the button and steal its clicks), below the jump-menu layers (50/58) and navbar. */
    z-index: 40;
}
.help-page .help-backtotop:hover { background: var(--color-accent-700); }
.help-page .help-backtotop.visible { opacity: 1; pointer-events: auto; }

/* -- mobile (matches the original runtime's 820px switch) -- */
@media (max-width: 820px) {
    .help-page .help-hero { padding: 24px 18px 26px; }
    .help-page .help-hero h1 { font-size: 34px; line-height: 1.1; }
    .help-page .help-hero-lead { font-size: 18px; }

    .help-page .help-grid { display: block; padding: 20px 18px 56px; }

    .help-page .help-menu-btn {
        position: sticky; top: 50px; z-index: 50; width: 100%; min-height: 56px;
        margin: 0 0 18px; padding: 0 16px; display: flex; align-items: center;
        justify-content: space-between; gap: 12px; font-family: var(--font-heading);
        font-size: 20px; color: #ffffff; background: var(--color-accent); border: 0; cursor: pointer;
    }

    .help-page .help-sidenav { display: none; }
    .help-page .help-sidenav.open {
        position: fixed; top: 106px; left: 12px; right: 12px; z-index: 58;
        display: flex; flex-direction: column; max-height: calc(100vh - 130px);
        overflow-y: auto; background: var(--color-bg); box-shadow: var(--shadow-lg); padding: 0;
    }
}

/* Hosted inside the layout's .container the flex rows (min-width:auto) refuse to shrink,
   which caused horizontal scroll on phones (#542). Wrap and allow shrink at mobile widths
   only; flex-wrap is inert on non-flex elements. */
@media (max-width: 767px) {
    .help-page div { min-width: 0; flex-wrap: wrap; }
}
