/* ============================================
   FilerFrog Help — Styles
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-elevated: #f8f9fc;
  --bg-card: #f0f2f8;
  --text: #1e293b;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --accent: #16a34a;
  --accent-bright: #15803d;
  --accent-glow: rgba(22, 163, 74, 0.2);
  --surface-border: rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --sidebar-width: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); text-decoration: underline; }

/* ── Layout ──────────────────────────────── */
.help-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-elevated);
  border-right: 1px solid var(--surface-border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}
.sidebar__header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 16px;
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.sidebar__logo:hover { text-decoration: none; color: var(--text); }
.sidebar__logo img {
  height: 28px;
  width: auto;
  border-radius: 4px;
}
.sidebar__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 20px 6px;
}
.sidebar__link {
  display: block;
  padding: 6px 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar__link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  text-decoration: none;
}
.sidebar__link--active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-glow);
}
.sidebar__link--nested {
  padding-left: 36px;
  font-size: 0.82rem;
}

/* ── Main Content ────────────────────────── */
.help-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 48px 56px 80px;
  max-width: 800px;
}
.help-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.help-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.help-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}
.help-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
}
.help-content ul, .help-content ol {
  margin: 0 0 16px 24px;
  color: var(--text-muted);
}
.help-content li {
  margin-bottom: 6px;
}
.help-content strong {
  color: var(--text);
  font-weight: 600;
}
.help-content code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }

/* ── Tip Box ─────────────────────────────── */
.tip {
  background: rgba(22, 163, 74, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.9rem;
}
.tip strong {
  color: var(--accent);
}

/* ── Example Box ─────────────────────────── */
.example {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
}

/* ── Scenario Box ────────────────────────── */
.scenario {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}
.scenario__title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* ── Topic Grid (index page) ─────────────── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.topic-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}
.topic-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--text);
}
.topic-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

/* ── Mobile Toggle ───────────────────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: flex;
  }
  .help-content {
    margin-left: 0;
    padding: 32px 20px 80px;
  }
  .topic-grid {
    grid-template-columns: 1fr;
  }
}
