/* The help center (apps/help): Neutral's semantic tokens only, ink on zinc, one accent for links and focus. Light,
   dark and high contrast come from the visitor's system settings (theme.js). */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
main:focus {
  outline: none;
}
a {
  color: var(--text-link);
}
a:hover {
  color: var(--text-link-hover);
}
:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}
svg {
  flex: none;
}
.hc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.hc-skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 30;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  background: var(--surface-inverse);
  color: var(--text-inverse);
}
.hc-skip:focus {
  top: 12px;
}
.hc-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.hc-narrow {
  max-width: 800px;
  padding-top: 40px;
  padding-bottom: 72px;
}
.hc-muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Bar ---------- */

.hc-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
}
.hc-bar__in {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.hc-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  text-decoration: none;
  border-radius: var(--radius-control);
}
.hc-lockup:hover {
  color: var(--text-strong);
}
.hc-lockup__mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.hc-lockup__name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.hc-lockup__name > :first-child {
  font-size: 15px;
  font-weight: var(--fw-bold);
}
.hc-lockup__name > :last-child {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: var(--fw-medium);
}
.hc-lockup__help {
  padding-left: 12px;
  border-left: 1px solid var(--border-default);
  font-size: 16px;
  font-weight: var(--fw-semibold);
}
.hc-portal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  white-space: nowrap;
}
.hc-portal:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
}
.hc-bar .hc-search {
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}
.hc-bar .hc-search + .hc-theme,
.hc-bar .hc-search + .hc-portal {
  margin-left: 0;
}

/* ---------- Theme switch: light, dark, system ---------- */

.hc-theme {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-canvas);
}
.hc-theme[hidden] {
  display: none;
}
.hc-theme + .hc-portal {
  margin-left: 0;
}
.hc-theme button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}
.hc-theme button:hover {
  color: var(--text-strong);
}
.hc-theme button[aria-pressed="true"] {
  background: var(--surface-card);
  color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* ---------- Search field ---------- */

.hc-search {
  position: relative;
  display: flex;
  align-items: center;
}
.hc-search svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.hc-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  color: var(--text-strong);
  font: inherit;
  font-size: 14px;
}
.hc-search input::placeholder {
  color: var(--text-placeholder);
}
.hc-search input:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 0;
  border-color: transparent;
}
.hc-search--lg input {
  height: 56px;
  padding-left: 48px;
  border-radius: 12px;
  font-size: 17px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.hc-search--lg svg {
  left: 16px;
}

/* ---------- Home ---------- */

/* A very light tone behind the search: the page's ink at a few percent over the card surface, so it reads as a band
   in light and dark without a colour of its own. */
.hc-hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, var(--surface-card), transparent 70%),
    color-mix(in srgb, var(--text-strong) 4%, var(--surface-card));
  border-bottom: 1px solid var(--border-default);
}
.hc-hero .hc-search input {
  background: var(--surface-card);
}
.hc-hero__in {
  max-width: 720px;
  text-align: center;
}
.hc-hero__title {
  margin: 0 0 12px;
  color: var(--text-strong);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: var(--fw-semibold);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hc-hero__lead {
  margin: 0 auto 32px;
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 17px;
}
.hc-instant {
  margin-top: 12px;
  text-align: left;
}
.hc-instant__status {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
}
.hc-home {
  padding-top: 56px;
  padding-bottom: 80px;
}
.hc-h1 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.hc-h2 {
  margin: 0 0 16px;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: var(--fw-semibold);
  line-height: 1.3;
}
.hc-lead {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.5;
}
.hc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card-lg);
  background: var(--surface-card);
  color: var(--text-body);
  text-decoration: none;
  transition:
    border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}
.hc-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px -8px rgba(0, 0, 0, 0.16);
  color: var(--text-body);
}
.hc-card__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--surface-sunken);
  color: var(--text-strong);
}
.hc-card__icon--lg {
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 12px;
}
.hc-card__title {
  color: var(--text-strong);
  font-size: 17px;
  font-weight: var(--fw-semibold);
}
.hc-card__blurb {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}
.hc-card__count {
  margin-top: auto;
  padding-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}
.hc-popular {
  margin-top: 56px;
}

/* ---------- Lists of articles ---------- */

