/* wiki.css — lightweight styles for the wiki section */

/* ── Wiki Home ─────────────────────────────────────── */
.wiki-home {
  max-width: 860px;
  margin: 0 auto;
}

.wiki-intro h1 {
  font-size: 2em;
  margin-bottom: 0.3em;
}

.wiki-desc {
  color: var(--text-color, #444);
  font-size: 1.05em;
  margin-bottom: 1.5em;
}

/* ── Search container (placeholder — JS not implemented yet) ── */
.wiki-search-container {
  margin: 1.5em 0;
}

.wiki-search-input {
  width: 100%;
  padding: 0.5em 0.75em;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  .wiki-search-input {
    background: #1a1a2e;
    border-color: #30363d;
    color: #ddd;
  }
}

.wiki-search-results {
  margin-top: 0.5em;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background: #fff;
}

@media (prefers-color-scheme: dark) {
  .wiki-search-results {
    background: #0d1117;
    border-color: #30363d;
  }
}

/* ── Section list on wiki home ─────────────────────── */
.wiki-sections h2 {
  font-size: 1.2em;
  margin: 1.5em 0 0.5em;
}

.wiki-section-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75em;
}

.wiki-section-item a {
  font-weight: 600;
}

.wiki-section-desc {
  margin: 0.15em 0 0;
  font-size: 0.88em;
  color: #666;
}

/* ── Entry list (subsection pages) ────────────────── */
.wiki-entry-list {
  list-style: none;
  padding: 0;
}

.wiki-entry-item {
  padding: 0.4em 0;
  border-bottom: 1px dashed #e1e4e8;
}

.wiki-entry-item:last-child {
  border-bottom: none;
}

.wiki-entry-desc {
  color: #666;
  font-size: 0.9em;
}

/* ── Single wiki entry ─────────────────────────────── */
.wiki-entry {
  max-width: 860px;
  margin: 0 auto;
}

.wiki-entry-header {
  margin-bottom: 1.5em;
}

.wiki-breadcrumb {
  font-size: 0.9em;
  color: #666;
  margin: 0.3em 0;
}

.wiki-entry-meta time {
  font-size: 0.85em;
  color: #888;
}

/* ── Related + Sources sections ───────────────────── */
.wiki-related,
.wiki-sources {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #e1e4e8;
}

@media (prefers-color-scheme: dark) {
  .wiki-related,
  .wiki-sources {
    border-top-color: #30363d;
  }
}

.wiki-related h2,
.wiki-sources h2 {
  font-size: 1em;
  margin-bottom: 0.5em;
}

.wiki-related-list,
.wiki-sources-list {
  list-style: none;
  padding: 0;
}

.wiki-related-list li,
.wiki-sources-list li {
  margin: 0.3em 0;
}

.wiki-relation-badge {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.1em 0.4em;
  font-size: 0.75em;
  border-radius: 3px;
  background: #e8f4f8;
  color: #2c7da0;
}

@media (prefers-color-scheme: dark) {
  .wiki-relation-badge {
    background: #0d2a38;
    color: #8cc2dd;
  }
}
