/* Help Center layout and article chrome. Shared colors and interaction tokens come from Meridian. */

.help-page {
  padding-top: 48px;
  padding-bottom: clamp(72px, 8vw, 100px);
}

.help-page .text-grey {
  color: var(--text-muted);
}

.help-wrap {
  width: min(var(--max), calc(100% - 72px));
  margin: 0 auto;
}

.help-page-heading {
  margin: 0 0 18px;
}

.help-page-title {
  margin: 0 0 12px;
  font-size: 48px;
  font-weight: 600;
  line-height: 117%;
  letter-spacing: -0.02em;
}

.help-page-kicker {
  display: inline-block;
  margin-bottom: 0;
  padding: 3px 14px 0;
  border: 1px solid var(--border);
  border-radius: 34px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.89;
  letter-spacing: -0.01em;
  color: var(--forest);
  background: var(--surface);
  text-decoration: none;
}

a.help-page-kicker:hover,
a.help-page-kicker:focus-visible {
  border-color: var(--forest);
  background: var(--primary-soft);
}

.help-hero {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.help-hero h1,
.help-hero .help-page-title {
  margin-bottom: 12px;
}

.help-hero__lede {
  margin-bottom: 28px;
}

.help-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.help-toolbar .help-search {
  margin: 0;
  max-width: 360px;
  width: 100%;
}

.help-search {
  position: relative;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.help-search input[type="search"] {
  width: 100%;
  height: 56px;
  padding: 0 56px 0 18px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  color: var(--text-primary);
  background: var(--surface);
  font: inherit;
  transition: border-color var(--motion-fast) var(--ease-standard);
}

.help-search input[type="search"]::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.help-search input[type="search"]:focus {
  border-color: var(--forest);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.help-search input[type="search"]::-webkit-search-cancel-button,
.help-search input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.help-search button[type="submit"] {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--surface);
  background: var(--forest);
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-standard);
}

.help-search button[type="submit"]:hover {
  background: var(--forest-deep);
}

.help-search-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 16px 0 8px;
  font-size: 13px;
}

.help-hero .help-search-hints {
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 0;
}

.help-search-hints__label {
  color: var(--text-muted);
  margin-right: 2px;
}

.help-search-hints a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
}

.help-search-hints a:hover,
.help-search-hints a:focus-visible,
.help-search-hints a.is-active {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--primary-soft);
}

.help-toolbar .help-search input[type="search"] {
  height: 56px;
  border-radius: 8px;
}

.help-toolbar .help-search button[type="submit"] {
  top: 8px;
  width: 40px;
  height: 40px;
}

