.wiki-tag {
  color: var(--ct-muted);
  background: var(--ct-page);
  border-radius: 15px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid var(--ct-surface-25);
  height: 28px;
  display: flex;
  align-items: center;
}

.logo{
  display: flex;
  align-items: center;
  gap: 12px
}

.head-but  {
  background: none;
  border: none;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 0 24px ;
}

.main-content{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-content p{
  color: var(--ct-muted);
  max-width: 550px;
  text-wrap: wrap;
  text-align: center;
  padding: 12px;
}

.inp {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  height: 46px;
  padding: 0 14px;
  background: var(--ct-surface-12);
  border: 1px solid var(--ct-surface-20);
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.inp:focus-within {
  border-color: var(--ct-accent);
  background: var(--ct-surface-18);
}

#search {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ct-bright);
  font: inherit;
  font-size: 15px;
}

#search::placeholder {
  color: var(--ct-faint);
}

.src-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 0;
  object-fit: contain;
  filter: var(--ct-icon-filter);
  opacity: 0.38;
}

.main-topic-content .topic-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(65%) sepia(30%) saturate(1500%) hue-rotate(199deg) brightness(101%) contrast(101%);
}

.main-topic-content{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.main-topic-content p {
  font-size: 14px;
  font-weight: 500;
}

.main-topic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1000px;
}

.topic-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  background: var(--ct-surface-08);
  border: 1px solid var(--ct-surface-12);
  border-radius: 20px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.topic-card:hover {
  background: var(--ct-surface-12);
  border-color: var(--ct-surface-25);
  transform: translateY(-3px);
}

.topic-arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--ct-accent);
}

@media (max-width: 800px) {
  .main-topic {
    grid-template-columns: 1fr;
  }
}

section{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

section h3{
  color: var(--ct-bright);
}

section p{
  margin: 0;
  padding: 0;
  color: var(--ct-muted);
}

.wiki{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1150px;
  padding: 12px 0;
}

.column{
  display: flex;
  flex-direction: column;
}

.topic-card  p{
  color: var(--ct-bright);
}

.topic-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(65%) sepia(30%) saturate(1500%) hue-rotate(199deg) brightness(101%) contrast(101%);
}

.wiki .topic-card {
  flex-direction: column;
  align-items: stretch;
}

.wiki .topic-card:hover {
  transform: none;
}

.column {
  width: 100%;
  gap: 16px;
}

.topic-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topic-head p {
  font-size: 18px;
  font-weight: 600;
}

.topic-head span:not(.topic-icon) {
  font-size: 14px;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

details {
  border-top: 1px solid var(--ct-surface-12);
  padding-top: 8px;
}

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  padding: 6px 0;
  color: var(--ct-secondary);
  transition: color 0.2s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: ">";
  flex-shrink: 0;
  font-size: 18px;
  color: var(--ct-accent);
  transition: transform 0.2s ease;
}

summary:hover {
  color: var(--ct-bright);
}

details[open] summary::after {
  transform: rotate(90deg);
}

details p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ct-muted);
}

