@layer components {
  /* A bounded workspace with independent navigation and article scrolling. */
  .help-dialog { max-width: 1240px; height: min(960px, calc(100dvh - 32px)); }
  .help-shell { padding-inline: var(--ui-gutter); background: var(--ui-surface); border-radius: 16px; min-height: 0; }
  .app-shell-docked .help-shell { padding-inline: 0; }
  .help-shell > .ui-page-header { min-height: 104px; padding-block: 24px; }
  .help-body-wrap { flex: 1 1 0%; min-height: 0; padding: 0; overflow: hidden; }
  .help-body { width: 100%; height: 100%; min-width: 0; min-height: 0; }
  .help-center { display: grid; grid-template-columns: 256px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; color: var(--ui-text); }
  .help-sidebar { position: relative; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 28px 24px 40px 0; border-right: 1px solid var(--app-shell-line, var(--ui-line)); }
  .help-search { margin-bottom: 32px; }
  .help-search .ui-label, .help-mobile-menu .ui-label { display: block; margin-bottom: 10px; }
  .help-search-field { position: relative; }
  .help-search-field input { width: 100%; padding-right: 42px; font-size: 13px; min-height: 46px; }
  .help-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
  .help-search-clear { position: absolute; right: 3px; top: 3px; bottom: 3px; min-height: 40px; width: 40px; padding: 0; font-size: 22px; }
  .help-search-status { font-size: 12px; margin: 10px 0 0; }
  .help-search-status:empty { display: none; }
  .help-mobile-menu { display: none; }
  .help-navigation { display: grid; gap: 28px; }
  .help-nav-group { display: grid; gap: 4px; }
  .help-nav-group > p { margin: 0 0 8px; padding-left: 14px; font-size: 10px; line-height: 1.6; }
  .help-nav-link { display: block; width: 100%; min-height: 44px; padding: 11px 12px; border: 0; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; background: transparent; color: var(--ui-muted); font: inherit; font-size: 14px; font-weight: 500; line-height: 1.6; text-align: left; cursor: pointer; }
  .help-nav-link:hover { color: var(--ui-text); background: rgba(148,163,184,.08); }
  .help-nav-link[aria-current="page"] { color: var(--ui-blue); background: rgba(59,130,246,.1); border-left-color: var(--ui-blue); font-weight: 700; }
  .help-reader { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 40px clamp(28px, 4vw, 64px) 56px; scrollbar-gutter: stable; }
  .help-article, .help-support { max-width: 720px; margin-inline: auto; overflow-wrap: anywhere; }
  .help-article-header { margin-bottom: 32px; }
  .help-article-header > .ui-kicker { margin: 0 0 18px; font-size: 10px; line-height: 1.8; }
  .help-article-header h3 { margin: 0 0 18px; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; font-weight: 750; letter-spacing: -.025em; text-wrap: balance; }
  .help-lead { margin: 0; font-size: 16px; line-height: 1.85; }
  .help-shortcuts { margin: 0 0 36px; }
  .help-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; cursor: pointer; transition: border-color .15s ease; }
  .help-card:hover { border-color: var(--ui-accent, var(--ui-blue)); }
  .help-card .ui-kicker { font-size: 10px; line-height: 1.6; }
  .help-card .ui-card-title { font-size: 15px; }
  .help-card .ui-card-copy { font-size: 13px; line-height: 1.8; }
  .help-toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; padding: 24px 0; border-top: 1px solid var(--app-shell-line, var(--ui-line)); border-bottom: 1px solid var(--app-shell-line, var(--ui-line)); margin-bottom: 40px; }
  .help-toc > p { grid-column: 1 / -1; margin: 0 0 4px; font-size: 10px; }
  .help-toc a, .help-support-links > a:not(.ui-button) { color: var(--ui-blue); font-size: 13px; text-underline-offset: 4px; text-decoration: underline; line-height: 1.8; }
  .help-block { margin-bottom: 40px; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
  .help-block + .help-block { padding-top: 32px; border-top: 1px solid var(--app-shell-line, var(--ui-line)); }
  .help-block h4, .help-related h4, .help-empty h4 { margin: 0 0 20px; font-size: 20px; font-weight: 700; line-height: 1.5; }
  .help-block p { margin: 0 0 18px; }
  .help-block ul, .help-block ol { padding-left: 24px; margin: 18px 0; }
  .help-block ul { list-style: disc; }
  .help-block ol { list-style: decimal; }
  .help-block li { padding-left: 10px; margin-bottom: 18px; }
  .help-block li::marker { color: var(--ui-blue); font-weight: 700; }
  .help-tip { margin-top: 28px; font-size: 14px; line-height: 1.85; }
  .help-tip strong { display: block; color: var(--ui-amber); margin-bottom: 8px; }
  .help-tip p { margin: 0; }
  .help-related { border-top: 1px solid var(--app-shell-line, var(--ui-line)); padding-top: 32px; margin-top: 44px; }
  .help-pagination { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 32px; }
  .help-pagination .ui-button { font-size: 13px; align-items: center; white-space: normal; line-height: 1.6; }
  .help-pagination small { display: block; color: var(--ui-muted); font-size: 11px; font-weight: 400; margin-bottom: 4px; }
  .help-previous { justify-content: flex-start; text-align: left; }
  .help-next { justify-content: flex-end; text-align: right; }
  .help-support { margin-top: 40px; border-top: 1px solid var(--app-shell-line, var(--ui-line)); padding-top: 28px; font-size: 13px; line-height: 1.8; }
  .help-support > p { margin: 10px 0 18px; }
  .help-support-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
  .help-empty { display: grid; justify-items: start; gap: 16px; }
  .help-empty p, .help-empty h4 { margin: 0; }
  .help-center :is(a, button, input, select, [tabindex]):focus-visible { outline: 2px solid var(--ui-blue); outline-offset: 3px; }
  .help-reader:focus-visible { outline-offset: -3px; }
  .help-center [hidden] { display: none; }

  @media (max-width: 1100px) {
    .help-center { grid-template-columns: 224px minmax(0, 1fr); }
    .help-sidebar { padding-right: 16px; }
    .help-reader { padding-inline: 28px 12px; }
    .help-center .ui-grid, .help-toc { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 1023px) {
    .help-shell > .ui-page-header { flex-wrap: nowrap; min-height: 76px; gap: 12px; padding-block: 16px; }
    .help-shell .ui-page-header h2 { font-size: 20px; }
    .help-shell .ui-page-header p { display: none; }
    .help-center { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .help-sidebar { overflow: visible; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--app-shell-line, var(--ui-line)); }
    .help-search { margin: 0 0 14px; }
    .help-search .ui-label, .help-mobile-menu .ui-label { font-size: 11px; margin-bottom: 6px; }
    .help-search-field input { font-size: 16px; }
    .help-navigation { display: none; }
    .help-mobile-menu { display: block; }
    .help-mobile-menu select { width: 100%; min-height: 46px; font-size: 16px; text-overflow: ellipsis; }
    .help-reader { padding: 28px 4px 40px; scrollbar-gutter: auto; }
    .help-article-header { margin-bottom: 28px; }
    .help-article-header h3 { font-size: 28px; }
    .help-lead { font-size: 15px; line-height: 1.8; }
    .help-block { font-size: 15px; margin-bottom: 32px; }
    .help-block + .help-block { padding-top: 28px; }
    .help-block h4 { font-size: 19px; }
    .help-toc { row-gap: 14px; margin-bottom: 32px; }
    .help-pagination { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-height: 600px) and (max-width: 1023px) {
    .help-sidebar { padding-block: 10px; }
    .help-search .ui-label, .help-mobile-menu .ui-label { display: none; }
    .help-search { margin-bottom: 8px; }
  }
}
