:root {
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-content: #ffffff;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --plant-green: #059669;
  --plant-green-dark: #064e3b;
  --plant-green-light: #ecfdf5;
  --border: #e2e8f0;
  --font-doc: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-doc);
  line-height: 1.65;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--plant-green); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Doc Topbar */
.doc-topbar {
  background: var(--plant-green-dark);
  color: #fff;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.doc-logo {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}
.doc-logo-badge {
  background: var(--plant-green);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-transform: uppercase;
}
.doc-nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
}
.doc-nav a { color: #a7f3d0; padding: 6px 0; }
.doc-nav a.active, .doc-nav a:hover { color: #fff; }

/* 2-Column Wiki Layout */
.wiki-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 32px 0 60px;
}
.wiki-sidebar {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 96px;
}
.sidebar-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.sidebar-menu { list-style: none; margin-bottom: 24px; }
.sidebar-menu li { margin-bottom: 8px; }
.sidebar-menu a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #334155;
}
.sidebar-menu a.active, .sidebar-menu a:hover {
  background: var(--plant-green-light);
  color: var(--plant-green-dark);
  font-weight: 600;
}

/* Main Content Area */
.wiki-main { min-width: 0; }
.wiki-hero {
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.hero-plant-title { font-size: 32px; font-weight: 900; margin-bottom: 12px; color: var(--plant-green-dark); }
.hero-plant-desc { font-size: 16px; color: var(--text-muted); line-height: 1.7; }

/* Plant Cards Grid */
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}
.plant-card {
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.plant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.08);
  border-color: var(--plant-green);
}
.plant-thumb { height: 180px; overflow: hidden; }
.plant-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plant-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.plant-cat { font-size: 11px; font-weight: 800; color: var(--plant-green); text-transform: uppercase; margin-bottom: 6px; }
.plant-name { font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.plant-summary { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }

/* Care Badges Table */
.care-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  color: #475569;
  border: 1px solid #edf2f7;
}

/* Detail Article */
.doc-article {
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  max-width: 900px;
}
.doc-title { font-size: 36px; font-weight: 900; color: var(--plant-green-dark); line-height: 1.25; margin-bottom: 16px; }
.doc-meta { font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 24px; }
.doc-cover { border-radius: 6px; overflow: hidden; margin-bottom: 30px; height: 360px; }
.doc-cover img { width: 100%; height: 100%; object-fit: cover; }

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.param-table th, .param-table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
}
.param-table th { background: var(--plant-green-light); color: var(--plant-green-dark); font-weight: 700; }

.doc-content { font-size: 16px; line-height: 1.8; color: #334155; }
.doc-content h2 { font-size: 24px; font-weight: 800; color: var(--plant-green-dark); margin: 36px 0 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.doc-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; }
.doc-content p { margin-bottom: 20px; }
.doc-content ul, .doc-content ol { margin-bottom: 20px; padding-left: 24px; }

/* Footer */
.doc-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 30px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-sidebar { position: static; }
}