.sup-card {
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.sup-card .download {
  flex-shrink: 0;
  white-space: nowrap;
}

.topic-head span:not(.topic-icon) {
  color: var(--ct-muted);
}

.topic-card details p {
  color: var(--ct-muted);
}

@media (max-width: 800px) {
  .wiki {
    grid-template-columns: 1fr;
  }
}

section.banner {
  padding-top: 16px;
  padding-bottom: 0;
}

.sup-wrap {
  padding-top: 16px;
  padding-bottom: 0;
}

footer.banner {
  padding-top: 24px;
  padding-bottom: 24px;
}

[hidden] {
  display: none !important;
}

section .no-results {
  align-self: stretch;
  text-align: center;
  padding: 32px 0;
}

.topic-card details p {
  white-space: pre-line;
}

/* Shared catalogue and article pages. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; padding: 12px; background: var(--ct-accent); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.wiki-home { padding-top: 24px; padding-bottom: 24px; gap: 24px; background-size: 100% 520px; background-repeat: no-repeat; }
.wiki-home .main-content { padding-top: 24px; padding-bottom: 0; }
.main-content h1 { font-size: clamp(28px, 4vw, 44px); text-align: center; line-height: 1.15; }
.main-content .eyebrow, .eyebrow { color: var(--ct-accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.wiki-home .wiki-sections { padding: 0; width: 100%; max-width: 1086px; min-width: 0; }
.topic-head > div { min-width: 0; overflow-wrap: anywhere; }
.wiki-sections > h2 { color: var(--ct-bright); text-transform: none; font-size: 24px; }
.topic-head h3 { font-size: 18px; font-weight: 600; color: var(--ct-bright); }
.wiki .topic-head p { color: var(--ct-muted); font-size: 14px; font-weight: 400; line-height: 1.5; margin-top: 4px; }
.article-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ct-surface-12); color: var(--ct-body); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.article-link > span { color: var(--ct-accent); flex-shrink: 0; }
.article-link:hover, .article-link[aria-current="page"] { color: var(--ct-bright); }
.article-link[aria-current="page"] { font-weight: 600; }
.wiki-article.banner { display: block; padding-top: 28px; padding-bottom: 32px; background: none; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 28px; font-size: 13px; }
.breadcrumbs a { color: var(--ct-accent); }
.breadcrumbs span { color: var(--ct-muted); }
.article-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 40px; align-items: start; width: 100%; }
.article-layout article { min-width: 0; }
.article-heading { position: static; padding: 0; margin-bottom: 28px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; z-index: auto; }
.article-heading h1 { margin: 10px 0 14px; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.2; overflow-wrap: anywhere; }
.article-heading .article-description { color: var(--ct-muted); font-size: 17px; line-height: 1.6; font-weight: 400; }
.article-body { color: var(--ct-body-strong); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.article-body p, .article-body li { color: inherit; }
.article-body > * + * { margin-top: 20px; }
.article-body h2, .article-body h3, .article-body h4 { font-size: 22px; color: var(--ct-bright); font-weight: 600; text-transform: none; line-height: 1.4; }
.article-body h3 { font-size: 19px; }
.article-body h4 { font-size: 17px; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li + li { margin-top: 12px; }
.article-body a { color: var(--ct-link); text-decoration: underline; text-underline-offset: 3px; }
.article-body code { font-family: 'JetBrains Mono', monospace; font-size: .875em; padding: 2px 5px; border-radius: 5px; background: var(--ct-surface-0c); }
.article-body pre { max-width: 100%; overflow-x: auto; padding: 16px; border: 1px solid var(--ct-surface-15); border-radius: 12px; background: var(--ct-surface-06); }
.article-body pre code { padding: 0; background: none; white-space: pre; }
.article-figure img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.wiki-sidebar { position: sticky; top: 84px; margin: 0; padding: 0; min-width: 0; border: 1px solid var(--ct-surface-12); border-radius: 20px; background: var(--ct-surface-05); overflow: hidden; }
.wiki-sidebar-toggle { display: none; }
.wiki-sidebar-panel { padding: 14px; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; scrollbar-gutter: stable; scroll-behavior: auto; scrollbar-width: thin; scrollbar-color: var(--ct-accent-55) transparent; }
.wiki-nav-all, .wiki-nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.wiki-nav-all { color: var(--ct-bright); background: var(--ct-surface-08); font-weight: 600; margin-bottom: 20px; }
.wiki-nav-all svg { flex-shrink: 0; color: var(--ct-secondary); }
.wiki-nav-group { display: block; margin: 0; padding: 0; width: 100%; }
.wiki-nav-group + .wiki-nav-group { margin-top: 22px; }
.wiki-nav-group h2 { margin: 0 10px 8px; font-size: 10px; line-height: 1.5; font-weight: 500; letter-spacing: .08em; color: var(--ct-faint); text-transform: uppercase; }
.wiki-nav-link { color: var(--ct-secondary-strong); font-weight: 500; transition: color .15s, background .15s; overflow-wrap: anywhere; }
.wiki-nav-link span { color: inherit; }
.wiki-nav-icon { width: 17px; height: 17px; flex-shrink: 0; object-fit: contain; filter: var(--ct-icon-filter); opacity: .5; }
.wiki-nav-link:hover, .wiki-nav-all:hover { color: var(--ct-bright); background: var(--ct-surface-0a); }
.wiki-nav-link[aria-current="page"] { color: var(--ct-selected-text); background: var(--ct-accent-18); box-shadow: inset 3px 0 var(--ct-accent); }
.wiki-nav-link[aria-current="page"] .wiki-nav-icon { opacity: 1; filter: brightness(0) saturate(100%) invert(65%) sepia(30%) saturate(1500%) hue-rotate(199deg) brightness(101%) contrast(101%); }
.article-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--ct-surface-12); }
.article-pagination a { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.article-pagination a[rel="next"] { grid-column: 2; text-align: right; }
.article-pagination small { color: var(--ct-muted); font-size: 12px; }
.article-pagination a:hover { color: var(--ct-link); }
.wiki-tag:hover { border-color: var(--ct-accent); }
.site-header .logo { min-width: 0; }
@media (max-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .wiki-sidebar { position: static; }
  .wiki-sidebar-toggle { display: flex; margin: 0; padding: 14px 16px; color: var(--ct-bright); font-size: 14px; font-weight: 600; }
  .wiki-sidebar-toggle::after { content: none; }
  .wiki-sidebar-toggle span { color: var(--ct-accent); transition: transform .15s; }
  .wiki-sidebar[open] .wiki-sidebar-toggle span { transform: rotate(180deg); }
  .wiki-sidebar[open] .wiki-sidebar-toggle { border-bottom: 1px solid var(--ct-surface-12); }
  .wiki-sidebar-panel { max-height: 60vh; max-height: 60dvh; }
}
@media (max-width: 600px) {
  .wiki-home { padding: 16px; gap: 20px; }
  .wiki-home .main-content { padding: 16px 0 0; }
  .wiki-article.banner { padding: 20px 16px; }
  .article-heading .article-description { font-size: 15px; }
  .article-body { font-size: 15px; line-height: 1.75; }
  .topic-card { padding: 16px; border-radius: 16px; }
  .site-header div.banner { padding: 12px 16px; }
  .site-header .logo { gap: 6px; }
  .site-header .logo p { font-size: 14px; }
  .wiki-tag { font-size: 11px; padding: 0 7px; height: 26px; }
  .site-header .header-actions { gap: 5px; }
  .site-header .support { width: 26px; }
  .sup-wrap { padding-left: 16px; padding-right: 16px; }
  .sup-card .download { white-space: normal; }
  footer div { flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Keep the page width fixed when switching between short and long articles. */
html { scrollbar-gutter: stable; }
