/* ==========================================================================
   Dayspool Help Center (dayspool.com/help/)
   Loads AFTER styles.css and only adds what the help pages need. Every
   color, font, radius and size below is a token or pattern already used in
   styles.css (.doc, .steps, .field, .btn, .answer). No new design system.
   ========================================================================== */

.help-article, .help-index { max-width: 46rem; }

/* ---- breadcrumb ---------------------------------------------------------- */
.crumbs { margin: 0 0 1.25rem; font-size: 0.95rem; }
.doc .crumbs ol { list-style: none; margin: 0; padding: 0; max-width: none; display: flex; flex-wrap: wrap; align-items: center; }
.crumbs li { display: inline-flex; align-items: center; margin: 0; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; padding-inline: 0.5rem; color: var(--ink-soft); }
.doc .crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--red-deep); font-weight: 600; }
.crumbs [aria-current] { overflow-wrap: anywhere; }

/* ---- search -------------------------------------------------------------- */
.help-search { margin: 0.5rem 0 1.5rem; }
.help-status { margin: -0.75rem 0 1.25rem; }

/* ---- category groups and article cards ---------------------------------- */
.doc .group > h2 { margin-top: 2.4rem; }
.doc .cards { list-style: none; margin: 0 0 0.5rem; padding: 0; max-width: none; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.doc .cards > li { margin: 0; display: grid; }
.doc a.card {
  display: block; padding: 1.15rem 1.3rem; border-radius: 16px;
  background: var(--blush); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 400;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.doc a.card:hover { transform: translateY(-2px); border-color: var(--red-ground); box-shadow: 0 2px 0 var(--line), 0 14px 26px -18px rgba(169,14,9,.55); }
.doc .card__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 0.4rem; }
.doc .card__desc { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---- FAQ ----------------------------------------------------------------- */
.qa-list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: 0.7rem 0; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--blush); color: var(--red-deep);
  font-family: var(--font-display); font-weight: 750; font-size: 1.25rem; line-height: 1;
}
.qa[open] summary::after { content: "\2212"; }
.qa p { margin: 0 0 1rem; }

/* ---- article body -------------------------------------------------------- */
.help-article h2 { scroll-margin-top: 1rem; }
.help-article h3 { scroll-margin-top: 1rem; }
.doc code { font-family: var(--font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
.doc .next { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.doc ol li > .copybox { margin-top: 0.7rem; }

/* ---- copy box (connector link, Claude Code command) --------------------- */
.copybox { position: relative; margin: 0.4rem 0 1.2rem; max-width: var(--measure); background: var(--ink); border-radius: 14px; padding: 0.9rem 1rem; display: grid; gap: 0.75rem; }
.copybox pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; color: var(--paper); }
.copybox pre code { font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.5; color: var(--paper); }
.copybtn {
  justify-self: start; min-height: 44px; padding: 0 1.2rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--paper); color: var(--ink); font-family: var(--font-text); font-weight: 700; font-size: 1rem;
  box-shadow: 0 2px 0 rgba(35,17,14,.18);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.copybtn:hover { transform: translateY(-1px); }
.copybtn:active { transform: translateY(0); }
.copybtn:focus-visible { outline-color: var(--sun); }
.copybtn.is-done { background: var(--sun); }

/* ---- tables (roles, permissions, permission boxes) ---------------------- */
.table-wrap { margin: 0.5rem 0 1.4rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); color: #3F2723; overflow-wrap: anywhere; }
.table thead th { background: var(--blush); color: var(--ink); font-family: var(--font-display); font-weight: 750; font-size: 0.95rem; white-space: nowrap; }
.table tbody th { color: var(--ink); font-weight: 400; min-width: 5.5rem; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table--wide { min-width: 40rem; }

@media (max-width: 720px) {
  /* each row becomes a card: first cell is its title, the rest are labeled */
  .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .table, .table--wide { min-width: 0; display: block; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tbody { display: grid; gap: 0.8rem; }
  .table tr { display: block; background: var(--blush); border: 1px solid var(--line); border-radius: 16px; padding: 0.7rem 1rem; }
  .table th, .table td { display: block; border: 0; padding: 0.35rem 0; }
  .table tbody th { min-width: 0; font-family: var(--font-display); font-weight: 750; font-size: 1.05rem; padding-bottom: 0.15rem; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.02em; }
}

@media (prefers-reduced-motion: reduce) {
  .doc a.card, .copybtn { transition: none; }
  .doc a.card:hover { transform: none; }
}
