.page-wiki.page-home {
  min-width: 0;
  background: #f5f5f5;
}

.page-wiki .wiki-app {
  min-height: 100vh;
  padding-bottom: 44px;
  background: #f5f5f5;
}

.wiki-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  z-index: 210;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.wiki-mask[hidden] {
  display: none;
}

.wiki-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: 248px;
  height: 100vh;
  z-index: 220;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #eeeeee;
  box-shadow: none;
  padding: 14px 12px 16px;
  box-sizing: border-box;
  transform: translateX(-100%);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  pointer-events: none;
}

.wiki-rail.is-open {
  transform: translateX(0);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
}

.wiki-rail-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 6px 12px;
}

.wiki-rail-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.wiki-rail-name {
  font-size: 15px;
  font-weight: 600;
  color: #222222;
  white-space: nowrap;
}

.wiki-rail-collapse {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #888888;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wiki-rail-collapse:hover {
  background: #f5f5f5;
  color: #222222;
}

.wiki-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  flex: 1;
}

.wiki-rail-item,
.wiki-rail-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #222222;
  font: inherit;
  font-size: 14px;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.wiki-rail-item svg,
.wiki-rail-subitem svg {
  flex-shrink: 0;
  color: #666666;
}

.wiki-rail-item:hover,
.wiki-rail-subitem:hover {
  background: #f7f7f7;
}

.wiki-rail-item.is-active {
  background: #fff5f0;
  color: #ff5e3b;
  font-weight: 600;
}

.wiki-rail-item.is-active svg {
  color: #ff5e3b;
}

.wiki-rail-badge {
  margin-left: 6px;
  padding: 0 6px;
  height: 18px;
  border-radius: 6px;
  background: #fff5f0;
  color: #ff5e3b;
  font-size: 11px;
  line-height: 18px;
  font-weight: 500;
}

.wiki-rail-sub {
  display: flex;
  flex-direction: column;
  padding-left: 18px;
}

.wiki-rail-foot {
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
  margin-top: 8px;
}

.wiki-rail-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-top: 8px;
  border-radius: 12px;
  background: #ff5e3b;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.wiki-rail-login:hover {
  background: #ff4d2a;
  color: #ffffff;
}

.wiki-stage {
  min-width: 0;
  padding: 12px;
}

.wiki-canvas {
  min-height: calc(100vh - 44px - 24px);
  background: #f7f7f8;
  border-radius: 20px;
  padding: 16px 28px 36px;
}

.wiki-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wiki-toolbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wiki-nav-open {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.wiki-nav-open span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #333333;
  border-radius: 1px;
}

.wiki-nav-open:hover {
  background: #f5f5f5;
}

.page-wiki.wiki-rail-open .wiki-nav-open {
  background: #fff5f0;
}

.page-wiki.wiki-rail-open .wiki-nav-open span {
  background: #ff5e3b;
}

.wiki-back {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #666666;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wiki-back:hover {
  background: #ffffff;
  color: #222222;
}

.wiki-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wiki-style {
  position: relative;
}

.wiki-ghost,
.wiki-style-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #ffffff;
  color: #333333;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.wiki-ghost:hover,
.wiki-style-btn:hover {
  border-color: #ff5e3b;
  color: #ff5e3b;
}

.wiki-join {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: #ff5e3b;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.wiki-join:hover {
  background: #ff4d2a;
  color: #ffffff;
}

.wiki-style-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 120px;
  padding: 6px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

.wiki-style-menu button {
  display: block;
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.wiki-style-menu button.is-active,
.wiki-style-menu button:hover {
  background: #fff5f0;
  color: #ff5e3b;
}

.wiki-hero {
  max-width: 760px;
  margin: 28px auto 0;
  text-align: center;
}

.wiki-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  color: #191919;
}

.wiki-title-mark {
  width: 36px;
  height: 36px;
  color: #ff5e3b;
}

.wiki-subtitle {
  margin-top: 10px;
  color: #666666;
  font-size: 16px;
}

.wiki-modes {
  display: inline-flex;
  margin-top: 22px;
  padding: 4px;
  background: #ececee;
  border-radius: 999px;
}

.wiki-mode {
  min-width: 72px;
  height: 32px;
  padding: 0 18px;
  border: none;
  background: transparent;
  border-radius: 999px;
  color: #666666;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.wiki-mode.is-active {
  background: #ffffff;
  color: #222222;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.wiki-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 760px;
  margin: 18px auto 0;
  height: 52px;
  padding: 0 8px 0 16px;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.wiki-search svg {
  flex-shrink: 0;
  color: #999999;
}

.wiki-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #222222;
}

.wiki-search input::placeholder {
  color: #b0b0b0;
}

.wiki-ai {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: #fff5f0;
  color: #ff5e3b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.wiki-ai:hover {
  background: #ffe8df;
}

