/* Help: documentation. A grouped section list, one article at a time, an "on this page" rail. Tokens only. */
.help-main {
  padding-top: 26px;
}
.help-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1336px;
  margin-bottom: 22px;
}
.help-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 640px;
}
.help-hero h1 {
  margin: 0;
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -1.2px;
}
.help-hero .intro {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  max-width: 440px;
  padding: 10px 14px;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  background: var(--surface-raised);
  box-shadow: var(--el-1);
  transition: border-color var(--dur-2) var(--ease-out);
}
/* The box shows focus, so the field inside draws no second ring. */
.help-search:focus-within {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 18%, transparent);
}
.help-search input:focus-visible {
  outline: none;
}
.help-search .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}
.help-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.help-search kbd {
  padding: 1px 7px;
  border: 1px solid var(--edge-strong);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.help-search:focus-within kbd {
  display: none;
}
@media (pointer: coarse) {
  .help-search kbd {
    display: none;
  }
}

/* Three columns: section list, article, on this page. */
.help-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 840px) 200px;
  gap: 24px;
  align-items: start;
}
.help-toc,
.help-onpage {
  position: sticky;
  top: 16px;
}
.help-toc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 10px;
}
.help-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.help-group-label {
  margin: 0 0 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.help-toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition:
    color var(--dur-1) var(--ease-out),
    background var(--dur-1) var(--ease-out);
}
.help-toc a .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.help-toc a:hover,
.help-toc a:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.help-toc a[aria-current='true'] {
  color: var(--text);
  background: color-mix(in srgb, var(--ember) 10%, transparent);
  border-color: color-mix(in srgb, var(--ember) 35%, transparent);
}
.help-toc a[aria-current='true'] .icon {
  color: var(--ember);
}
.help-toc a[hidden],
.help-group[hidden],
.help-section[hidden],
.help-empty[hidden],
.help-pager[hidden],
.help-onpage[hidden] {
  display: none;
}

/* The article. */
.help-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.help-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
}
.help-section {
  padding: 32px 40px 36px;
  scroll-margin-top: 16px;
  animation: help-in var(--dur-3) var(--ease-out);
}
@keyframes help-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .help-section {
    animation: none;
  }
}
.help-crumb {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
}
.help-page .help-section h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.6px;
}
.help-section h3 {
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--edge);
  font-size: 18px;
  scroll-margin-top: 16px;
}
.help-section h3:first-of-type {
  margin-top: 24px;
}
.help-section p,
.help-section li,
.help-section dd {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-secondary);
}
.help-section p {
  margin: 0 0 14px;
}
.help-section ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.help-section li {
  margin-bottom: 8px;
}
.help-section li::marker {
  color: var(--ember);
}
.help-section strong {
  color: var(--text);
}
.help-section a {
  color: var(--ice);
}
.help-section code {
  padding: 1px 6px;
  border: 1px solid var(--edge);
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Numbered steps: a badge on each step, joined by a line. */
.help-section ol {
  counter-reset: step;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.help-section ol > li {
  position: relative;
  counter-increment: step;
  margin: 0;
  padding: 2px 0 18px 44px;
}
.help-section ol > li:last-child {
  padding-bottom: 2px;
}
.help-section ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--ember) 45%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ember) 12%, transparent);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.help-section ol > li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 32px;
  bottom: 4px;
  width: 1px;
  background: var(--edge);
}

/* Callout. */
.help-note {
  margin: 18px 0 0;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--ember) 28%, transparent);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--ember) 7%, transparent);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.help-note::before {
  content: 'Good to know';
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
}

/* Jump cards on the first page. */
.help-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.help-section a.help-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas:
    'icon title'
    'icon sub';
  column-gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out);
}
.help-card:hover,
.help-card:focus-visible {
  border-color: color-mix(in srgb, var(--ember) 55%, transparent);
  background: color-mix(in srgb, var(--ember) 6%, transparent);
}
.help-card .icon {
  grid-area: icon;
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--ember) 12%, transparent);
  color: var(--ember);
}
.help-card b {
  grid-area: title;
  font-size: 15px;
}
.help-card span {
  grid-area: sub;
  font-size: 13px;
  color: var(--muted);
}

/* Tables and tags. */
.help-table {
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.help-table th,
.help-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--edge);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
  color: var(--ink-secondary);
}
.help-table tbody tr:last-child td {
  border-bottom: 0;
}
.help-table th {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.help-table td:first-child {
  width: 34%;
  color: var(--text);
}
.help-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  border: 1px solid var(--edge-strong);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  color: var(--muted);
}
.help-tag.is-required {
  border-color: color-mix(in srgb, var(--ember) 50%, transparent);
  background: color-mix(in srgb, var(--ember) 12%, transparent);
  color: var(--text);
}

/* Definitions: term beside description. */
.help-defs {
  display: grid;
  margin: 0;
}
.help-defs > div {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--edge);
}
.help-defs > div:first-child {
  border-top: 0;
  padding-top: 0;
}
.help-defs dt {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.help-defs dd {
  margin: 0;
}

/* FAQ. */
.help-faqs {
  display: grid;
  gap: 10px;
}
.help-faq {
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.help-faq[open] {
  border-color: color-mix(in srgb, var(--ember) 35%, transparent);
}
.help-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.help-faq summary::-webkit-details-marker {
  display: none;
}
.help-faq summary::after {
  content: '+';
  flex: none;
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
}
.help-faq[open] summary::after {
  content: '\2212';
  color: var(--ember);
}
.help-faq p {
  margin: 0;
  padding: 0 18px 16px;
}

/* Previous and next. */
.help-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.help-pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-out);
}
.help-pager a:hover,
.help-pager a:focus-visible {
  border-color: color-mix(in srgb, var(--ember) 55%, transparent);
}
.help-pager a:last-child:not(:first-child) {
  grid-column: 2;
  text-align: right;
}
.help-pager small {
  font-size: 12px;
  color: var(--muted);
}
.help-pager b {
  font-size: 15px;
  color: var(--text);
}

/* On this page. */
.help-onpage {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--edge);
}
.help-onpage p {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.help-onpage a {
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}
.help-onpage a:hover,
.help-onpage a:focus-visible {
  color: var(--text);
}

@media (max-width: 1280px) {
  .help-grid {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .help-onpage {
    display: none;
  }
}
@media (max-width: 900px) {
  .help-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-toc {
    position: static;
    flex-direction: row;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
  }
  .help-group {
    flex-direction: row;
    flex: none;
    gap: 4px;
  }
  .help-group-label {
    display: none;
  }
  .help-toc a {
    flex: none;
    white-space: nowrap;
  }
  .help-section {
    padding: 22px 20px 26px;
  }
  .help-table td:first-child {
    width: auto;
  }
  .help-cards,
  .help-pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-pager a:last-child:not(:first-child) {
    grid-column: 1;
  }
  .help-defs > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
