/* ═══════════════════════════════════════════════════════
   PANEL WIKI IA — Bibliothèque vivante (Dawn)
   Deux kinds : auto (Jarvis) vs perso
   Padding horizontal géré globalement via .panel-page
   ═══════════════════════════════════════════════════════ */

.panel-hero--compact { padding-bottom: 20px; }

/* ── Search bar ─────────────────────────────────────────── */
.wiki-searchbar {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin: 24px 0 28px;
}
.wiki-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 3px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 52px;
}
.wiki-search-input-wrap:focus-within {
  border-color: var(--tx);
  box-shadow: 0 0 0 1px var(--tx);
}
.wiki-search-input-wrap svg { color: var(--tx2); flex-shrink: 0; }
.wiki-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--tx);
  height: 100%;
  padding: 0;
  min-width: 0;
}
.wiki-search-input::placeholder {
  color: var(--tx3);
  font-style: italic;
}
.wiki-search-clear {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--tx2);
  padding: 0 4px;
  font-family: inherit;
}
.wiki-search-clear:hover { color: var(--tx); }
.wiki-search-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tx2);
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 2px;
  padding: 2px 8px;
  letter-spacing: 0.05em;
}
.wiki-create-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 13.5px;
}

/* ── Filters ─────────────────────────────────────────────── */
.wiki-filters {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--bd);
}
.wiki-filter-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.wiki-filter-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.wiki-filter-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wiki-filter-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tx2);
  font-weight: 600;
  white-space: nowrap;
}
.wiki-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Pill (override si besoin par rapport au global) */
.wiki-filter-pills .pill {
  background: transparent;
  border: 1px solid var(--bd);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--tx2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wiki-filter-pills .pill:hover {
  color: var(--tx);
  border-color: var(--tx2);
}
.wiki-filter-pills .pill.is-active {
  background: var(--tx);
  color: var(--bg);
  border-color: var(--tx);
}
.wiki-result-count {
  font-size: 12.5px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  margin-left: auto;
}

/* ── Kind dots & badges ──────────────────────────────────── */
.wiki-kind-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.wiki-kind-dot--auto { background: var(--brand); }
.wiki-kind-dot--perso {
  background: transparent;
  border: 1.5px solid var(--tx);
  width: 8px;
  height: 8px;
}

.wiki-kind-badge {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wiki-kind-badge--auto {
  background: rgba(217,119,87,0.12);
  color: var(--brand);
}
.wiki-kind-badge--perso {
  background: var(--bg2);
  color: var(--tx);
  border: 1px solid var(--bd);
}

/* ── Pinned — accès rapide ──────────────────────────────── */
.wiki-pinned {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--bd);
}
.wiki-pinned-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.wiki-pinned-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s ease;
}
.wiki-pinned-item:hover {
  border-color: var(--tx);
  background: var(--bg2);
}
.wiki-pinned-title {
  flex: 1;
  font-size: 14px;
  color: var(--tx);
  font-weight: 500;
  line-height: 1.3;
}
.wiki-pinned-meta {
  font-size: 11.5px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── List — entrées éditoriales ─────────────────────────── */
.wiki-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 40px;
}
.wiki-item {
  padding: 24px 0 24px 24px;
  border-top: 1px solid var(--bd);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}
.wiki-item:last-child { border-bottom: 1px solid var(--bd); }
.wiki-item::before {
  content: "";
  position: absolute;
  left: 0; top: 28px;
  width: 3px;
  height: 28px;
  background: transparent;
  transition: background 0.15s ease;
}
.wiki-item--auto::before { background: var(--brand); opacity: 0.6; }
.wiki-item--perso::before { background: var(--tx); opacity: 0.4; }
.wiki-item:hover { background: color-mix(in srgb, var(--tx) 1.5%, transparent); }
.wiki-item:hover::before { opacity: 1; }

.wiki-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--tx2);
}
.wiki-item-kind {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 10.5px;
}
.wiki-item--auto .wiki-item-kind { color: var(--brand); }
.wiki-item--perso .wiki-item-kind { color: var(--tx); }
.wiki-item-sep { opacity: 0.4; }
.wiki-item-cat,
.wiki-item-updated {
  font-size: 11px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
}
.wiki-item-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--tx);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.wiki-item-excerpt {
  font-size: 14px;
  color: var(--tx2);
  line-height: 1.55;
  margin: 0 0 14px;
  max-width: 820px;
}
.wiki-item-excerpt mark,
.wiki-item-title mark {
  background: rgba(217,119,87,0.2);
  color: var(--tx);
  padding: 0 2px;
  border-radius: 1px;
}
.wiki-item-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}
.wiki-item-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.wiki-item-tags {
  display: flex;
  gap: 8px;
  margin-left: 12px;
  flex-wrap: wrap;
}
.wiki-item-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--tx2);
  letter-spacing: 0.02em;
}