.wiki-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wiki-send:hover {
  background: #ff5e3b;
  color: #ffffff;
}

.wiki-explore {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 36px;
}

.wiki-explore-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #888888;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  padding: 0 0 8px;
  border-bottom: 2px solid transparent;
}

.wiki-explore-tab.is-active {
  color: #222222;
  font-weight: 600;
  border-bottom-color: #ff5e3b;
}

.wiki-explore-count {
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff5f0;
  color: #ff5e3b;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
}

.wiki-explore-tab.is-active .wiki-explore-count {
  background: #ff5e3b;
  color: #ffffff;
}

.wiki-filters {
  max-width: 1080px;
  margin: 22px auto 0;
}

.wiki-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.wiki-article-tags {
  margin: 8px 0 0;
  color: #888888;
  font-size: 13px;
}

.wiki-chip-label {
  color: #888888;
  font-size: 13px;
  line-height: 32px;
}

.wiki-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #444444;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.wiki-chip:hover {
  color: #ff5e3b;
}

.wiki-chip.is-active {
  background: #fff5f0;
  color: #ff5e3b;
  border-color: #ffd4c6;
  font-weight: 600;
}

.wiki-chip-count {
  color: #999999;
  font-size: 12px;
}

.wiki-chip.is-active .wiki-chip-count {
  color: #ff5e3b;
}

.wiki-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.wiki-card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 18px 18px 8px;
  min-height: 280px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.wiki-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wiki-card-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 650;
  color: #191919;
}

.wiki-card-kind {
  flex-shrink: 0;
  color: #999999;
  font-size: 12px;
  line-height: 24px;
}

.wiki-card-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.wiki-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wiki-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f5f5f5;
  color: #666666;
  font-size: 12px;
}

.wiki-count {
  flex-shrink: 0;
  color: #ff5e3b;
  line-height: 1;
}

.wiki-count strong {
  font-size: 28px;
  font-weight: 700;
}

.wiki-count span {
  margin-left: 2px;
  font-size: 13px;
}

.wiki-topics {
  list-style: none;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
}

.wiki-card-title a {
  color: inherit;
  text-decoration: none;
}

.wiki-topic {
  display: block;
  padding: 6px 0;
  color: #666666;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.wiki-hits {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wiki-hit {
  display: block;
  padding: 16px 18px;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.wiki-hit h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 24px;
}

.wiki-hit em {
  font-style: normal;
  color: #ff5e3b;
}

.wiki-hit-meta,
.wiki-hit p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 22px;
}

.page-wiki-entry .wiki-article {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.wiki-toc {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 80px);
  overflow: auto;
}

.wiki-toc a {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  line-height: 20px;
}

.wiki-toc a.is-sub {
  padding-left: 12px;
}

.wiki-toc a.is-active {
  color: #ff5e3b;
}

.wiki-crumb {
  margin: 0 0 12px;
  color: #888;
  font-size: 13px;
}

.wiki-crumb a {
  color: #666;
  text-decoration: none;
}

.wiki-article-title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.35;
  font-weight: 650;
}

.wiki-byline {
  margin: 0 0 20px;
  color: #888;
  font-size: 13px;
}

.wiki-definition,
.wiki-points {
  margin-bottom: 20px;
}

.wiki-definition h2,
.wiki-points h2,
.wiki-body h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  line-height: 1.4;
}

.wiki-body h3 {
  margin: 22px 0 10px;
  font-size: 18px;
}

.wiki-body p,
.wiki-definition p,
.wiki-points li {
  margin: 0 0 12px;
  color: #222;
  font-size: 16px;
  line-height: 1.8;
}

.wiki-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0 16px;
}

.wiki-solution {
  margin: 8px 0 16px;
}

.wiki-solution-toggle {
  border: 0;
  background: transparent;
  color: #ff5e3b;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.wiki-solution-body {
  margin-top: 8px;
  padding: 12px 14px;
  background: #fafafa;
  border-radius: 12px;
}

.wiki-next {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.wiki-next a {
  color: #222;
  font-size: 18px;
  font-weight: 650;
  text-decoration: none;
}

.wiki-next-course,
.wiki-next-state {
  margin: 0 0 8px;
  color: #888;
  font-size: 13px;
}

@media (max-width: 860px) {
  .page-wiki-entry .wiki-article {
    grid-template-columns: 1fr;
  }

  .wiki-toc {
    position: static;
    max-height: none;
  }
}

.wiki-empty {
  margin: 48px auto;
  text-align: center;
  color: #888888;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .page-wiki .wiki-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .wiki-stage {
    padding: 12px;
  }

  .wiki-canvas {
    padding: 16px 14px 28px;
  }

  .wiki-title {
    font-size: 28px;
  }

  .page-wiki .wiki-grid {
    grid-template-columns: 1fr;
  }

  .wiki-explore {
    gap: 16px;
  }
}
