/* Help Center theme — used only by sites whose settings.template == "help".
 * Builds on tokens.css (light/dark via [data-theme]):
 *   - a quiet frame (light grey / near-black) holds a slim header, the page
 *     panel and the footer; the page itself sits in a raised panel with large
 *     rounded corners, inset from the frame
 *   - articles and category lists keep a reading measure inside the panel
 *     (no right TOC, no decorative page-level icons)
 *   - adds Category / Sub-category landing grids + a search hero homepage.
 */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
/* ---- shell: frame → header, panel, footer ---- */
body:has(> .help-layout) { background: hsl(var(--help-frame)); }
.help-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: hsl(var(--help-frame));
  color: hsl(var(--foreground));
  font-family: "Inter", var(--font-sans);
  font-optical-sizing: auto;
  font-weight: 400;
}
/* The page panel. Its surface colour is the background for everything in it,
   so the shared block styles (callouts, tables, code) resolve against the
   panel rather than the frame. */
.help-panel {
  --background: var(--help-panel);
  --card: var(--help-panel);
  --popover: var(--help-popover);
  --muted: var(--help-muted);
  --color-bg: hsl(var(--background));
  --color-surface: hsl(var(--card));
  --color-surface-raised: hsl(var(--popover));
  --color-surface-inset: hsl(var(--muted));
  --color-border: hsl(var(--border));
  --color-border-subtle: hsl(var(--border) / 0.5);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0 8px;
  border-radius: 20px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}
:root:not([data-theme="light"]) .help-panel { --border: 240 3% 17%; }
.help-main {
  flex: 1;
  width: 100%;
  max-width: none;       /* full-bleed help content */
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 64px) 80px;
}
/* Nothing runs to the panel edge. The homepage and category grids get the
   room their columns need; everything that is a column of text or links takes
   the same reading measure as an article. */
