/* ══════════════════════════════════════════════════════════════
   Pinza Help — docs-only styles.
   Loads after site.css and consumes its custom properties, so
   light/dark theming is inherited. Every rule is scoped under
   .help-* classes; nothing here can restyle the hand-written pages.
   ══════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────── */
.help-layout {
  max-width: 72rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  min-height: 60vh;
}
.help-layout main {
  max-width: 46rem;
  min-width: 0;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.help-nav {
  position: sticky;
  top: 5rem;
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  font-size: 0.92rem;
  padding-bottom: 1rem;
}
.help-nav-groups,
.help-nav-groups ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-nav-groups > li + li {
  margin-top: 1.4rem;
}
.help-nav-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.35rem;
}
.help-nav-groups a {
  display: block;
  padding: 0.22rem 0.6rem;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 0 6px 6px 0;
}
.help-nav-groups a:hover {
  color: var(--ink);
}
.help-nav-groups a[aria-current="page"] {
  color: var(--azure);
  font-weight: 600;
  border-left-color: var(--azure);
  background: color-mix(in srgb, var(--azure) 7%, transparent);
}
.help-nav-home a {
  font-weight: 650;
  color: var(--ink);
}
.help-nav-child {
  padding-left: 0.9rem;
}

/* ── Mobile nav (CSS-only disclosure) ──────────────────────── */
.help-nav-mobile {
  display: none;
}
@media (max-width: 59.99rem) {
  .help-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .help-nav {
    display: none;
  }
  .help-nav-mobile {
    display: block;
    margin-bottom: 2rem;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: var(--card);
  }
  .help-nav-mobile summary {
    cursor: pointer;
    padding: 0.7rem 1rem;
    font-weight: 650;
    color: var(--ink);
  }
  .help-nav-mobile nav {
    padding: 0.4rem 1rem 1rem;
    border-top: 1px solid var(--hairline);
  }
}

/* ── Article typography ────────────────────────────────────── */
.help-article h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin: 0 0 0.9rem;
}
.help-article h2 {
  margin-top: 2.6rem;
}
.help-article li {
  margin-bottom: 0.35rem;
}
.help-article a.heading-anchor {
  color: inherit;
  text-decoration: none;
}
.help-article a.heading-anchor:hover,
.help-article a.heading-anchor:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--azure);
}
.help-article img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--hairline);
}

/* Note callouts: plain Markdown blockquotes become note cards. */
.help-article blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--azure);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-soft);
}
.help-article blockquote p {
  margin: 0;
}
.help-article blockquote p + p {
  margin-top: 0.6rem;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  margin: 1.2rem 0;
}
.table-scroll:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 2px;
}
.help-article table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94rem;
}
.help-article th {
  text-align: left;
  font-weight: 650;
  border-bottom: 2px solid var(--hairline);
  padding: 0.45rem 0.9rem 0.45rem 0;
}
.help-article td {
  border-bottom: 1px solid var(--hairline);
  padding: 0.45rem 0.9rem 0.45rem 0;
  vertical-align: top;
}

/* ── Code blocks (build-time Prism; tokens on brand colors) ── */
.help-article pre {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}
.help-article pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.token.comment,
.token.prolog,
.token.cdata,
.token.punctuation,
.token.operator {
  color: var(--ink-soft);
}
.token.keyword,
.token.property,
.token.tag,
.token.boolean,
.token.constant,
.token.selector,
.token.attr-name {
  color: var(--azure);
}
.token.string,
.token.char,
.token.attr-value,
.token.url {
  color: var(--good);
}
.token.function,
.token.number,
.token.class-name {
  color: var(--ink);
}

/* ── Prev / next ───────────────────────────────────────────── */
.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
}
.prev-next a {
  display: block;
  max-width: 48%;
  text-decoration: none;
  font-weight: 600;
}
.prev-next a[rel="next"] {
  margin-left: auto;
  text-align: right;
}
.prev-next-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ── Callouts: Hint (lightbulb) and Help (question mark) ───── */
.callout {
  display: flex;
  gap: 0.85rem;
  margin: 1.5rem 0;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--card);
}
.callout-icon {
  flex: none;
  margin-top: 0.05rem;
}
.callout-body {
  min-width: 0;
}
.callout-body p {
  margin: 0;
}
.callout-body p + p {
  margin-top: 0.6rem;
}
.callout-label {
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.callout-hint {
  background: color-mix(in srgb, var(--azure) 6%, var(--paper));
  border-color: color-mix(in srgb, var(--azure) 24%, var(--hairline));
}
.callout-hint .callout-icon,
.callout-hint .callout-label {
  color: var(--azure);
}
.callout-help {
  background: color-mix(in srgb, var(--good) 7%, var(--paper));
  border-color: color-mix(in srgb, var(--good) 24%, var(--hairline));
}
.callout-help .callout-icon,
.callout-help .callout-label {
  color: var(--good);
}

/* ── Screenshots (dummy PNGs until the real ones exist) ────── */
.shot {
  margin: 1.6rem 0;
}
.shot img {
  display: block;
}
.shot-dialog img,
.shot-menu img {
  margin-inline: auto;
}

/* ── Landing page cards ────────────────────────────────────── */
.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.6rem 0;
  list-style: none;
}
.help-cards li {
  margin: 0;
}
.help-cards a {
  display: block;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
}
.help-cards a strong {
  display: block;
  color: var(--azure);
  margin-bottom: 0.3rem;
}
.help-cards a span {
  font-size: 0.92rem;
  color: var(--ink-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .help-cards a {
    transition: border-color 0.15s ease;
  }
}
.help-cards a:hover {
  border-color: var(--azure);
}
