/* Kisnip — Help center styles (hub + articles).
   Loaded after v2.css; reuses its design tokens (--green, --line, --paper, …). */

/* ---------- Hub ---------- */
.help-search {
  max-width: 560px;
  margin: 22px auto 0;
  position: relative;
}
.help-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px 14px 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.help-search input:focus {
  outline: none;
  border-color: var(--green-line);
  box-shadow: 0 0 0 4px var(--green-soft);
}
.help-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.help-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.help-cat {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px 26px 12px;
  background: #fff;
}
.help-cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.help-cat-ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
}
.help-cat h2 {
  font-size: 1.14rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.help-cat ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-cat li { border-top: 1px solid var(--line); }
.help-cat li:first-child { border-top: 0; }
.help-cat a {
  display: block;
  padding: 13px 2px;
  color: var(--body);
  font-weight: 500;
  transition: color .14s ease;
}
.help-cat a:hover { color: var(--green); }
.help-cat.is-hidden { display: none; }
.help-cat li.is-hidden { display: none; }

.help-empty {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  display: none;
}
.help-empty.is-shown { display: block; }

/* ---------- Article ---------- */
.help-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  color: var(--muted);
}
.help-crumb a { color: var(--muted); text-decoration: none; }
.help-crumb a:hover { color: var(--green); }
.help-crumb svg { flex: none; opacity: .6; }

.help-article { padding-block: 40px 72px; }
.help-article .container { max-width: 760px; }

/* ---------- Article: split layout (sticky heading left, content right) ---------- */
.help-split-body { color: var(--body); }
.help-split-body strong { color: var(--ink); }
.help-article-split .help-crumb { margin-top: 0; }
.help-article-split .help-split-body > :first-child { margin-top: 0; }
.help-article-split .help-figure:first-child { margin-top: 0; }
.help-article-split .help-step-body h2 { font-size: 1.18rem; font-weight: 700; margin: 2px 0 10px; }
.help-article-split .help-acc-title { text-align: center; font-size: 1.32rem; font-weight: 700; margin: 40px 0 12px; }
.help-article-split .help-step-num { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.help-split-body a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.help-split-body a:hover { color: var(--green-strong); }
.help-split-body ul { margin: 16px 0; padding-left: 22px; }
.help-split-body li { margin-bottom: 8px; }
@media (max-width: 860px) {
  .help-article-split .help-crumb { margin-bottom: 12px; }
}

.help-note {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.6;
}
.help-note svg { flex: none; color: var(--green); margin-top: 2px; }
.help-note strong { color: var(--ink); }

/* ---------- Figure (screenshot or video, same frame) ---------- */
.help-figure {
  margin: 28px 0;
}
.help-figure > img,
.help-figure > video,
.help-figure > .help-figure-embed {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}
/* Video wrapper carries the frame so a full-width progress bar clips to its corners */
.help-figure > .help-figure-media {
  display: block;
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  overflow: hidden;
}
.help-figure-media > video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}
.help-vid-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(20, 33, 27, .16);
  pointer-events: none;
}
.help-vid-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}
.help-vid-toggle {
  position: absolute;
  right: 10px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(20, 33, 27, .55);
  color: #fff;
  cursor: pointer;
  opacity: .85;
  transition: opacity .15s ease, background .15s ease;
}
.help-figure-media:hover .help-vid-toggle,
.help-vid-toggle:focus-visible {
  opacity: 1;
}
.help-vid-toggle:hover {
  background: rgba(20, 33, 27, .72);
}
.help-vid-toggle svg {
  width: 16px;
  height: 16px;
}
.help-vid-toggle .help-vid-ic-play {
  display: none;
  margin-left: 1px;
}
.help-vid-toggle.is-paused .help-vid-ic-pause {
  display: none;
}
.help-vid-toggle.is-paused .help-vid-ic-play {
  display: block;
}
.help-figure > .help-figure-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
}
.help-figure > .help-figure-embed > iframe,
.help-figure > .help-figure-embed > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.help-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.help-code {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #e7ece9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

/* ---------- Stepped instructions ---------- */
.help-steps {
  list-style: none;
  margin: 28px 0 8px;
  padding: 0;
  counter-reset: help-step;
}
.help-step {
  position: relative;
  display: flex;
  gap: 18px;
  padding-bottom: 12px;
}
/* Connector line between step badges */
.help-step::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: -8px;
  width: 2px;
  background: var(--line);
}
.help-step:last-child::before { display: none; }
.help-step-num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--paper);
}
.help-step-body { flex: 1; min-width: 0; }
.help-step-body > h2:first-child { margin-top: 4px; }
.help-step-body > *:last-child { margin-bottom: 0; }

/* ---------- Accordion drawers (native details) ---------- */
.help-acc-title { text-align: center; }
.help-acc-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 8px;
}
.help-acc {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .14s ease;
}
.help-acc[open] { border-color: var(--green-line); }
.help-acc-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  user-select: none;
}
.help-acc-sum::-webkit-details-marker { display: none; }
.help-acc-sum:hover { color: var(--green); }
.help-acc-chev {
  flex: none;
  color: var(--muted);
  transition: transform .18s ease;
}
.help-acc[open] .help-acc-chev { transform: rotate(180deg); }
.help-acc-body {
  padding: 0 18px 16px;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.65;
}
.help-acc-body > *:last-child { margin-bottom: 0; }
.help-acc-body code {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 0.86em;
}

/* ---------- Article footer (contact) ---------- */
.help-more {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px 8px;
}
.help-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.help-contact p { margin: 0; color: var(--body); }
.help-contact strong { color: var(--ink); display: block; font-size: 1.05rem; margin-bottom: 2px; }

@media (max-width: 720px) {
  .help-cats { grid-template-columns: 1fr; }
  .help-article .container { padding-inline: 26px; }
  .help-more { padding-inline: 26px; }
  .help-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px;
  }
  .help-contact .v2-btn { width: 100%; text-align: center; }
  .help-article { padding-block: 32px 56px; }
  .help-code { padding: 16px 16px; font-size: 0.82rem; }
  .help-step { gap: 14px; }
  .help-step::before { left: 15px; }
  .help-step-num { width: 32px; height: 32px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .help-article .container { padding-inline: 22px; }
  .help-more { padding-inline: 22px; }
  .help-note { padding: 14px 16px; }
}