.help-main.help-main--wide {
  max-width: 1180px;
}
.help-main.help-main--article,
.help-main.help-main--section {
  max-width: 820px;
  padding-top: 32px;
}
@media (max-width: 640px) {
  /* Phone: the panel runs edge to edge; its rounded top still shows the frame. */
  .help-panel { margin: 0; border-radius: 16px; }
}
/* ---- header: on the frame, mark + product name, quiet text controls ---- */
.help-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--help-frame));
  color: hsl(var(--help-ink));
}
.help-topbar-inner {
  width: 100%;
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.help-topbar a { color: inherit; text-decoration: none; }
.help-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.011em;
  white-space: nowrap;
}
.help-brand:focus-visible { outline: 2px solid hsl(var(--help-ink)); outline-offset: 4px; border-radius: 6px; }
.help-logo { height: 34px; width: auto; display: block; }
.help-logo--dark { display: none; }
:root:not([data-theme="light"]) .help-logo--light { display: none; }
:root:not([data-theme="light"]) .help-logo--dark { display: block; }
.help-topbar-spacer { flex: 1; }
.help-topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
/* Header controls are text, not boxes: a hover tint is the only surface. */
.help-topbar-link,
.help-account-trigger,
.help-locale-trigger {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--help-ink));
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.help-topbar-link:hover,
.help-account-trigger:hover,
.is-account-open .help-account-trigger,
.help-locale-trigger:hover,
.help-locale-switcher[open] > .help-locale-trigger { background: hsl(var(--help-hover)); }
.help-topbar-link:focus-visible,
.help-account-trigger:focus-visible,
.help-locale-trigger:focus-visible { outline: 2px solid hsl(var(--help-ink)); outline-offset: 1px; }
.help-account-menu { position: relative; }
.help-account-trigger { padding-left: 6px; gap: 8px; }
.help-account-avatar {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: hsl(var(--help-ink));
  color: hsl(var(--help-frame));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.help-account-label {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.help-account-caret,
.help-locale-caret { flex: none; width: 14px; height: 14px; color: hsl(var(--help-ink-muted)); transition: transform 150ms ease; }
.is-account-open .help-account-caret { transform: rotate(180deg); }

/* ---- Header menus (account + language): one light popover style that
   follows the theme ---- */
.help-menu {
  background: hsl(var(--help-popover));
  color: hsl(var(--help-ink));
  border: 1px solid hsl(var(--help-line) / 0.7);
  border-radius: 12px;
  box-shadow: var(--help-menu-shadow);
  animation: help-menu-in 140ms ease-out;
}
@keyframes help-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .help-menu { animation: none; } }
.help-account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: 280px;
  padding: 6px;
}
.help-menu-section { padding: 4px 0; }
.help-menu-section + .help-menu-section { border-top: 1px solid hsl(var(--help-line) / 0.7); }
.help-menu-label {
  margin: 0;
  padding: 6px 10px 2px;
  color: hsl(var(--help-ink-muted));
  font-size: 12px;
  font-weight: 500;
}
.help-menu-identity { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; min-width: 0; }
.help-menu-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: hsl(var(--help-muted));
  color: hsl(var(--help-ink));
  font-size: 12px;
  font-weight: 600;
}
.help-menu-avatar--store { border-radius: 8px; }
.help-menu-identity-text { display: flex; flex-direction: column; min-width: 0; }
.help-menu-identity-text strong,
.help-menu-identity-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-menu-identity-text strong { color: hsl(var(--help-ink)); font-size: 14px; line-height: 20px; font-weight: 500; }
.help-menu-identity-text span { color: hsl(var(--help-ink-muted)); font-size: 12px; line-height: 17px; }
.help-topbar .help-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: hsl(var(--help-ink));
  font-size: 14px;
  outline: none;
  transition: background-color 120ms ease;
}
.help-menu-icon { flex: none; width: 16px; height: 16px; color: hsl(var(--help-ink-muted)); }
.help-topbar .help-menu-item:hover,
.help-topbar .help-menu-item:focus-visible { background: hsl(var(--help-muted)); }
.help-topbar .help-menu-item:focus-visible { box-shadow: inset 0 0 0 1px hsl(var(--help-ink) / 0.4); }
.help-menu-item:hover .help-menu-icon,
.help-menu-item:focus-visible .help-menu-icon { color: hsl(var(--help-ink)); }
@media (max-width: 640px) {
  .help-topbar-inner { height: 60px; padding: 0 12px 0 16px; }
  .help-logo { height: 32px; }
  .help-account-label { display: none; }
  .help-account-trigger { padding-right: 8px; }
}
@media (max-width: 360px) {
  .help-brand-label { display: none; }
}
/* ---- breadcrumb ---- */
.help-breadcrumb {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.help-breadcrumb a { color: hsl(var(--muted-foreground)); text-decoration: none; }
.help-breadcrumb a:hover { color: hsl(var(--foreground)); }
.help-breadcrumb .sep { opacity: 0.5; }
/* ---- homepage hero + search ---- */
.help-hero {
  position: relative;
  color: hsl(var(--foreground));
  padding: 80px clamp(16px, 4vw, 64px) 36px;
  text-align: center;
}
/* ---- banner section: a centered image (NOT edge-to-edge) sitting between
   the search hero and the content, with a gap on both sides. ---- */
.help-banner {
  padding: 8px clamp(16px, 4vw, 64px) 48px;
}
.help-banner img {
  display: block;
  width: 100%;
  max-width: 880px;     /* centered, not full-bleed */
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
}
.help-hero h1 {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0 0 12px;
}
/* No summary under the heading: give the search field the same breathing room. */
.help-hero h1 + .help-search { margin-top: 32px; }
/* Typewriter caret — solid bar while typing, blinking once typed. Reserve a
   line of height so the heading doesn't reflow as characters appear. */
.help-typewriter { min-height: 1.2em; }
.help-typewriter.is-typing::after,
.help-typewriter.is-typed::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: currentColor;
  border-radius: 1px;
}
.help-typewriter.is-typed::after { animation: help-caret-blink 1s step-end infinite; }
@keyframes help-caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.help-hero p { font-size: 17px; line-height: 1.55; color: hsl(var(--muted-foreground)); margin: 0 0 32px; }
@media (max-width: 640px) {
  .help-hero { padding-top: 56px; }
  .help-hero h1 { font-size: 32px; }
}
.help-search {
  /* Same measure as the banner image directly below, so the two line up. */
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}
/* Live results dropdown under the search bar — light card, left-aligned
   rows (title + snippet), keyboard-active + hover highlight. */
