/* ═══════════════════════════════════════════════════════════════════════════
   HELP VIEW — Reworked
   ═══════════════════════════════════════════════════════════════════════════ */

.help-view {
  max-width: var(--grid-max-width, 1400px);
  padding: var(--space-lg, 16px) var(--space-xl, 20px) var(--space-xl, 20px);
  margin: 0 auto;
  animation: fadeIn 0.3s ease-in;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Hero Intro ── */
.help-hero {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.help-hero-headline {
  font-size: 15px;
  color: var(--text-primary, #333);
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.help-hero-headline strong {
  color: var(--accent);
  font-size: 17px;
}

/* Quick start steps — 3 horizontal cards */
.help-quick-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.help-quick-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 10px);
  font-size: 13px;
  color: var(--text-secondary, #555);
  line-height: 1.4;
}

.help-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Feature Navigation Grid ── */
.help-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.help-nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--nav-accent, var(--color-primary));
  border-radius: var(--radius-lg, 10px);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.help-nav-card:hover {
  border-color: var(--nav-accent, var(--color-primary));
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.help-nav-card.active,
.help-nav-card.about-feature--active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-color: var(--nav-accent, var(--color-primary));
  border-left-width: 4px;
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.12);
}

.help-nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--nav-accent, var(--color-primary)) 10%, transparent);
}

.help-nav-text {
  min-width: 0;
}

.help-nav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #333);
  line-height: 1.3;
}

.help-nav-desc {
  font-size: 11px;
  color: var(--text-tertiary, #888);
  line-height: 1.3;
  margin-top: 2px;
}

/* Accent colors per nav card */
.help-nav-card[data-help="quickstart"] { --nav-accent: #7c3aed; }
.help-nav-card[data-help="collection"] { --nav-accent: #059669; }
.help-nav-card[data-help="filters"] { --nav-accent: #2563eb; }
.help-nav-card[data-help="binders"] { --nav-accent: #d97706; }
.help-nav-card[data-help="orders"] { --nav-accent: #dc2626; }
.help-nav-card[data-help="stats"] { --nav-accent: #0891b2; }
.help-nav-card[data-help="cloud"] { --nav-accent: #6366f1; }
.help-nav-card[data-help="interface"] { --nav-accent: #64748b; }
.help-nav-card[data-help="collecting"] { --nav-accent: #b45309; }
.help-nav-card[data-help="faq"] { --nav-accent: #7c3aed; }

/* ── Help Detail Panels ── */
.help-panels {
  min-height: 0;
}

.help-panel {
  animation: fadeIn 0.2s ease-in;
}

.help-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.help-panel-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--panel-accent, var(--color-primary)) 10%, transparent);
}

.help-panel h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #333);
  margin: 0;
  flex: 1;
}

.help-panel > p,
.help-panel-body > p {
  font-size: 13px;
  color: var(--text-secondary, #555);
  line-height: 1.65;
  margin: 0 0 12px 0;
}

/* Panel layout — text + screenshot side by side */
.help-panel-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.help-panel-layout--text-only {
  grid-template-columns: 1fr;
}

/* ── Screenshot Placeholder ── */
.help-screenshot {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg, 10px);
  padding: 0;
  overflow: hidden;
  background: var(--bg-secondary, #f8f9fa);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.help-screenshot--filled {
  border-style: solid;
  border-width: 1px;
}

.help-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg, 10px) - 2px);
}

.help-screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary, #aaa);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.help-screenshot-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

.help-screenshot-hint {
  font-size: 10px;
  font-family: monospace;
  color: var(--text-tertiary, #aaa);
  opacity: 0.7;
}

/* ── Help List ── */
.help-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.help-list li {
  font-size: 13px;
  color: var(--text-secondary, #555);
  line-height: 1.6;
  padding: 5px 0 5px 18px;
  position: relative;
}

.help-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--panel-accent, var(--color-primary));
  opacity: 0.6;
}

.help-list li strong {
  color: var(--text-primary, #444);
}

.help-hint {
  font-size: 12px;
  color: var(--text-tertiary, #888);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

/* ── Step-by-step guide (Getting Started) ── */
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 12px 0;
}

.help-step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.help-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}

.help-step-item strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary, #333);
  margin-bottom: 4px;
}

.help-step-item p {
  font-size: 13px;
  color: var(--text-secondary, #666);
  line-height: 1.6;
  margin: 0;
}

/* ── Pro-tip callout boxes ── */
.help-pro-tip {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg, 10px) var(--radius-lg, 10px) 0;
  font-size: 13px;
  color: var(--text-dim, #555);
  line-height: 1.6;
}

.help-pro-tip strong {
  color: var(--color-primary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.help-pro-tip kbd,
.help-shortcut kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: monospace;
  background: #f3f4f6;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  color: #444;
  box-shadow: 0 1px 0 #ccc;
}

/* ── Section titles ── */
.help-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #444);
  margin: 24px 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.help-section-title:first-of-type {
  margin-top: 12px;
}

/* ── FAQ list ── */
.help-faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.help-faq-item {
  padding: 12px 16px;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.5));
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.06);
}

.help-faq-item strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary, #333);
  margin-bottom: 4px;
}

.help-faq-item p {
  font-size: 13px;
  color: var(--text-secondary, #666);
  line-height: 1.6;
  margin: 0;
}

/* ── Links ── */
.help-panel a[href] {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.help-panel a[href]:hover {
  border-bottom-color: var(--color-primary);
}

.help-panel a[target='_blank']::after {
  content: '\2009\2197';
  font-size: 0.8em;
  opacity: 0.6;
}

/* ── Keyboard shortcuts grid ── */
.help-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.help-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary, #555);
  padding: 6px 0;
}

.help-shortcut kbd {
  min-width: 28px;
  padding: 3px 7px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .help-panel-layout {
    grid-template-columns: 1fr;
  }
  .help-screenshot {
    aspect-ratio: 16 / 9;
    max-height: 250px;
  }
}

@media (max-width: 768px) {
  .help-quick-steps {
    grid-template-columns: 1fr;
  }
  .help-nav {
    grid-template-columns: repeat(2, 1fr);
  }
  .help-shortcuts {
    grid-template-columns: 1fr;
  }
  .help-step-item {
    gap: 10px;
  }
  .help-step-badge {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}