.help-crumb {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.help-crumb ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.help-crumb a:hover {
  color: var(--forest);
}

.help-crumb__current {
  max-width: min(42ch, 100%);
  overflow: hidden;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-section {
  margin-bottom: 64px;
}

.help-section__head {
  margin-bottom: 20px;
}

.help-section__title {
  margin-bottom: 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.help-section__hint {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

.help-path {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.help-path a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px 28px;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

.help-path a:first-child {
  border-top: 0;
}

.help-path a:hover,
.help-path a:focus-visible {
  background: var(--primary-soft);
}

.help-path__num {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}

.help-path a:hover .help-path__num,
.help-path a:focus-visible .help-path__num {
  background: var(--forest);
  color: var(--surface);
}

.help-path--plain a {
  grid-template-columns: minmax(0, 1fr);
}

.help-path__title {
  display: block;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.help-path__excerpt {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
}

.help-concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.help-card {
  display: block;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: box-shadow var(--motion-panel) var(--ease-out), border-color var(--motion-fast) var(--ease-standard);
}

.help-card:hover,
.help-card:focus-visible {
  border-color: var(--forest);
  box-shadow: 0 14px 40px 0 color-mix(in srgb, var(--forest) 10%, transparent);
}

.help-card__kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--forest);
}

.help-card__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 130%;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.help-card__excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

.help-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.help-topic {
  display: block;
  height: 100%;
  padding: 28px 24px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: box-shadow var(--motion-panel) var(--ease-out), border-color var(--motion-fast) var(--ease-standard);
}

.help-topic:hover,
.help-topic:focus-visible {
  border-color: var(--forest);
  box-shadow: 0 14px 40px 0 color-mix(in srgb, var(--forest) 10%, transparent);
}

.help-topic__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--forest);
}

.help-topic:hover .help-topic__icon,
.help-topic:focus-visible .help-topic__icon {
  background: var(--primary-soft);
}

.help-topic__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.help-topic__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.help-guide-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.help-guide-list a {
  display: block;
  padding: 22px 28px;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

.help-guide-list a:first-child {
  border-top: 0;
}

.help-guide-list a:hover,
.help-guide-list a:focus-visible {
  background: var(--primary-soft);
}

.help-path a:focus-visible,
.help-guide-list a:focus-visible {
  outline-offset: -4px;
}

.help-guide-list__title {
  display: block;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.help-guide-list__excerpt {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
}

.help-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-search-count {
  margin: -8px 0 24px;
  font-size: 15px;
  color: var(--text-muted);
}

.help-category-head {
  margin-bottom: 28px;
}

.help-category-head .help-page-title {
  margin-bottom: 8px;
}

.help-category-head__lede {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

.help-cta {
  padding: 40px 36px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.help-cta h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
}

.help-cta p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.help-empty {
  padding: 40px 36px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.help-empty h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
}

.help-empty p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.help-article-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.help-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  order: -1;
}

.help-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 44px 48px;
}

@media (min-width: 992px) {
  .help-article-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
    align-items: start;
  }

  .help-sidebar {
    order: 0;
    position: sticky;
    top: 112px;
  }

  .help-toc summary {
    pointer-events: none;
    cursor: default;
  }

  .help-toc summary::after {
    display: none;
  }

  .help-toc nav {
    display: block !important;
  }
}

.help-article-title {
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 600;
  line-height: 117%;
  letter-spacing: -0.02em;
}

.help-lede {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

.help-panel {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
}

.help-panel h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.help-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-panel a {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary);
  text-decoration: none;
}

.help-panel a:hover {
  color: var(--forest);
}

.help-toc summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.help-toc summary::-webkit-details-marker {
  display: none;
}

.help-toc summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  flex-shrink: 0;
}

.help-toc[open] summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.help-toc nav {
  margin-top: 12px;
}

.help-toc a {
  display: block;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.help-toc a:hover,
.help-toc a:focus-visible,
.help-toc a.is-active {
  border-left-color: var(--forest);
  color: var(--forest);
  background: var(--primary-soft);
}

.help-toc a.is-active {
  font-weight: 600;
}

.help-support-cta p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.help-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.help-pager__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-decoration: none;
}

.help-pager__link--next {
  text-align: right;
  justify-self: end;
}

.help-pager__dir {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.help-pager__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

.help-pager__link:hover .help-pager__title {
  color: var(--forest);
}

.help-article-body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.help-article-body .help-block {
  margin: 0 0 22px;
  overflow-x: auto;
}

.help-article-body .help-block:last-child {
  margin-bottom: 0;
}

.help-article-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  scroll-margin-top: 7rem;
}

.help-article-body h3 {
  margin: 18px 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  scroll-margin-top: 7rem;
}

.help-article-body p {
  margin-bottom: 12px;
}

.help-article-body ul,
.help-article-body ol {
  margin: 0 0 12px;
  padding-left: 1.5rem;
}

.help-article-body ul {
  list-style: disc;
}

.help-article-body ol {
  list-style: decimal;
}

.help-article-body li+li {
  margin-top: 8px;
}

.help-article-body li>ul,
.help-article-body li>ol {
  margin: 8px 0 0;
}

.help-article-body a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.help-article-body strong {
  color: var(--text-primary);
}

.help-block--prep,
.help-block--important,
.help-block--problems {
  padding: 16px 18px 6px;
  border-radius: var(--radius-card);
}

.help-block--prep {
  background: var(--surface-muted);
}

.help-block--important {
  background: var(--primary-soft);
  border-left: 3px solid var(--forest);
}

.help-block--problems {
  background: var(--surface-muted);
  border-left: 3px solid var(--accent);
}

.help-block--prep h2,
.help-block--important h2,
.help-block--problems h2 {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.help-article-body table {
  width: 100%;
  margin: 4px 0 14px;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}

.help-article-body th,
.help-article-body td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.help-article-body th {
  background: var(--surface-muted);
  font-weight: 600;
  color: var(--text-primary);
}

.help-article-body code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-muted);
  font-size: 14px;
}

.help-mark {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--primary-on-dark);
  color: var(--text-primary);
}

@media (max-width: 991px) {
  .help-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-toc {
    position: sticky;
    top: 80px;
    z-index: 4;
  }
}

@media (max-width: 1199px) {
  .help-page {
    padding-top: 48px;
  }
}

@media (max-width: 767px) {
  .help-wrap {
    width: calc(100% - 40px);
  }

  .help-page {
    padding-top: 40px;
  }

  .help-page-title {
    font-size: 36px;
  }

  .help-section__title {
    font-size: 24px;
  }

  .help-topic-grid {
    grid-template-columns: 1fr;
  }

  .help-article-title {
    font-size: 28px;
  }

  .help-article {
    padding: 24px 20px 32px;
  }

  .help-path a,
  .help-guide-list a {
    padding: 18px 20px;
  }

  .help-pager {
    grid-template-columns: 1fr;
  }

  .help-pager__link--next {
    text-align: left;
    justify-self: stretch;
  }

  .help-cta,
  .help-empty {
    padding: 28px 20px;
  }
}