.help-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  text-align: left;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  box-shadow: var(--help-menu-shadow);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
.help-search-result {
  display: block;
  padding: 12px 18px;
  text-decoration: none;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
}
.help-search-result:last-child { border-bottom: none; }
.help-search-result.is-active,
.help-search-result:hover {
  background: hsl(var(--muted));
}
.help-search-result-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
}
.help-search-result-snippet {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* highlighted match term inside a snippet */
.help-search-result-snippet mark {
  background: transparent;
  color: hsl(var(--foreground));
  font-weight: 600;
}
.help-search-empty {
  padding: 16px 18px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  text-align: left;
}
/* Search field: a plain bordered field on the panel. */
.help-search-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 12px;
  padding: 0 16px 0 46px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--foreground) / 0.14);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.help-search-icon {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}
.help-search-icon svg { width: 18px; height: 18px; }
.help-search-field input {
  width: 100%;
  height: 100%;
  padding-right: 68px;
  border: none;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: hsl(var(--foreground));
}
.help-search-field input::placeholder { color: hsl(var(--muted-foreground)); }
.help-search-shortcut {
  position: absolute;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid hsl(var(--border));
  border-bottom-color: hsl(var(--foreground) / 0.2);
  border-radius: 7px;
  background: hsl(var(--muted) / 0.7);
  color: hsl(var(--muted-foreground));
  font: 500 12px/1 "Inter", var(--font-sans);
  pointer-events: none;
}
/* Focus: a normal light focus ring. */
.help-search-field:focus-within {
  border-color: hsl(var(--foreground) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--foreground) / 0.08);
}
.help-search-field:focus-within .help-search-icon { color: hsl(var(--foreground)); }
/* ---- category landing: sub-category panels listing their articles ---- */
.help-cat-header { margin-bottom: 28px; }
.help-subcats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px 40px;
  text-align: left;
}
.help-subcat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.help-subcat-head { margin-bottom: 4px; }
.help-subcat-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.014em;
  margin: 0;
}
.help-subcat-title a { color: hsl(var(--foreground)); text-decoration: none; }
.help-subcat-title a:hover { text-decoration: underline; }
.help-subcat-desc {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin: 0 0 12px;
}
.help-subcat-articles {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.help-subcat-articles li { margin: 0; }
.help-subcat-articles a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 14px;
  color: hsl(var(--foreground) / 0.85);
  text-decoration: none;
  border-radius: 6px;
}
.help-subcat-articles a::after {
  content: "\2192";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.help-subcat-articles a:hover,
.help-subcat-articles a:focus-visible {
  color: hsl(var(--foreground));
  text-decoration: underline;
  text-underline-offset: 3px;
}
.help-subcat-articles a:hover::after,
.help-subcat-articles a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  .help-subcat-articles a::after { transition: none; }
}
.help-subcat-empty {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin: 8px 0;
}
/* ---- homepage topic cards ---- */
.help-topics { margin-top: 8px; text-align: left; }
.help-topics-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}
.help-topic-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.help-topic-grid > li { display: flex; min-width: 0; }
/* The whole card is the link: icon, name, what the topic covers, and how many
   articles it holds. */
.help-topic {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 22px 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.help-topic:hover {
  border-color: hsl(var(--foreground) / 0.3);
  background: hsl(var(--muted) / 0.45);
}
.help-topic:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
}
.help-topic-icon { flex: none; display: inline-flex; margin-top: 1px; }
.help-topic-icon svg { width: 22px; height: 22px; stroke-width: 1.75; }
/* The body fills the card so every count in a row sits on the same line,
   however many lines its summary takes. */