/* ── Empty state ────────────────────────────────────────── */
.wiki-empty {
  text-align: center;
  padding: 80px 20px;
  max-width: 560px;
  margin: 40px auto 0;
}
.wiki-empty-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--tx);
  margin: 12px 0 14px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.wiki-empty-body {
  font-size: 14.5px;
  color: var(--tx2);
  margin-bottom: 28px;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════
   DETAIL VIEW — article + sidebar
   ═══════════════════════════════════════════════════════ */
.panel-page--wiki-detail { max-width: 1200px; margin: 0 auto; }
.wiki-detail-topbar { margin-bottom: 40px; }
.wiki-detail-actions {
  display: flex;
  gap: 8px;
}
.btn.btn--sm {
  font-size: 11.5px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wiki-detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 60px;
  align-items: start;
}

.wiki-detail-article {
  max-width: 720px;
}

.wiki-detail-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 40px;
}
.wiki-detail-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--tx);
  margin: 10px 0 18px;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.wiki-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.wiki-detail-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wiki-detail-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tx2);
  letter-spacing: 0.02em;
  padding: 3px 8px;
  background: var(--bg2);
  border-radius: 2px;
}

/* Content (mardown-like rendering) */
.wiki-detail-content {
  color: var(--tx);
  font-size: 15.5px;
  line-height: 1.72;
}
.wiki-content-h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--tx);
  margin: 48px 0 18px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.wiki-content-h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--tx);
  margin: 36px 0 12px;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.wiki-content-p {
  margin: 0 0 18px;
  text-wrap: pretty;
}
.wiki-content-p strong {
  color: var(--tx);
  font-weight: 600;
}
.wiki-content-p em {
  font-style: italic;
}
.wiki-content-quote {
  margin: 24px 0;
  padding: 14px 24px;
  border-left: 3px solid var(--brand);
  background: rgba(217,119,87,0.04);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: var(--tx);
  line-height: 1.55;
  border-radius: 0 3px 3px 0;
}
.wiki-content-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.wiki-content-list li {
  padding: 4px 0 4px 22px;
  position: relative;
  line-height: 1.6;
}
.wiki-content-list li::before {
  content: "·";
  position: absolute;
  left: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}
.wiki-content-list li strong { font-weight: 600; color: var(--tx); }

/* Auto footer — maintenance Jarvis */
.wiki-detail-foot-auto {
  margin-top: 56px;
  padding: 18px 22px;
  background: var(--bg2);
  border: 1px dashed var(--bd);
  border-radius: 3px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--tx2);
  line-height: 1.5;
  font-style: italic;
}
.wiki-detail-foot-auto svg {
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Sidebar */
.wiki-detail-aside {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 10px;
}
.wiki-aside-section {
  padding-bottom: 0;
}
.wiki-aside-section .section-kicker {
  margin-bottom: 12px;
}
.wiki-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--bd);
}
.wiki-toc li a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 13px;
  color: var(--tx2);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.wiki-toc li a:hover {
  color: var(--tx);
  border-left-color: var(--brand);
}
.wiki-linked {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wiki-linked-item {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--bd);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color 0.15s ease;
}
.wiki-linked-item:last-child { border-bottom: none; }
.wiki-linked-item .wiki-kind-dot { margin-top: 6px; }
.wiki-linked-title {
  flex: 1;
  font-size: 13px;
  color: var(--tx);
  line-height: 1.4;
  font-weight: 400;
}
.wiki-linked-item:hover .wiki-linked-title { color: var(--brand); }

.wiki-aside-ask {
  padding: 18px 18px;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 3px;
}
.wiki-aside-ask .section-kicker { margin-bottom: 10px; }
.wiki-ask-btn {
  width: 100%;
  justify-content: center;
  font-size: 12.5px;
}

/* ═══════════════════════════════════════════════════════
   CREATE FLOW — demander à Jarvis
   ═══════════════════════════════════════════════════════ */
.wiki-create {
  padding: 40px 0 60px;
  max-width: 720px;
  margin: 0 auto;
}
.wiki-create-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--tx);
  margin: 10px 0 16px;
  letter-spacing: -0.02em;
}
.wiki-create-body {
  font-size: 16px;
  color: var(--tx2);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
}
.wiki-create-field {
  margin-bottom: 32px;
}
.wiki-create-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tx2);
  font-weight: 600;
  margin-bottom: 12px;
}
.wiki-create-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 3px;
  color: var(--tx);
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease;
}
.wiki-create-input:focus {
  outline: none;
  border-color: var(--tx);
  box-shadow: 0 0 0 1px var(--tx);
}
.wiki-create-input::placeholder {
  color: var(--tx3);
  font-style: italic;
}

/* Source selection */
.wiki-source-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wiki-source {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.wiki-source input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.wiki-source:hover {
  border-color: var(--tx2);
}
.wiki-source.is-on {
  border-color: var(--brand);
  background: rgba(217,119,87,0.04);
  box-shadow: 0 0 0 1px var(--brand);
}
.wiki-source-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--tx);
  font-weight: 500;
}
.wiki-source-head svg {
  color: var(--tx2);
}
.wiki-source.is-on .wiki-source-head svg {
  color: var(--brand);
}
.wiki-source-desc {
  font-size: 12px;
  color: var(--tx2);
  line-height: 1.4;
}

