/* ============================================================
   Cannavate — Help center (hub + guide pages)
   Loads after landing.css + features.css; reuses their tokens.
   ============================================================ */

.help-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: calc(var(--header-h, 56px) + 36px) clamp(16px, 4vw, 28px) 80px;
  animation: helpEnter 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes helpEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .help-main { animation: none; }
}

/* ---------- Hub ---------- */

.help-hero {
  max-width: 680px;
  margin-bottom: 26px;
}
.help-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.help-hero p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.help-search {
  margin: 22px 0 34px;
  max-width: 520px;
}
.help-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.help-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.help-group { margin-bottom: 30px; }
.help-group > h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.help-group[hidden] { display: none; }

.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.help-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.help-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-sm, 0 4px 12px rgba(20, 20, 20, 0.06));
  transform: translateY(-1px);
}
.help-card[hidden] { display: none; }
.help-card-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
.help-card h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 720;
  letter-spacing: -0.01em;
}
.help-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
.help-empty {
  padding: 26px 4px;
  color: var(--muted);
  font-size: 14.5px;
}
.help-empty[hidden] { display: none; }

/* ---------- Guide layout: sidebar + article ---------- */

.help-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: calc(var(--header-h, 56px) + 20px);
  max-height: calc(100vh - var(--header-h, 56px) - 40px);
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13.5px;
}
.help-sidebar-group { margin-bottom: 18px; }
.help-sidebar-group > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}
.help-sidebar a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}
.help-sidebar a:hover { color: var(--ink); background: var(--fill-quiet, rgba(20,20,20,0.04)); }
.help-sidebar a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.help-article { min-width: 0; max-width: 760px; }
.help-article-hero { margin-bottom: 26px; }
.help-article-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.14;
}
.help-article-hero > p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}

.help-section { margin: 34px 0; }
.help-section h2 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-h, 56px) + 20px);
}
.help-section h3 {
  margin: 20px 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.help-section p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-soft, var(--ink));
}
.help-section ul,
.help-section ol {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.62;
}
.help-section li { margin-bottom: 6px; }
.help-section li > ul { margin-top: 6px; margin-bottom: 0; }

/* Numbered walkthrough steps */
.help-steps {
  list-style: none;
  counter-reset: helpstep;
  margin: 0 0 16px;
  padding: 0;
}
.help-steps > li {
  counter-increment: helpstep;
  position: relative;
  padding: 0 0 14px 44px;
  margin: 0;
}
.help-steps > li::before {
  content: counter(helpstep);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
}
.help-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 28px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}

/* Callouts */
.help-callout {
  display: block;
  margin: 0 0 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  font-size: 14px;
  line-height: 1.55;
}
.help-callout > strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.help-callout.is-warn {
  border-left-color: #b45309;
  background: color-mix(in srgb, #b45309 6%, var(--surface));
}
.help-callout.is-warn > strong { color: #b45309; }

/* UI term chips: buttons, lanes, labels users will see on screen */
.help-ui {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--fill-quiet, rgba(20,20,20,0.045));
  font-size: 0.86em;
  font-weight: 650;
  white-space: nowrap;
}
.help-section kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 650;
}

/* Reference tables (lanes, permissions, reports) */
.help-table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.help-table th,
.help-table td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.help-table th {
  background: var(--fill-quiet, rgba(20,20,20,0.04));
  font-weight: 700;
  white-space: nowrap;
}
.help-table td:first-child { white-space: nowrap; font-weight: 650; }

/* Screenshots inside guides (frame styles come from features.css) */
.help-shot { margin: 18px 0 8px; }
.help-shot .feature-shot-frame img { width: 100%; height: auto; }

/* Prev / next footer nav */
.help-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.help-pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 46%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}
.help-pager a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.help-pager small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.help-pager span { font-size: 14px; font-weight: 650; }
.help-pager a.is-next { margin-left: auto; text-align: right; }

.help-foot-back { margin-top: 30px; }

@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-sidebar {
    position: static;
    max-height: none;
    order: 2;
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
  .help-article { order: 1; }
  .help-pager a { max-width: 100%; }
}