.help-topic-body { display: flex; flex: 1; flex-direction: column; align-self: stretch; min-width: 0; }
.help-topic-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.014em;
}
.help-topic-summary {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}
.help-topic-count {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--muted-foreground));
}
@media (prefers-reduced-motion: reduce) {
  .help-topic { transition: none; }
}
@media (max-width: 960px) {
  .help-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .help-topic-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .help-topic { padding: 18px 20px; }
}
/* ---- category / sub-category card grid ---- */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.help-card {
  display: block;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 22px;
  text-decoration: none;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.help-card:hover {
  border-color: hsl(var(--foreground) / 0.4);
  transform: translateY(-2px);
}
/* Glass category card — frosted pane echoing the search bar: translucent
   fill + backdrop blur, embossed top-highlight, soft lift. Holds a clickable
   head (category) + an inline list of its sub-categories. */
.help-card--glass {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.04) 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.4);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.help-card--glass:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 16px 40px rgba(0, 0, 0, 0.5);
}
.help-card-head {
  display: block;
  padding: 22px 22px 16px;
  text-decoration: none;
  color: hsl(var(--foreground));
}
.help-card-subs {
  list-style: none;
  margin: 0;
  padding: 4px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.help-card-subs li { margin: 0; }
.help-card-subs a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.help-card-subs a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: hsl(var(--foreground));
}
.help-card-title { font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.help-card-desc { font-size: 14px; color: hsl(var(--muted-foreground)); margin: 0; }
.help-card-count {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin: 0;
  padding: 0 22px 18px;
}
/* ---- article list (sub-category page) ---- */
.help-section-content {
  max-width: 880px;
  margin: 0 0 36px;
}
.help-section-content > :first-child { margin-top: 0; }
.help-section-content > :last-child { margin-bottom: 0; }
.help-section-content + .help-article-list { padding-top: 8px; }
.help-section-index .help-article-list { margin: 0; }
.help-quick-faqs { margin-top: 48px; }
.help-quick-faqs > .block-heading { margin: 0 0 16px; font-size: 22px; }
.help-quick-faq > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 12px 4px;
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.help-quick-faq > summary::-webkit-details-marker { display: none; }
.help-quick-faq > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.help-quick-faq-chevron { flex: 0 0 auto; color: hsl(var(--muted-foreground)); }
.help-quick-faq[open] .help-quick-faq-chevron { transform: rotate(90deg); }
.help-quick-faq-answer { padding: 0 28px 12px 4px; color: hsl(var(--muted-foreground)); }
.help-quick-faq-answer > :first-child { margin-top: 0; }
.help-quick-faq-answer > :last-child { margin-bottom: 0; }
.help-article-list { list-style: none; margin: 8px 0 0; padding: 0; }
.help-article-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 4px;
  text-decoration: none;
  color: hsl(var(--foreground));
  font-size: 16px;
}
.help-article-list a::after {
  content: "→";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.help-article-list a:hover,
.help-article-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.help-article-list a:hover::after,
.help-article-list a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  .help-article-list a::after { transition: none; }
}
/* ---- collapsible H2 sections (help-article) ---- */
.help-article-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.help-article-toolbar .help-breadcrumb {
  justify-content: flex-start;
  min-width: 0;
  margin: 0;
  font-size: 13px;
}
/* ---- Contents dropdown (section + article toolbars) ---- */
.help-contents { position: relative; flex-shrink: 0; }
.help-contents-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.help-contents-trigger::-webkit-details-marker { display: none; }
.help-contents-trigger:hover { background: hsl(var(--muted) / 0.5); }
.help-contents[open] .help-contents-caret { transform: rotate(180deg); }
@keyframes help-contents-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .help-contents-panel { animation: none; }
}
.help-contents-caret { transition: transform 0.15s ease; }
.help-contents-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(440px, calc(100vw - 32px));
  max-height: min(62vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  animation: help-contents-in 0.14s ease-out;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--background));
  box-shadow: var(--help-menu-shadow);
}
.help-contents-panel {
  scrollbar-width: none;
}
.help-contents-panel::-webkit-scrollbar {
  display: none;
}
.help-contents-branch { position: relative; }
.help-contents-branch + .help-contents-branch { margin-top: 1px; }
.help-contents-chevron { flex-shrink: 0; color: hsl(var(--muted-foreground)); }
.help-contents-branch[open] > .help-contents-toggle .help-contents-chevron { transform: rotate(90deg); }
.help-contents-toggle,
.help-contents-leaf {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 8px;
  color: hsl(var(--foreground));
  text-decoration: none;
}
.help-contents-toggle {
  padding: 8px 42px 8px 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.help-contents-toggle::-webkit-details-marker { display: none; }
.help-contents-section-link {
  position: absolute;
  top: 2px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: hsl(var(--muted-foreground));
}
.help-contents-toggle:hover,
.help-contents-section-link:hover,
.help-contents-leaf:hover { background: hsl(var(--muted) / 0.55); }
.help-contents-toggle:focus-visible,
.help-contents-section-link:focus-visible,
.help-contents-leaf:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: -2px;
}
.help-contents-toggle.is-active,
.help-contents-leaf.is-active { font-weight: 600; }
.help-contents-children { padding: 0 0 4px 16px; }
.help-contents-leaf {
  padding: 6px 12px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}
