/* Help Center — components layered on the shared site design system. */

/* Breadcrumbs */

.crumbs {
  padding-top: 22px;
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 6px;
  color: #a7b6ac;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
}

/* Help search */

.help-search {
  max-width: 640px;
  margin-top: 26px;
  position: relative;
}

.help-search label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.help-search input {
  width: 100%;
  border: 1px solid #cbd9cf;
  border-radius: 999px;
  padding: 14px 48px 14px 20px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.help-search input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(71,121,99,.15);
}

.help-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  margin-top: 13px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  display: none;
}

.help-search-clear:hover {
  background: var(--green-soft);
  color: var(--ink);
}

.help-search.has-value .help-search-clear {
  display: grid;
  place-items: center;
}

.help-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 15;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

.help-search-results:empty {
  display: none;
}

.help-search-results a {
  display: block;
  padding: 10px 14px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 14px;
}

.help-search-results a small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.help-search-results a:hover,
.help-search-results a.active {
  background: var(--green-pale);
  color: var(--green-dark);
}

.help-search-none {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
}

/* Category cards */

.help-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.help-cat {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(34,62,48,.035);
  transition: transform .16s ease, border-color .16s ease;
}

.help-cat:hover {
  transform: translateY(-2px);
  border-color: #b9cfbf;
}

.help-cat h3 {
  margin: 0 0 7px;
  font-size: 17px;
  color: var(--ink);
}

.help-cat p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.help-cat .card-icon {
  margin-bottom: 14px;
  width: 40px;
  height: 40px;
  font-size: 19px;
}

/* Popular guides */

.popular-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
  transition: border-color .16s ease;
}

.popular-list a:hover {
  border-color: #b9cfbf;
  color: var(--green-dark);
}

.popular-list a::before {
  content: "→";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
}

/* Guide page layout */

.guide-head h1 {
  font-size: clamp(34px, 4.6vw, 50px);
  margin: 14px 0 14px;
  max-width: 800px;
}

.guide-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 8px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 780px);
  gap: 45px;
  align-items: start;
  padding: 26px 0 30px;
}

.guide-toc {
  font-size: 13px;
}

.guide-body h2 {
  scroll-margin-top: 110px;
}

.guide-body ol.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin: 18px 0;
}

.guide-body ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 46px;
  margin: 0;
}

.guide-body ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 14px;
}

.guide-body ol.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.guide-body kbd.ui {
  font-family: inherit;
  font-size: .92em;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-pale);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* Related + pager + support card */

.guide-related {
  max-width: 780px;
  margin-top: 10px;
}

.guide-related ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.guide-related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
}

.guide-related a::after {
  content: "→";
  color: var(--green);
  font-weight: 800;
}

.guide-related a:hover {
  border-color: #b9cfbf;
  color: var(--green-dark);
}

.guide-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 34px 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.guide-pager a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  max-width: 45%;
}

.guide-pager a span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
}

.guide-pager .next {
  text-align: right;
  margin-left: auto;
}

.guide-support {
  max-width: 780px;
  margin-bottom: 80px;
}

.guide-support h2 {
  font-size: 22px;
}

/* Responsive */

@media (max-width: 980px) {
  .help-cats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .help-cats,
  .popular-list {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    display: block;
    padding-top: 16px;
  }

  .guide-toc {
    position: static;
    margin-bottom: 26px;
  }

  .guide-pager {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .guide-pager a,
  .guide-pager .next {
    max-width: 100%;
    text-align: left;
  }
}