/* Depth */
.wiki-depth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wiki-depth {
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s ease;
}
.wiki-depth:hover {
  border-color: var(--tx2);
}
.wiki-depth.is-on {
  border-color: var(--brand);
  background: rgba(217,119,87,0.04);
  box-shadow: 0 0 0 1px var(--brand);
}
.wiki-depth-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--tx);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.wiki-depth-meta {
  font-size: 12px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
}

.wiki-create-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--bd);
}
.wiki-create-hint {
  font-size: 13px;
  color: var(--tx2);
  font-style: italic;
}

/* ── Generating screen ─────────────────────────────────── */
.wiki-gen {
  padding: 40px 0;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
.wiki-gen-pulse {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,119,87,0.35) 0%, transparent 70%);
  margin: 40px auto 24px;
  animation: wiki-pulse 1.8s ease-in-out 3;
  animation-fill-mode: forwards;
}
@keyframes wiki-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
}
.wiki-gen-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--tx);
  margin: 8px 0 36px;
  letter-spacing: -0.01em;
}
.wiki-gen-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.wiki-gen-steps li {
  padding: 12px 16px 12px 40px;
  font-size: 13.5px;
  color: var(--tx2);
  position: relative;
  border-bottom: 1px dashed var(--bd);
  line-height: 1.4;
  transition: color 0.3s ease;
}
.wiki-gen-steps li:last-child { border-bottom: none; }
.wiki-gen-steps li::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--bd);
  background: var(--bg);
  transition: all 0.3s ease;
}
.wiki-gen-steps li.is-active {
  color: var(--tx);
}
.wiki-gen-steps li.is-active::before {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217,119,87,0.15);
}
.wiki-gen-steps li.is-done {
  color: var(--tx2);
}
.wiki-gen-steps li.is-done::before {
  background: var(--tx2);
  border-color: var(--tx2);
}

.wiki-gen-progress {
  margin-top: 20px;
}
.wiki-gen-progress-track {
  height: 3px;
  background: var(--bd);
  border-radius: 2px;
  overflow: hidden;
}
.wiki-gen-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.2s linear;
}

/* ── Review screen ──────────────────────────────────────── */
.wiki-review {
  padding: 60px 0;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.wiki-review-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--tx);
  margin: 10px 0 20px;
  letter-spacing: -0.02em;
}
.wiki-review-body {
  font-size: 15.5px;
  color: var(--tx2);
  line-height: 1.6;
  margin-bottom: 40px;
}
.wiki-review-body strong {
  color: var(--tx);
  font-weight: 500;
}
.wiki-review-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1000px) {
  .wiki-searchbar { flex-direction: column; }
  .wiki-pinned-list { grid-template-columns: 1fr; }
  .wiki-detail-wrap { grid-template-columns: 1fr; gap: 40px; }
  .wiki-detail-aside { position: static; }
  .wiki-detail-title { font-size: 34px; }
  .wiki-source-grid, .wiki-depth-grid { grid-template-columns: 1fr; }
  .wiki-filter-row-bottom { align-items: flex-start; flex-direction: column; }
  .wiki-result-count { margin-left: 0; }
}

/* ─── Create flow — mode switcher + perso form ─── */
.wiki-create-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 24px;
}
.wiki-create-mode {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--bd);
  background: var(--bg2);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .14s ease, background .14s ease;
}
.wiki-create-mode:hover { border-color: var(--tx3); }
.wiki-create-mode.is-active {
  border-color: var(--brand);
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--brand);
}
.wiki-create-mode-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  margin-bottom: 4px;
}
.wiki-create-mode-desc {
  font-size: 12px;
  color: var(--tx2);
  line-height: 1.4;
}
.wiki-create-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bd);
  background: var(--bg2);
  border-radius: 4px;
  font-family: var(--font-mono, "JetBrains Mono"), monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--tx);
  resize: vertical;
  min-height: 180px;
}
.wiki-create-textarea:focus {
  outline: none;
  border-color: var(--brand);
}

/* ─── Markdown-rendered content (marked.js + DOMPurify) ─── */
.wiki-markdown h1, .wiki-markdown h2, .wiki-markdown h3 {
  scroll-margin-top: 80px;
}
.wiki-markdown pre {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 4px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono, "JetBrains Mono"), monospace;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 12px 0;
}
.wiki-markdown code {
  font-family: var(--font-mono, "JetBrains Mono"), monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 3px;
}
.wiki-markdown pre code { padding: 0; background: none; border: none; }
.wiki-markdown a { color: var(--brand); text-decoration: underline; }
.wiki-markdown blockquote {
  border-left: 3px solid var(--brand);
  padding: 6px 14px;
  margin: 12px 0;
  color: var(--tx2);
  font-style: italic;
}
.wiki-markdown table {
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.wiki-markdown th, .wiki-markdown td {
  padding: 6px 10px;
  border: 1px solid var(--bd);
}
.wiki-markdown img { max-width: 100%; height: auto; margin: 12px 0; }

/* ─── TOC depth indentation ─── */
.wiki-toc-depth-2 { padding-left: 0; }
.wiki-toc-depth-3 { padding-left: 14px; font-size: 12px; }
