/* Markdown body content */
.md-body { font-size: 15px; line-height: 1.7; color: var(--n700, #374151); }
.md-body h1 { font-size: 1.5rem; font-weight: 700; margin: 24px 0 12px; font-family: var(--font-display); }
.md-body h2 { font-size: 1.2rem; font-weight: 600; margin: 20px 0 8px; font-family: var(--font-display); }
.md-body h3 { font-size: 1.05rem; font-weight: 600; margin: 16px 0 6px; }
.md-body p { margin: 0 0 12px; }
.md-body ul, .md-body ol { padding-left: 20px; margin: 0 0 12px; }
.md-body li { margin: 4px 0; }
.md-body code {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  background: var(--n100, #f3f4f6); padding: 2px 6px; border-radius: 4px;
}
.md-body pre {
  background: var(--n900, #111827); color: #e5e7eb; padding: 16px;
  border-radius: 8px; overflow-x: auto; margin: 12px 0;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.5;
}
.md-body pre code { background: none; padding: 0; color: inherit; }
.md-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.md-body th, .md-body td { padding: 8px 12px; border: 1px solid var(--n200, #e5e7eb); text-align: left; }
.md-body th { background: var(--n50, #f9fafb); font-weight: 600; }
.md-body blockquote {
  border-left: 3px solid var(--sunrise, #ff6b2c); padding: 8px 16px;
  margin: 12px 0; background: var(--n50, #fef7f0); border-radius: 0 6px 6px 0;
}
.md-body a { color: var(--sunrise, #ff6b2c); text-decoration: underline; }
.md-body hr { border: none; border-top: 1px solid var(--n200, #e5e7eb); margin: 20px 0; }

/* Tool requirement badges */
.lib-tool-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lib-tool-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500;
  background: var(--n100, #f3f4f6); color: var(--n600, #4b5563);
  cursor: pointer; transition: background 0.15s;
}
.lib-tool-badge:hover { background: var(--n200, #e5e7eb); }
.lib-tool-badge.required { border: 1px solid var(--n300, #d1d5db); }

/* Content type labels */
.lib-type-label {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.lib-type-label.foundation { background: #dbeafe; color: #1e40af; }
.lib-type-label.tool_guide { background: #d1fae5; color: #065f46; }
.lib-type-label.recipe { background: #fef3c7; color: #92400e; }

/* Section headers in sidebar */
.nav-section-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--n400); padding: 16px 16px 4px;
}

/* Recommendation cards */
.recs-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-bottom: 44px;
}

.rec-card {
  padding: 20px 22px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255,255,255,0.8);
  cursor: pointer; transition: all 0.25s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.rec-card:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-2px);
  box-shadow: var(--sh-md), inset 0 1px 0 rgba(255,255,255,0.8);
}
.rec-card-reason {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--sunrise); opacity: 0.8;
}
.rec-card-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 15px; letter-spacing: -0.01em; color: var(--n700);
}
.rec-card-desc { font-size: 12px; color: var(--n400); line-height: 1.5; }
.rec-card-arrow {
  font-size: 16px; color: var(--n300); align-self: flex-end;
  transition: transform 0.2s ease, color 0.2s ease;
}
.rec-card:hover .rec-card-arrow { transform: translateX(3px); color: var(--sunrise); }

/* Next action */
.next-action {
  padding: 22px 26px; border-radius: var(--radius-lg);
  background: rgba(255,107,44,0.03);
  border: 1px solid rgba(255,107,44,0.08);
  margin-bottom: 44px; display: flex; align-items: center; gap: 20px;
  cursor: pointer; transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(255,107,44,0.04);
}
.next-action:hover {
  background: rgba(255,107,44,0.06); transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,107,44,0.08);
  border-color: rgba(255,107,44,0.14);
}
.next-action-dot {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--sunrise-gradient);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255,107,44,0.25);
}
.next-action-text h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 15px; margin-bottom: 3px; color: var(--night);
  letter-spacing: -0.01em;
}
.next-action-text p { font-size: 13px; color: var(--n400); line-height: 1.5; }
.next-action-arrow {
  margin-left: auto; font-size: 18px; color: var(--n300);
  transition: transform 0.2s ease;
}
.next-action:hover .next-action-arrow { transform: translateX(3px); color: var(--sunrise); }

/* Activity */
.activity-list { display: flex; flex-direction: column; gap: 6px; }
.activity-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: var(--sh-xs), inset 0 1px 0 rgba(255,255,255,0.7);
  transition: all 0.2s ease;
}
.activity-item:hover {
  background: rgba(255,255,255,0.8);
  box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255,255,255,0.7);
}
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4CAF50; flex-shrink: 0;
  box-shadow: 0 0 8px rgba(76,175,80,0.3);
}
.activity-name { font-size: 13px; font-weight: 500; color: var(--n700); }
.activity-badge {
  margin-left: auto; font-size: 11px; color: var(--n400);
  font-weight: 500; letter-spacing: 0.02em;
}

/* Inline edit */
.inline-edit {
  background: none; border: none; border-bottom: 1px dashed rgba(139,139,158,0.3);
  font-family: var(--font); font-size: inherit; color: inherit;
  padding: 0 2px; outline: none; width: auto; min-width: 40px;
}
.inline-edit:focus { border-bottom-color: var(--sunrise); }

/* Toast notifications */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--pure); opacity: 0; transform: translateX(20px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.error { background: #d32f2f; }
.toast.info { background: var(--night); }
