/* Help-center layout for /guides, /docs and /compare: sidebar, article, "On this page". Loaded after each page's own
   styles. Markup comes from scripts/site-layout.ts. */

.help { max-width: 1320px; margin: 0 auto; padding: 36px 20px 0; display: grid; grid-template-columns: 236px minmax(0, 1fr) 196px; gap: 56px; align-items: start; }
.article { min-width: 0; max-width: 760px; }
.article > .wrap { max-width: none; padding: 0; }

/* Sidebar */
.side { position: sticky; top: 92px; max-height: calc(100vh - 108px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 24px 0; font-size: 14.5px; scrollbar-width: thin; }
.browse > summary { display: none; }
.side-group { margin: 0 0 6px; }
.side-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 13.5px; color: var(--ink); padding: 7px 10px; border-radius: 8px; user-select: none; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 3px; }
.side-group[open] > summary::after { transform: rotate(45deg); }
.side-group > summary:hover { background: rgba(255,255,255,.6); }
.side ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 10px; }
.side li { margin: 0; }
.side li a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.side li a:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.side li a[aria-current="page"] { color: var(--green); background: var(--mint); font-weight: 600; }

/* Article */
.help main { max-width: none; margin: 0; padding: 0; }
.help .crumb { font-size: 14px; margin: 0 0 12px; }
.help .crumb a { text-decoration: none; } .help .crumb a:hover { color: var(--ink); text-decoration: underline; }
.help h1, .help .intro h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 46px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 14px; }
.help .intro { max-width: none; margin: 0; padding: 0; text-align: left; }
.help .intro h1 em { color: inherit; font-style: normal; }
.help .intro p { margin: 0 0 4px; max-width: none; color: var(--muted); font-size: 19px; }
.help .answer { font-size: 18px; line-height: 1.6; color: #34343a; }
.help main section, .help .block { padding: 30px 0 4px; border-bottom: 0; }
.help main h2, .help .block h2 { font-family: var(--sans); font-weight: 650; font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 10px; scroll-margin-top: 96px; }
.help main h3 { font-size: 17px; margin: 22px 0 4px; }
.help main section + section, .help .block + .block { border-top: 1px solid var(--line); margin-top: 22px; }
.help .note { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--green-2); border-radius: 10px; padding: 12px 16px; font-size: 15px; color: #45454c; }
.help .cmd pre { border-radius: 12px; }
.help .group h2 { margin-bottom: 14px; }
.help .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.help .cards a { height: 100%; font-size: 15.5px; line-height: 1.4; }

/* Meta row: date, reading time, copy for AI */
.help-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; color: var(--muted); margin: 0 0 22px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.help-actions { display: flex; gap: 6px; margin-left: auto; }
.help-actions button, .help-actions a { font: 500 13.5px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.help-actions button:hover, .help-actions a:hover { border-color: #c9c9cf; }

/* Sign-up card at the end of each article */
.help-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 40px 0 0; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; font-size: 15.5px; line-height: 1.5; }
.help-cta > div:first-child { flex: 1 1 320px; }
.help-cta-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.help-cta .btn.sm { padding: 9px 14px; border-radius: 10px; font-size: 14.5px; }
.btn.line { background: var(--paper); border-color: var(--line); color: var(--ink); }

/* On this page */
.toc { position: sticky; top: 92px; font-size: 13.5px; padding-top: 4px; }
.toc p { font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--green); border-left-color: var(--green); font-weight: 600; }

footer { margin-top: 72px; }

@media (max-width: 1200px) {
  .help { grid-template-columns: 220px minmax(0, 1fr); gap: 44px; }
  .toc { display: none; }
}
@media (max-width: 980px) {
  .help { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
  .article { max-width: 760px; margin: 0 auto; width: 100%; }
  .side { position: static; max-height: none; overflow: visible; padding: 0; margin: 0 auto 24px; max-width: 760px; width: 100%; }
  .browse { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
  .browse > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: 15px; }
  .browse > summary::-webkit-details-marker { display: none; }
  .browse > summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
  .browse[open] > summary::after { content: "–"; }
  .browse[open] { padding-bottom: 8px; }
  .browse .side-group { margin: 0 6px 2px; }
}
@media (max-width: 560px) {
  .help { padding-inline: 16px; }
  .help-actions { margin-left: 0; }
}
