/* ============================================================
   The Help Center — /help, /help/{product}, /help/{guide}
   Built on the marketing tokens, so the dark theme follows on
   its own. Loaded only by the help views.
   ============================================================ */

/* ---------- the front page ---------- */

.help-hero { padding-bottom: clamp(20px, 3vw, 34px); }
.help-hero h1 { margin-bottom: 12px; }

.help-search {
  position: relative;
  max-width: 620px;
  margin: 26px auto 0;
}
.help-search i {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.25rem; color: var(--ir-muted); pointer-events: none;
}
.help-search input {
  width: 100%;
  padding: 16px 18px 16px 50px;
  font: inherit; font-size: 1rem; color: var(--ir-ink);
  background: var(--ir-surface);
  border: 1px solid var(--ir-line);
  border-radius: var(--ir-radius-pill, 999px);
  box-shadow: var(--ir-shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.help-search input:focus {
  outline: none;
  border-color: var(--ir-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ir-brand) 18%, transparent);
}
.help-search__empty { margin-top: 14px; font-size: .92rem; color: var(--ir-muted); }

.help-hero__switch {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  margin-top: 20px; font-size: .9rem;
}
.help-hero__switch a { display: inline-flex; align-items: center; gap: 4px; }

.help-kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ir-brand); margin-bottom: 16px;
}

.help-start-wrap { padding-top: 0; }
.help-start {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.help-start__card {
  display: flex; gap: 14px; align-items: flex-start; height: 100%;
  padding: 18px 20px;
  color: inherit; text-decoration: none;
  background: var(--ir-surface);
  border: 1px solid var(--ir-line);
  border-radius: var(--ir-radius);
  box-shadow: var(--ir-shadow-sm);
  transition: border-color .18s ease, transform .18s ease;
}
.help-start__card:hover { border-color: var(--ir-brand); transform: translateY(-2px); color: inherit; }
.help-start__num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; color: #fff; background: var(--ir-gradient);
}
.help-start__text { min-width: 0; }
.help-start__text strong { display: block; color: var(--ir-ink); font-size: .98rem; line-height: 1.35; margin-bottom: 4px; }
.help-start__text small { display: block; font-size: .85rem; line-height: 1.55; color: var(--ir-body); }

.help-product__head {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px;
}
.help-product__icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--ir-brand); background: var(--ir-brand-soft);
}
.help-product__title { min-width: 0; }
.help-product__title h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); margin: 4px 0 6px; }
.help-product__title h2 a { color: var(--ir-ink); }
.help-product__title h2 a:hover { color: var(--ir-brand); }
.help-product__title p { margin: 0; max-width: 720px; font-size: .95rem; }

.help-sections {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  align-items: start;
}
.help-section {
  padding: 20px 22px;
  background: var(--ir-surface);
  border: 1px solid var(--ir-line);
  border-radius: var(--ir-radius);
}
.help-section h3 {
  font-size: .8rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ir-muted); margin: 0 0 12px;
}
.help-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.help-section li a {
  display: block; padding: 9px 10px; margin: 0 -10px;
  border-radius: 10px; color: inherit; text-decoration: none;
  transition: background .15s ease;
}
.help-section li a:hover { background: var(--ir-brand-soft); }
.help-section li strong { display: block; font-size: .95rem; color: var(--ir-ink); line-height: 1.4; }
.help-section li span { display: block; font-size: .84rem; line-height: 1.5; color: var(--ir-muted); margin-top: 2px; }

.help-contact {
  display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; justify-content: space-between;
  padding: clamp(22px, 3vw, 32px);
  background: var(--ir-surface);
  border: 1px solid var(--ir-line);
  border-radius: var(--ir-radius-lg);
  box-shadow: var(--ir-shadow-sm);
}
.help-contact h2 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); margin-bottom: 6px; }
.help-contact p { margin: 0; max-width: 560px; }
.help-contact__ways { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; min-width: 0; }
.help-contact__ways > a:not(.ir-btn) {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere;
}
.help-contact--slim { margin-top: 30px; }

.help-machine {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 22px 0 0; font-size: .86rem; color: var(--ir-muted);
}
.help-machine i { margin-top: 3px; }

/* ---------- one guide ---------- */

.help-article__head { padding-bottom: 0; }
.help-head { max-width: 820px; }
.help-head h1 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.6rem); }
.help-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .88rem; margin-bottom: 16px;
}
.help-head .ir-eyebrow { display: table; margin-bottom: 12px; }
.help-meta { margin-top: 6px; }
.help-meta a.mkp-meta__item { color: var(--ir-muted); }
.help-meta a.mkp-meta__item:hover { color: var(--ir-brand); }

.help-article__body { padding-top: clamp(26px, 3.5vw, 42px); }

