/* Help pages — shared layout. Imported by anthropic.html, openai.html, bfl.html, gemini.html. */

@import url('../style.css');

body.help-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  min-height: 100vh;
}

.help-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.help-back-link {
  color: #4f8ce8;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  transition: color var(--t-fast) ease;
}

.help-back-link:hover {
  color: #7aabef;
}

.help-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--s-8);
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--s-6);
}

.help-toc {
  position: sticky;
  top: calc(var(--s-4) * 2 + 40px);
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: var(--s-3);
  border-right: 1px solid var(--border);
}

.help-toc h4 {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin-bottom: var(--s-3);
}

.help-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.help-toc a {
  display: block;
  padding: var(--s-2) var(--s-3);
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}

.help-toc a:hover {
  background: var(--bg-3);
  color: var(--text);
}

.help-toc a.is-active {
  background: var(--bg-3);
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: calc(var(--s-3) - 2px);
}

.help-content {
  max-width: 720px;
  line-height: 1.6;
}

.help-content h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--heading-bold);
  margin-bottom: var(--s-5);
  color: var(--text);
}

.help-content h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
  color: var(--text);
  position: relative;
  scroll-margin-top: 80px;
}

.help-content h2 .help-anchor {
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--t-fast) ease;
  padding: 0 4px;
}

.help-content h2:hover .help-anchor {
  opacity: 1;
}

.help-anchor:hover {
  color: var(--accent);
}

.help-content p {
  margin-bottom: var(--s-3);
  color: var(--text);
}

.help-content ol,
.help-content ul {
  margin: var(--s-3) 0 var(--s-4) var(--s-5);
  color: var(--text);
}

.help-content ol li,
.help-content ul li {
  margin-bottom: var(--s-2);
}

.help-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  color: var(--cta);
}

.help-content a {
  color: #4f8ce8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-fast) ease;
}

.help-content a:hover {
  color: #7aabef;
}

.help-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  padding: var(--s-3) var(--s-4);
  margin: var(--s-4) 0;
  border-radius: var(--r-md);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.help-content blockquote.is-warn {
  border-left-color: var(--warn);
}

.help-content blockquote.is-error {
  border-left-color: var(--error);
}

.help-footer {
  text-align: center;
  padding: var(--s-6);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  margin-top: var(--s-10);
}

@media (max-width: 800px) {
  .help-layout {
    grid-template-columns: 1fr;
  }
  .help-toc {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--s-4);
    margin-bottom: var(--s-4);
  }
}
