/* Help documentation — layered on top of /css/main.css */

html, body {
  height: auto;
  min-height: 100%;
}

body.help-body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Georgia', 'Garamond', serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* ---------- Top bar ---------- */
.help-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.help-topbar .help-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.help-topbar a.help-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
}

.help-topbar a.help-back:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

.help-menu-btn {
  display: none;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* ---------- Layout ---------- */
.help-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 60px);
}

.help-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 60px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.help-sidebar h4 {
  margin: 1.25rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-family: 'Segoe UI', Arial, sans-serif;
}

.help-sidebar h4:first-child { margin-top: 0; }

.help-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-sidebar li a {
  display: block;
  padding: 0.45rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}

.help-sidebar li a:hover {
  background: var(--bg-card);
  color: var(--accent);
}

.help-sidebar li a.active {
  border-left-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

.help-main {
  padding: 2rem 3rem 4rem;
  max-width: 820px;
}

/* ---------- Content ---------- */
.help-main h1 {
  color: var(--accent);
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

.help-main h2 {
  color: var(--accent);
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.help-main h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.help-main p {
  margin: 0.75rem 0;
}

.help-main a {
  color: var(--accent);
}

.help-main ol, .help-main ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.help-main li {
  margin: 0.35rem 0;
}

.help-main code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}

.help-main kbd {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.85em;
  color: var(--text);
}

.help-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.help-breadcrumb a { color: var(--text-muted); }
.help-breadcrumb a:hover { color: var(--accent); }

.help-audience {
  display: inline-block;
  margin: 0.25rem 0 0.5rem;
  padding: 0.15rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Segoe UI', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.help-audience.admin { border-color: var(--accent); color: var(--accent); }
.help-audience.organizer { border-color: #8ba06b; color: #b5c98e; }

.help-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.5rem;
}

/* ---------- Callouts ---------- */
.help-callout {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
}

.help-callout.tip { border-left-color: #8ba06b; }
.help-callout.warn { border-left-color: #c4a06a; }
.help-callout.danger { border-left-color: var(--danger); }

.help-callout-title {
  display: block;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: 0.3px;
}

.help-callout.tip .help-callout-title { color: #b5c98e; }
.help-callout.warn .help-callout-title { color: #e2b880; }
.help-callout.danger .help-callout-title { color: var(--danger); }

.help-callout p:first-child { margin-top: 0; }
.help-callout p:last-child { margin-bottom: 0; }

/* ---------- Mockup frames (live UI snippets) ---------- */
.mockup {
  margin: 1.25rem 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  position: relative;
}

.mockup::before {
  content: "Example";
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  background: var(--bg);
  padding: 0 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mockup-caption {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: 'Georgia', serif;
}

/* Buttons inside mockups mirror main.css classes */
.mockup .btn-subtle,
.mockup .btn-accent {
  font: inherit;
  font-size: 0.85rem;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: default;
  border: 1px solid var(--border);
}

.mockup .btn-subtle {
  background: var(--bg-card);
  color: var(--text);
}

.mockup .btn-accent {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.mockup .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mockup .mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.mockup .mock-title {
  color: var(--accent);
  font-weight: bold;
  font-size: 0.95rem;
}

.mockup .mock-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  margin: 0.5rem 0;
}

.mockup .mock-input,
.mockup .mock-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

.mockup .mock-textarea { min-height: 3.5rem; resize: none; }

.mockup .mock-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mockup .mock-page-num {
  background: rgba(0,0,0,0.6);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

.mockup .mock-thumb-strip {
  display: flex;
  gap: 4px;
  overflow: hidden;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.mockup .mock-thumb {
  width: 32px;
  height: 48px;
  background: linear-gradient(135deg, #3a3228 0%, #2a2218 100%);
  border: 1px solid var(--border);
  border-radius: 2px;
  flex: 0 0 auto;
  position: relative;
}

.mockup .mock-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.mockup .mock-face {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #5a4a3a 0%, #3a2a1a 100%);
  border-radius: 50%;
  display: inline-block;
  border: 2px solid var(--border);
  margin: 0 0.25rem;
}

.mockup .mock-face.named { border-color: var(--accent); }

.mockup .mock-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.mockup .mock-page-slot {
  background: linear-gradient(135deg, #3a3228 0%, #2a2218 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

.mockup .mock-spread {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 0;
  align-items: stretch;
}

.mockup .mock-spread .spine {
  background: var(--border);
}

.mockup .mock-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  margin-left: 0.35rem;
  font-weight: bold;
}

/* ---------- Step list ---------- */
.help-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.help-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin: 0.75rem 0;
}

.help-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
}

/* ---------- Page nav (prev/next at bottom) ---------- */
.help-pagenav {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.help-pagenav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  max-width: 48%;
}

.help-pagenav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.help-pagenav a.prev::before { content: "← "; color: var(--accent); }
.help-pagenav a.next::after { content: " →"; color: var(--accent); }
.help-pagenav a.next { text-align: right; margin-left: auto; }

/* ---------- Landing topic cards ---------- */
.help-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.help-topic-card {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
}

.help-topic-card:hover {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.help-topic-card h3 {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 1rem;
  font-family: 'Segoe UI', sans-serif;
}

.help-topic-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: 'Georgia', serif;
}

.help-role-heading {
  margin: 1.75rem 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-family: 'Segoe UI', sans-serif;
}

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
  .help-layout { grid-template-columns: 1fr; }

  .help-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    max-height: none;
    z-index: 100;
    transition: left 0.25s;
    border-right: 1px solid var(--border);
  }

  .help-sidebar.open { left: 0; }

  .help-sidebar-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 90;
  }

  .help-sidebar-scrim.open { display: block; }

  .help-menu-btn { display: inline-block; }

  .help-main { padding: 1.25rem; }
  .help-main h1 { font-size: 1.5rem; }
  .help-main h2 { font-size: 1.15rem; }

  .help-pagenav { flex-direction: column; }
  .help-pagenav a { max-width: 100%; }
}
