/* The Help pages (DESK-158), in the app and on the site. Zara's board: design-kit/mockups/board-desk158-help-hifi.png.
   Kit tokens only; no motion of its own (page changes use the kit's cross-fade). */
.help-page, .app-page.help-page { display: block; max-width: 1000px; margin: 0 auto; padding-top: var(--space-lg); padding-bottom: var(--space-xl); }

/* Phone: the list, or one topic with a breadcrumb back. */
.help-page[data-topic=""] .help-article { display: none; }
.help-page:not([data-topic=""]) .help-index { display: none; }

.help-page .help-heading { color: var(--color-text-primary); font-size: var(--font-size-display); line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
.help-subline { color: var(--color-text-secondary); margin-top: 4px; }
.help-list { list-style: none; margin: var(--space-lg) 0 0; padding: 0; background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card); overflow: hidden; }
.help-list li + li { border-top: 1px solid var(--color-border-subtle); }
.help-topic { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
  min-height: 48px; padding: var(--space-sm) var(--space-md); color: var(--color-text-primary); text-decoration: none; }
a.help-topic:hover { background: var(--color-surface-raised); }
.help-topic[aria-current="page"] { color: var(--color-lane-coordinator); }
.help-muted { color: var(--color-text-muted); }

.help-chevron { flex: none; width: 7px; height: 7px; border: solid var(--color-text-muted); border-width: 0 1.5px 1.5px 0; }
.help-chevron[data-dir="right"] { transform: rotate(-45deg); }
.help-chevron[data-dir="left"] { transform: rotate(135deg); border-color: currentColor; }

.help-article { display: grid; gap: var(--space-md); max-width: 728px; }
.help-crumb { display: inline-flex; align-items: center; gap: var(--space-xs); justify-self: start; min-height: 32px;
  color: var(--color-lane-coordinator); text-decoration: none; }
/* DESK-301: the crumb is 32 px tall; an invisible 44 px hit area takes the tap without moving anything. */
.help-crumb { position: relative; }
.help-crumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; min-width: 44px; min-height: 44px; transform: translate(-50%, -50%); }
.help-page .help-title { color: var(--color-text-primary); font-size: var(--font-size-display); line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
.help-page .help-title:focus { outline: none; }
.help-p, .help-bullets li { color: var(--color-text-secondary); line-height: 22px; }
.help-article strong { color: var(--color-text-primary); font-weight: 600; }
.help-p[id] { scroll-margin-top: var(--space-lg); }

.help-steps { list-style: none; margin: 0; padding: var(--space-xs) var(--space-md); counter-reset: step;
  background: var(--color-surface-subtle); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card); }
.help-steps li { counter-increment: step; position: relative; padding: var(--space-sm) 0 var(--space-sm) 36px; }
.help-steps li + li { border-top: 1px solid var(--color-border-subtle); }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: var(--space-sm); width: 22px; height: 22px;
  border-radius: 50%; background: var(--color-surface-raised); color: var(--color-text-secondary);
  font-size: var(--font-size-meta); line-height: 22px; text-align: center; }
.help-step-rest { display: block; color: var(--color-text-secondary); margin-top: 2px; }

.help-bullets { margin: 0; padding: 0; list-style: none; }
.help-bullets li { position: relative; padding: var(--space-xs) 0 var(--space-xs) var(--space-md); }
.help-bullets li + li { border-top: 1px solid var(--color-border-subtle); }
.help-bullets li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-text-muted); }

.help-chip { display: inline-block; padding: 2px var(--space-xs); border-radius: 999px;
  font-size: var(--font-size-meta); font-weight: 600; line-height: 16px; vertical-align: 1px; }
.help-chip[data-tone="red"] { background: var(--color-status-failed-bg); color: var(--color-status-failed-text); }
.help-chip[data-tone="amber"] { background: var(--color-status-review-bg); color: var(--color-status-review-text); }
.help-chip[data-tone="slate"] { background: var(--color-status-uncheck-bg); color: var(--color-status-uncheck-text); }

.help-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); }
.help-strip span { padding: 6px 0; border-radius: var(--radius-button); background: var(--color-surface-raised);
  color: var(--color-text-primary); font-size: var(--font-size-meta); font-weight: 600; text-align: center; }
.help-strip span[data-current] { background: var(--color-status-passed-bg); color: var(--color-status-passed-text); }

.help-proof-link { color: var(--color-lane-coordinator); justify-self: start; }

/* Laptop: the list on the left, the topic on the right. */
@media (min-width: 900px) {
  .help-page, .app-page.help-page { display: grid; grid-template-columns: 220px minmax(0, 728px); gap: var(--space-xl) 48px; align-items: start; }
  .help-page[data-topic] .help-index, .help-page[data-topic] .help-article { display: grid; }
  .help-index { align-content: start; }
  .help-page .help-index .help-heading { font-size: var(--font-size-h1); line-height: 32px; }
  .help-subline { font-size: var(--font-size-meta); }
  .help-list { margin-top: var(--space-md); }
  .help-list .help-chevron { display: none; }
  .help-crumb { display: none; }
}