.help-contents-leaf.is-active { color: hsl(var(--foreground)); }
@media (max-width: 700px) {
  .help-contents-panel { width: calc(100vw - 32px); }
  .help-contents-toggle,
  .help-contents-leaf { min-height: 44px; }
  .help-contents-section-link { top: 6px; }
}
.help-back-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.help-back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.help-back-link:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
}
/* No card: a help article is a page of prose, not a panel floating on one.
   The measure above does the framing that the border used to attempt. */
.help-article-surface {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.help-article-header {
  display: block;
  padding: 8px 0 24px;
  border-bottom: 0;
  background: none;
}
.help-article-header .help-page-title {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.022em;
}
.help-article-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.help-article-title-row .help-page-title {
  flex: 1 1 280px;
  margin: 0;
}
.help-sections-toggle {
  flex: none;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: hsl(var(--border));
  text-underline-offset: 4px;
}
.help-sections-toggle:hover { text-decoration-color: currentColor; }
.help-sections-toggle:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 4px;
  border-radius: 2px;
}
.help-article-header .help-page-summary {
  max-width: none;
  margin-bottom: 0;
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.6;
}
.help-article-notice { padding: 0 0 4px; }
.help-article-body { padding: 0; font-size: 16px; line-height: 1.7; }
.help-article-body > p { margin: 0 0 20px; }
.help-article-body > :first-child { margin-top: 0; }
.help-article-body strong {
  font-weight: 600;
  color: hsl(var(--foreground));
}
.help-article-body .list-numbered > li::marker {
  color: hsl(var(--foreground));
  font-weight: 600;
}
/* ---- article feedback ---- */
.help-feedback {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid hsl(var(--border));
}
.help-feedback-prompt {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--foreground));
}
.help-feedback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.help-feedback-btn {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.help-feedback-btn:hover { background: hsl(var(--muted) / 0.6); }
.help-feedback-btn--primary {
  background: hsl(var(--foreground));
  border-color: hsl(var(--foreground));
  color: hsl(var(--background));
}
.help-feedback-btn--primary:hover { opacity: 0.9; }
.help-feedback-btn:focus-visible,
.help-feedback-skip:focus-visible,
.help-feedback-comment textarea:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
.help-feedback-comment-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.help-feedback-comment textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.help-feedback-skip {
  border: 0;
  background: none;
  padding: 0 4px;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  cursor: pointer;
}
.help-feedback-skip:hover { color: hsl(var(--foreground)); text-decoration: underline; }
.help-feedback-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: hsl(0 72% 51%);
}
.help-article-footer {
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid hsl(var(--border));
}
.help-feedback + .help-article-footer {
  border-top: 0;
}
.help-section-toggle > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 20px 4px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.017em;
  color: hsl(var(--foreground));
}
.help-section-toggle > summary::-webkit-details-marker { display: none; }
.help-section-body {
  padding: 0 4px 24px;
}
@media (max-width: 700px) {
  .help-main.help-main--article { padding: 24px 16px 56px; }
  .help-article-header { padding: 4px 0 18px; }
  .help-article-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .help-article-toolbar .help-breadcrumb { justify-content: flex-start; }
  .help-article-header .help-page-title { font-size: 30px; }
  .help-article-notice { padding: 0 0 4px; }
  .help-article-body { padding: 0; }
  .help-article-footer { margin: 24px 0 0; padding-bottom: 24px; }
  .help-section-toggle > summary { font-size: 18px; }
}
/* ---- page headings ---- */
.help-page-title { font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -0.022em; margin: 0 0 10px; }
.help-page-summary { font-size: 16px; line-height: 1.6; color: hsl(var(--muted-foreground)); margin: 0 0 28px; }
/* ---- footer: on the frame, below the panel ---- */
.help-footer {
  padding: 28px 24px 32px;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  color: hsl(var(--help-ink-muted));
}
.help-footer a { color: hsl(var(--help-ink)); text-decoration: none; }
.help-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* ---- landing-style help footer: brand, three link groups, legal line ---- */
.help-footer--landing {
  padding: 0;
  text-align: left;
}
.help-footer-inner {
  max-width: 1196px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 72px);
}
.help-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  padding: 64px 0 56px;
}
.help-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: hsl(var(--help-ink));
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.011em;
  text-decoration: none;
}
.help-footer--landing .help-footer-logo { color: hsl(var(--help-ink)); }
.help-footer--landing .help-footer-logo:hover { text-decoration: none; }
.help-footer-logo .help-logo { height: 32px; }
.help-footer-brand p {
  margin: 14px 0 0;
  max-width: 300px;
  color: hsl(var(--help-ink-muted));
  font-size: 14px;
  line-height: 1.6;
}
.help-footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.help-footer-columns > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.help-footer-heading {
  margin: 0 0 2px;
  color: hsl(var(--help-ink));
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.help-footer--landing .help-footer-columns a {
  width: fit-content;
  color: hsl(var(--help-ink-muted));
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: color 150ms ease;
}
.help-footer--landing .help-footer-columns a:hover,
.help-footer--landing .help-footer-columns a:focus-visible { color: hsl(var(--help-ink)); }
.help-footer-columns a:focus-visible,
.help-footer-logo:focus-visible {
  outline: 2px solid hsl(var(--help-ink));
  outline-offset: 3px;
  border-radius: 3px;
}
.help-footer-bottom {
  padding: 20px 0 32px;
  border-top: 1px solid hsl(var(--help-line));
}
.help-footer-bottom p {
  margin: 0;
  color: hsl(var(--help-ink-muted));
  font-size: 13px;
  line-height: 20px;
}
@media (max-width: 860px) {
  .help-footer-top { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 40px; }
}
@media (max-width: 520px) {
  .help-footer-inner { padding: 0 20px; }
  .help-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .help-footer-columns > div:last-child { grid-column: 1 / -1; }
}
/* ---- Locale switcher (help topbar) ---- */
/* Language picker. Five languages, so the menu shows all of them at once —
   no search field, no scroll, no mobile takeover. The trigger names the
   current language; the open menu marks it with a check in normal ink, so
   selection never rests on background colour alone. */
.help-locale-switcher {
  position: relative;
}
.help-locale-trigger {
  list-style: none;
  user-select: none;
}
.help-locale-trigger::-webkit-details-marker {
  display: none;
}
.help-locale-globe { flex: none; color: hsl(var(--help-ink-muted)); }
.help-locale-switcher[open] .help-locale-caret {
  transform: rotate(180deg);
}
.help-locale-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 220px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.help-topbar .help-locale-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--help-ink));
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.help-topbar .help-locale-option:hover { background: hsl(var(--help-muted)); }
.help-topbar .help-locale-option:focus-visible {
  outline: none;
  background: hsl(var(--help-muted));
  box-shadow: inset 0 0 0 1px hsl(var(--help-ink) / 0.4);
}
.help-locale-names {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.help-locale-native {
  font-size: 14px;
  line-height: 20px;
}
.help-locale-option.is-active .help-locale-native { font-weight: 500; }
.help-locale-english {
  color: hsl(var(--help-ink-muted));
  font-size: 12px;
  line-height: 16px;
}
/* The check only renders for the selected language — identity is never
   carried by colour alone. */
.help-locale-check {
  flex: none;
  color: hsl(var(--help-ink));
  opacity: 0;
}
.help-locale-option.is-active .help-locale-check {
  opacity: 1;
}
@media (max-width: 640px) {
  .help-locale-trigger { padding: 0 8px; }
  .help-locale-globe { display: none; }
  /* Still an anchored dropdown, not a full-screen sheet: five rows fit. */
  .help-locale-menu {
    min-width: 200px;
  }
}