.hc-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  overflow: hidden;
}
.hc-rows li + li {
  border-top: 1px solid var(--border-default);
}
.hc-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  color: var(--text-body);
  text-decoration: none;
}
.hc-row:hover {
  background: var(--surface-hover);
  color: var(--text-body);
}
.hc-row:focus-visible {
  outline-offset: -2px;
}
.hc-row svg {
  margin-left: auto;
  color: var(--text-muted);
}
.hc-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hc-row__title {
  color: var(--text-strong);
  font-weight: var(--fw-medium);
}
.hc-row__summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.hc-row__meta {
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Collection ---------- */

.hc-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.hc-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.hc-crumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}
.hc-crumbs a:hover {
  color: var(--text-strong);
  text-decoration: underline;
}
.hc-collection {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}
.hc-collection .hc-muted {
  margin: 4px 0 0;
}

/* ---------- Article ---------- */

.hc-article {
  display: grid;
  grid-template-columns: minmax(0, 720px) 220px;
  justify-content: space-between;
  gap: 56px;
  padding-top: 40px;
  padding-bottom: 72px;
}
.hc-article__main {
  min-width: 0;
}
.hc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 14px;
}
.hc-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-top: 52px;
  font-size: 14px;
}
.hc-toc__title {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
}
.hc-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--border-default);
}
.hc-toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  line-height: 1.4;
  text-decoration: none;
}
.hc-toc a:hover {
  color: var(--text-strong);
}
.hc-toc a[aria-current="true"] {
  border-left-color: var(--text-strong);
  color: var(--text-strong);
  font-weight: var(--fw-medium);
}
.hc-related {
  margin-top: 56px;
}

/* ---------- Prose ---------- */

.hc-prose {
  padding-top: 8px;
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.7;
}
.hc-prose :is(h2, h3) {
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
}
.hc-prose h2 {
  margin: 40px 0 12px;
  font-size: 22px;
}
.hc-prose h3 {
  margin: 28px 0 8px;
  font-size: 18px;
}
.hc-prose p {
  margin: 0 0 16px;
}
.hc-prose :is(ul, ol) {
  margin: 0 0 16px;
  padding-left: 24px;
}
.hc-prose li + li {
  margin-top: 6px;
}
.hc-prose li > :is(ul, ol) {
  margin: 6px 0 0;
}
.hc-prose li > p {
  margin-bottom: 6px;
}
.hc-prose strong {
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
}
.hc-prose a {
  text-underline-offset: 2px;
}
.hc-prose :not(pre) > code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-sunken);
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.hc-prose blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface-sunken);
}
.hc-prose blockquote > :last-child {
  margin-bottom: 0;
}
.hc-prose hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--border-default);
}
.hc-prose pre.md-code {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-sunken);
  color: var(--text-strong);
  font: 13.5px/1.65 var(--font-mono);
  tab-size: 2;
}
.hc-prose pre.md-code code {
  font: inherit;
}
/* Code in one colour; comments quieter (sugar-high's classes). */
.hc-prose pre.md-code [class*="sh__token--comment"] {
  color: var(--text-muted);
}
.hc-prose .md-table {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
}
.hc-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.hc-prose :is(th, td) {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-default);
  text-align: left;
  vertical-align: top;
}
.hc-prose th {
  background: var(--surface-sunken);
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
}
.hc-prose tr:last-child td {
  border-bottom: 0;
}
.hc-prose li.md-task {
  list-style: none;
}
.hc-prose .pf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Footer, 404 ---------- */

.hc-footer {
  border-top: 1px solid var(--border-default);
  background: var(--surface-card);
}
.hc-footer__in {
  padding-top: 32px;
  padding-bottom: 40px;
}
.hc-footer p {
  margin: 0 0 8px;
}
.hc-404 .hc-search {
  margin: 24px 0;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1000px) {
  .hc-article {
    grid-template-columns: minmax(0, 1fr);
  }
  .hc-toc {
    display: none;
  }
}
@media (max-width: 760px) {
  .hc-bar .hc-search {
    display: none;
  }
  .hc-bar__in {
    gap: 12px;
  }
}
@media (max-width: 560px) {
  /* Phones: the arrow alone; the link keeps its name for screen readers. */
  .hc-portal {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .hc-portal__text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .hc-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hc-lockup__name {
    display: none;
  }
  .hc-lockup__help {
    padding-left: 0;
    border-left: 0;
  }
  .hc-hero {
    padding: 48px 0 40px;
  }
  .hc-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .hc-card {
    padding: 20px;
  }
  .hc-collection {
    flex-direction: column;
    gap: 12px;
  }
  .hc-row {
    padding: 14px 16px;
  }
}