.help-layout {
  display: grid; gap: clamp(26px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
}
.help-layout > .help-doc { grid-column: 1; grid-row: 1; }
.help-toc {
  grid-column: 2; grid-row: 1;
  position: sticky; top: calc(var(--ir-nav-h) + 20px);
  max-height: calc(100vh - var(--ir-nav-h) - 40px); overflow: auto;
  padding: 18px 18px 14px;
  border: 1px solid var(--ir-line); border-radius: var(--ir-radius);
  background: var(--ir-surface);
}
.help-toc__title {
  font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ir-muted); margin: 0 0 10px;
}
.help-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.help-toc a {
  display: block; padding: 6px 8px; margin: 0 -8px; border-radius: 8px;
  font-size: .86rem; line-height: 1.4; color: var(--ir-body);
}
.help-toc a:hover { color: var(--ir-brand); background: var(--ir-brand-soft); }

/* The guide's own text. .mkp-doc gives the rhythm; these add what a
   how-to needs: numbered steps, callouts, keys and wide tables. */
.help-doc { max-width: 780px; }
.help-doc h2 { scroll-margin-top: calc(var(--ir-nav-h) + 20px); margin-top: 38px; }
.help-doc h2:first-child { margin-top: 0; }
.help-doc h3 { scroll-margin-top: calc(var(--ir-nav-h) + 20px); }

/* The opening answer: the two or three sentences an answer engine lifts. */
.help-doc > p:first-child {
  font-size: 1.04rem; line-height: 1.72; color: var(--ir-ink);
  padding: 18px 20px; margin-bottom: 26px;
  background: var(--ir-brand-soft);
  border-left: 4px solid var(--ir-brand);
  border-radius: 0 var(--ir-radius) var(--ir-radius) 0;
}

.help-doc ol {
  counter-reset: help-step; list-style: none;
  display: grid; gap: 12px; margin: 4px 0 20px; padding: 0;
}
.help-doc ol > li {
  counter-increment: help-step;
  position: relative; padding-left: 42px;
  font-size: .95rem; line-height: 1.65;
}
.help-doc ol > li::before {
  content: counter(help-step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: var(--ir-brand);
  background: var(--ir-brand-soft);
}
.help-doc ol > li > p { margin-bottom: 6px; }
.help-doc li > ul { margin-top: 8px; }

.help-doc blockquote {
  margin: 8px 0 20px; padding: 14px 18px;
  font-size: .93rem; line-height: 1.65;
  background: var(--ir-surface-2);
  border: 1px solid var(--ir-line);
  border-left: 4px solid var(--ir-warn);
  border-radius: 0 var(--ir-radius) var(--ir-radius) 0;
}
.help-doc blockquote p:last-child { margin-bottom: 0; }

.help-doc code {
  font-size: .86em; padding: 2px 6px; border-radius: 6px;
  background: var(--ir-surface-2); border: 1px solid var(--ir-line);
  overflow-wrap: anywhere;
}
.help-doc strong { color: var(--ir-ink); }
.help-doc a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.help-table { max-width: 100%; overflow-x: auto; margin: 6px 0 18px; -webkit-overflow-scrolling: touch; }
.help-table table { margin: 0; min-width: 520px; }
.help-doc .help-table table { display: table; }

.help-doc hr { border: 0; border-top: 1px solid var(--ir-line); margin: 32px 0; }

/* ---------- after the guide ---------- */

.help-after__grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: start;
}
.help-next {
  display: block; padding: 22px 24px; color: inherit; text-decoration: none;
  background: var(--ir-surface); border: 1px solid var(--ir-line);
  border-radius: var(--ir-radius); box-shadow: var(--ir-shadow-sm);
  transition: border-color .18s ease, transform .18s ease;
}
.help-next:hover { border-color: var(--ir-brand); transform: translateY(-2px); color: inherit; }
.help-next__label {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px;
  font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ir-brand);
}
.help-next strong { display: block; color: var(--ir-ink); font-size: 1.05rem; margin-bottom: 6px; }
.help-next span:last-child { display: block; font-size: .9rem; color: var(--ir-body); }

.help-related h2 { font-size: 1.05rem; margin-bottom: 10px; }
.help-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.help-related a { font-size: .93rem; }

/* ---------- smaller screens ---------- */

@media (max-width: 980px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-toc {
    grid-column: 1; grid-row: 1; position: static; max-height: none;
  }
  .help-layout > .help-doc { grid-row: 2; }
}

@media (max-width: 620px) {
  .help-product__head { gap: 12px; }
  .help-product__icon { width: 40px; height: 40px; font-size: 1.25rem; }
  .help-section { padding: 16px 16px; }
  .help-doc > p:first-child { padding: 14px 16px; }
  .help-doc ol > li { padding-left: 38px; }
  .help-contact__ways { flex-direction: column; align-items: flex-start; }
  .help-table table { min-width: 460px; }
}
