/* ============================
   articles.css — Изолированные стили раздела /articles/
   Подключается условно через wp_enqueue_style
   Реплика cloud.ru/docs navigation
   ============================ */

/* ============================
   LAYOUT: sidebar + content
   ============================ */
.docs-layout {
  display: flex;
  min-height: calc(100vh - 80px);
  max-width: 1360px;
  margin: 0 auto;
}

/* ============================
   SIDEBAR — cloud.ru exact replica
   ============================ */
.docs-sidebar {
  width: 296px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #dde0ea;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 40px;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.docs-sidebar:hover::-webkit-scrollbar-thumb { background: #cfd2dc; }

/* ============================
   SIDEBAR HEADER — service/section name (cloud.ru top bar)
   ============================ */
.sb-header {
  padding: 16px 16px 14px;
  border-bottom: 1px solid #dde0ea;
}
.sb-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #656774;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color .15s;
}
.sb-header__back:hover { color: #41424e; }
.sb-header__back svg { flex-shrink: 0; }
.sb-header__title {
  font-size: 14px;
  font-weight: 600;
  color: #41424e;
  line-height: 20px;
}

/* ============================
   SIDEBAR NAV
   ============================ */
.sb-nav {
  list-style: none;
  padding: 3px 0 0;
  margin: 0;
}
.sb-children { list-style: none; padding: 0; margin: 0; }

/* ---- Base nav item (cloud.ru: 14px body-m, color support #656774, pad 8px 10px) ---- */
.sb-item__row {
  display: flex;
  align-items: flex-start;
  width: 100%;
  padding: 6px 10px 6px 16px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .1px;
  color: #656774;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  transition: color .12s;
  position: relative;
  box-sizing: border-box;
}
.sb-item__row:hover {
  color: #41424e;
}

/* ---- Active item — dark text (#222), semibold, NO background ---- */
.sb-item.is-active > .sb-item__row,
.sb-item.is-active > a.sb-item__row {
  color: #222;
  font-weight: 600;
}

/* ---- Chevron (cloud.ru expandableIcon style) ---- */
.sb-item__chevron {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #8b8e9b;
  transition: transform .2s ease, color .12s;
}
.sb-item__chevron svg {
  width: 12px;
  height: 12px;
}
.sb-item.is-open > .sb-item__row > .sb-item__chevron,
.sb-item.is-open > .sb-item__row--group > .sb-item__chevron {
  transform: rotate(180deg);
  color: #656774;
}

/* ---- Children show/hide ---- */
.sb-children { display: none; }
.sb-item.is-open > .sb-children { display: block; }

/* ---- Nesting: 24px offset per level (cloud.ru nesting-level-offset-m) ---- */
.sb-children {
  margin-left: 0;
  padding-left: 0;
}
.sb-children .sb-item__row {
  padding-left: 40px;
  font-size: 14px;
}
.sb-children .sb-children .sb-item__row {
  padding-left: 64px;
}

/* ---- Active child: left accent line ---- */
.sb-children > .sb-item.is-active > .sb-item__row::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #222;
  border-radius: 1px;
}

/* ---- Group row (expandable section header) ---- */
.sb-item__row--group {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: #41424e;
  padding: 8px 10px 8px 16px;
}
.sb-item__row--group:hover {
  color: #383838;
  background: none;
}

/* Spacing between top-level groups */
.sb-nav > .sb-item + .sb-item {
  margin-top: 2px;
}

/* ============================
   MAIN CONTENT
   ============================ */
.docs-content {
  flex: 1;
  max-width: 860px;
  min-width: 0;
}
.docs-content__inner {
  padding: 28px 48px 80px;
}

/* Article header */
.docs-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin-bottom: 16px;
}

/* ============================
   META (date + reading time)
   ============================ */
.docs-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #999;
}
.docs-meta__dot { color: #ddd; }

/* ============================
   TABLE OF CONTENTS
   ============================ */
.docs-toc {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 28px;
}
.docs-toc__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #999;
  margin-bottom: 10px;
}
.docs-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.docs-toc__item a {
  font-size: 13.5px;
  color: #555;
  padding: 2px 0;
  display: block;
  transition: color .1s;
  text-decoration: none;
}
.docs-toc__item a:hover,
.docs-toc__item.is-active a { color: #00c5ef; }
.docs-toc__item.is-active a { font-weight: 500; }
.docs-toc__item--l3 { padding-left: 16px; }
.docs-toc__item--l3 a { font-size: 13px; color: #888; }

/* ============================
   RIGHT TOC SIDEBAR (single article)
   ============================ */

/* Force overflow:visible on ALL ancestors so position:sticky works */
/* Global style.css sets .content { overflow:hidden } which breaks sticky */
.content--articles {
  overflow: visible !important;
}
.page-articles,
.page-articles .docs-layout,
.page-articles .docs-content {
  overflow: visible !important;
}

.docs-toc-aside {
  width: 200px;
  flex-shrink: 0;
  align-self: stretch;
}
.docs-toc-sticky {
  /* JS manages position: fixed/absolute — see articles.js section 3b */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
  width: 200px;
  box-sizing: border-box;
}
.docs-toc-sticky::-webkit-scrollbar { width: 3px; }
.docs-toc-sticky::-webkit-scrollbar-track { background: transparent; }
.docs-toc-sticky::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.docs-toc-sticky:hover::-webkit-scrollbar-thumb { background: #ddd; }

.docs-toc-sticky__title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin-bottom: 12px;
}
.docs-toc-sticky__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid #e5e7eb;
}
.docs-toc-sticky__list .docs-toc__item {
  margin: 0;
}
.docs-toc-sticky__list .docs-toc__item a {
  display: block;
  padding: 5px 0 5px 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #888;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .15s, border-color .15s;
}
.docs-toc-sticky__list .docs-toc__item a:hover {
  color: #555;
}
.docs-toc-sticky__list .docs-toc__item.is-active a {
  color: #00c5ef;
  border-left-color: #00c5ef;
  font-weight: 500;
}
.docs-toc-sticky__list .docs-toc__item--l3 a {
  padding-left: 28px;
  font-size: 12px;
}

/* ============================
   ARTICLE BODY TYPOGRAPHY
   ============================ */
.article-body {
  line-height: 1.7;
  font-size: 15.5px;
  color: #333;
}
.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 36px 0 14px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}
.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: #2e2e2e;
  margin: 24px 0 10px;
  scroll-margin-top: 100px;
}
.article-body p { margin-bottom: 14px; }
.article-body ul,
.article-body ol {
  margin: 10px 0 18px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.article-body li { font-size: 15px; }
.article-body a { color: #00c5ef; }
.article-body a:hover { text-decoration: underline; }
.article-body strong { font-weight: 600; color: #1a1a1a; }

/* Images */
.article-body img { max-width: 100%; height: auto; border-radius: 4px; }
.article-body figure { margin: 16px 0 24px; }
.article-body figcaption {
  font-size: 13px;
  color: #999;
  margin-top: 6px;
  text-align: center;
}

/* Blockquote */
.article-body blockquote {
  border-left: 3px solid #00c5ef;
  padding: 12px 20px;
  margin: 16px 0;
  color: #555;
  font-style: italic;
  background: #fafafa;
  border-radius: 0 6px 6px 0;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
}
.article-body th {
  background: #fafafa;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #2e2e2e;
  border-bottom: 1px solid #eee;
}
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
}
.article-body tr:last-child td { border-bottom: none; }

/* ============================
   CODE BLOCKS
   ============================ */
.docs-code-block {
  position: relative;
  margin: 16px 0 22px;
  border-radius: 8px;
  overflow: hidden;
}
.docs-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(30,42,53,.8);
  border: 1px solid #334;
  border-radius: 5px;
  color: #94a3b8;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  z-index: 2;
}
.docs-copy-btn:hover { background: #334; color: #fff; }
.docs-copy-btn.is-copied { color: #22c55e; border-color: #22c55e; }

.article-body pre {
  background: #0f1923;
  padding: 16px 18px;
  margin: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 8px;
}
.article-body pre code {
  color: #e2e8f0;
  background: none;
  padding: 0;
  font-size: inherit;
}
.article-body code {
  background: #f3f3f3;
  color: #d63384;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
}

/* ============================
   CALLOUT BLOCKS ([note] shortcode)
   ============================ */
.docs-callout {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 18px 0;
  border-left: 4px solid;
}
.docs-callout__icon {
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}
.docs-callout__body {
  font-size: 14px;
  line-height: 1.65;
}
.docs-callout__body strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.docs-callout__body p { margin-bottom: 6px; }
.docs-callout__body p:last-child { margin-bottom: 0; }

/* Callout variants */
.docs-callout--info { background: #f0faf5; border-color: #34c77b; }
.docs-callout--info .docs-callout__icon { color: #34c77b; }
.docs-callout--info .docs-callout__body > strong { color: #1d8a4e; }

.docs-callout--warning { background: #fffbeb; border-color: #f5a623; }
.docs-callout--warning .docs-callout__icon { color: #d69e2e; }
.docs-callout--warning .docs-callout__body > strong { color: #b7791f; }

.docs-callout--danger { background: #fef2f2; border-color: #ef4444; }
.docs-callout--danger .docs-callout__icon { color: #ef4444; }
.docs-callout--danger .docs-callout__body > strong { color: #dc2626; }

.docs-callout--tip { background: #f0fafe; border-color: #00c5ef; }
.docs-callout--tip .docs-callout__icon { color: #00c5ef; }
.docs-callout--tip .docs-callout__body > strong { color: #0891b2; }

/* ============================
   FAQ ACCORDION ([faq] shortcode)
   ============================ */
.docs-faq {
  margin: 24px 0;
}
.docs-faq__question {
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
}
.docs-faq__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #2e2e2e;
  background: #fafafa;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .1s;
}
.docs-faq__toggle:hover { background: #f5f5f5; }
.docs-faq__chevron {
  color: #ccc;
  font-size: 10px;
  transition: transform .2s;
  margin-left: 12px;
}
.docs-faq__question.is-open .docs-faq__chevron { transform: rotate(180deg); }

.docs-faq__answer {
  display: none;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  color: #555;
  border-top: 1px solid #eee;
}
.docs-faq__question.is-open .docs-faq__answer { display: block; }

/* ============================
   HOWTO STEPS ([howto] shortcode)
   ============================ */
.docs-howto {
  margin: 24px 0;
}
.docs-howto__step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.docs-howto__step:last-child { border-bottom: none; }
.docs-howto__step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00c5ef;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.docs-howto__step-body { flex: 1; }
.docs-howto__step-name {
  font-size: 16px;
  font-weight: 600;
  color: #2e2e2e;
  margin-bottom: 6px;
}
.docs-howto__step-body p { margin-bottom: 8px; font-size: 14px; line-height: 1.65; color: #555; }
.docs-howto__step-body p:last-child { margin-bottom: 0; }

/* ============================
   PREV/NEXT NAVIGATION
   ============================ */
.docs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #eee;
}
.docs-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  color: inherit;
  transition: all .15s;
  text-decoration: none;
}
.docs-nav__item:hover { border-color: #00c5ef; background: #f0fafe; }
.docs-nav__item--next { text-align: right; align-items: flex-end; }
.docs-nav__item--empty { visibility: hidden; }
.docs-nav__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #aaa;
}
.docs-nav__title {
  font-size: 14px;
  font-weight: 500;
  color: #2e2e2e;
  line-height: 1.35;
}

/* ============================
   RELATED SERVICES
   ============================ */
.docs-related-services {
  margin-top: 32px;
  padding: 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}
.docs-related-services strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2e2e2e;
}
.docs-related-services ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.docs-related-services li a {
  font-size: 13px;
  color: #00c5ef;
  text-decoration: none;
}
.docs-related-services li a:hover { text-decoration: underline; }

/* ============================
   INDEX PAGE — /articles/
   Exact Selectel docs replica
   ============================ */

/* ---- Reset global theme list styles ---- */
.sel-docs ul li:before,
.sel-docs ol li:before,
.sel-toc__list li:before,
.docs-index__tree ul li:before,
.docs-toc-sticky__list li:before,
.docs-toc__list li:before,
.sb-nav li:before,
.sb-children li:before {
  content: none !important;
  display: none !important;
}
.sel-docs ul li,
.sel-toc__list li,
.docs-toc-sticky__list li,
.docs-toc__list li,
.sb-nav li,
.sb-children li {
  padding-left: 0 !important;
  list-style: none;
}

/* ============================
   INDEX PAGE — /articles/
   Selectel-level polish
   ============================ */

/* ---- Design tokens ---- */
.sel-docs {
  --sel-bg: #f5f7f8;
  --sel-bg-card: #fff;
  --sel-text: #092433;
  --sel-text-secondary: #6d777d;
  --sel-border: #dadee0;
  --sel-icon-bg: #ebeff1;
  --sel-accent: #00c5ef;
  --sel-content-width: 1116px;
  --sel-shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --sel-shadow-md: 0 8px 25px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --sel-radius-card: 16px;
  --sel-font: 'Montserrat', sans-serif;

  background: var(--sel-bg);
  min-height: 100vh;
  font-family: var(--sel-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--sel-text);
}

/* Smooth scroll for anchor links */
.sel-docs { scroll-behavior: smooth; }

/* ---- Hero banner (white, like Blog) ---- */
.sel-hero {
  background: #fff;
  padding: 0 32px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--sel-border);
}
.sel-hero__inner {
  max-width: var(--sel-content-width);
  margin: 0 auto;
  padding: 48px 0 40px;
}
.sel-hero__title {
  color: var(--sel-text);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}
.sel-hero__subtitle {
  color: var(--sel-text-secondary);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  margin: 12px 0 0;
}

/* ---- Products area ---- */
.sel-products {
  padding: 0 32px;
}
.sel-products__inner {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 220px;
  grid-column-gap: 64px;
  max-width: var(--sel-content-width);
  margin: 0 auto;
}

/* ---- Sections ---- */
.sel-sections {
  min-width: 0;
}
.sel-section {
  padding-bottom: 64px;
  margin-bottom: 0;
}
.sel-section + .sel-section {
  border-top: 1px solid var(--sel-border);
  padding-top: 64px;
}
.sel-section:last-child {
  padding-bottom: 32px;
}
.sel-section__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--sel-text);
  line-height: 1.25;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  scroll-margin-top: 100px;
}

/* ---- Cards grid (6-col base) ---- */
.sel-section__cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* Card column spans */
.sel-card--2col { grid-column: span 3; }
.sel-card--3col { grid-column: span 2; }

/* ---- Card component ---- */
.sel-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  background: var(--sel-bg-card);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--sel-radius-card);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sel-shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
  will-change: transform;
}
.sel-card:hover {
  text-decoration: none;
  box-shadow: var(--sel-shadow-md);
  transform: translateY(-2px);
}
.sel-card:hover .sel-card__title {
  color: var(--sel-accent);
}
.sel-card:hover .sel-card__icon {
  background: #daf5fc;
}
.sel-card:hover .sel-card__icon svg {
  stroke: var(--sel-accent);
}

/* ---- Card icon ---- */
.sel-card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sel-icon-bg);
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--sel-text);
  transition: background-color .25s, color .25s;
  flex-shrink: 0;
}
.sel-card__icon svg {
  width: 22px;
  height: 22px;
  transition: stroke .25s;
}

/* ---- Card content ---- */
.sel-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.sel-card__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--sel-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  transition: color .2s;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sel-card__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--sel-text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Right TOC ---- */
.sel-toc-wrap {
  position: relative;
}
.sel-toc {
  position: sticky;
  top: 120px;
  padding-top: 4px;
}
.sel-toc__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sel-text-secondary);
  margin: 0 0 12px 16px;
}
.sel-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--sel-border);
}
.sel-toc__list li {
  margin: 0;
}
.sel-toc__link {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--sel-text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .15s, border-color .15s;
}
.sel-toc__link:hover {
  color: var(--sel-text);
  text-decoration: none;
}
.sel-toc__link.is-active {
  color: var(--sel-accent);
  border-left-color: var(--sel-accent);
  font-weight: 600;
}

/* ============================
   FULL TREE (SEO)
   ============================ */
.docs-index__tree {
  margin-top: 32px;
  border-top: 1px solid var(--sel-border);
  padding-top: 48px;
}
.docs-index__tree > h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--sel-text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

details.docs-tree-section {
  border: none;
  border-radius: var(--sel-radius-card, 16px);
  margin-bottom: 8px;
  background: var(--sel-bg-card, #fff);
  box-shadow: var(--sel-shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}
details.docs-tree-section summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--sel-text, #092433);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color .15s;
}
details.docs-tree-section summary:hover {
  color: var(--sel-accent, #00c5ef);
}
details.docs-tree-section summary::-webkit-details-marker { display: none; }
details.docs-tree-section summary::after {
  content: '\203A';
  font-size: 18px;
  color: var(--sel-text-secondary, #6d777d);
  transition: transform .2s;
  flex-shrink: 0;
}
details.docs-tree-section[open] summary::after { transform: rotate(90deg); }

.docs-tree-body { padding: 8px 20px 18px; }

.docs-tree-subsection { margin-bottom: 14px; }
.docs-tree-subsection:last-child { margin-bottom: 0; }
.docs-tree-subsection h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sel-text-secondary, #6d777d);
  margin-bottom: 6px;
}
.docs-tree-subsection ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.docs-tree-subsection ul li a {
  font-size: 14px;
  color: var(--sel-text, #092433);
  text-decoration: none;
  transition: color .15s;
}
.docs-tree-subsection ul li a:hover {
  color: var(--sel-accent, #00c5ef);
}

/* ============================
   MOBILE DRAWER + NAV BUTTON
   ============================ */
.docs-mobile-nav-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #00c5ef;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,197,239,.35);
  z-index: 200;
}

.docs-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.4);
  z-index: 299;
}
.docs-sidebar-overlay.is-visible { display: block; }

/* ============================
   RESPONSIVE
   ============================ */
/* ============================
   SIDEBAR SEARCH (inside sidebar)
   ============================ */
.docs-sidebar-search {
  margin: 8px 12px 8px;
  position: relative;
}
.docs-sidebar-search input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  outline: none;
  transition: border-color .15s;
  background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 9px center no-repeat;
  box-sizing: border-box;
}
.docs-sidebar-search input:focus {
  border-color: #2563eb;
  background-color: #fff;
}

/* Override legacy search icon from additional.css */
.docs-sidebar-search .articles-search-container::before {
  display: none !important;
}

/* ============================
   CATEGORY PAGE — article listing cards
   ============================ */
.cat-intro {
  font-size: 16px;
  line-height: 1.6;
  color: var(--sel-text-secondary);
  margin-bottom: 32px;
  max-width: 680px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.cat-card {
  display: grid;
  grid-template-areas: "title arrow" "desc arrow";
  grid-template-columns: 1fr min-content;
  grid-template-rows: min-content 1fr;
  gap: 0 24px;
  padding: 24px;
  background: var(--sel-bg-card);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--sel-radius-card);
  box-shadow: var(--sel-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .25s ease, transform .25s ease;
  will-change: transform;
}
.cat-card:hover {
  text-decoration: none;
  box-shadow: var(--sel-shadow-md);
  transform: translateY(-2px);
}
.cat-card__title {
  grid-area: title;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sel-text);
  margin: 0;
  padding-top: 2px;
  transition: color .2s;
}
.cat-card:hover .cat-card__title {
  color: var(--sel-accent);
}
.cat-card__desc {
  grid-area: desc;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sel-text-secondary);
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card__arrow {
  grid-area: arrow;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sel-text);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.cat-card__arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-card:hover .cat-card__arrow {
  transform: rotate(-30deg);
}

/* Category page - count badge */
.cat-card__count {
  grid-area: desc;
  font-size: 12px;
  color: var(--sel-text-secondary);
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .docs-content__inner { padding: 24px 32px 60px; }
  .docs-sidebar { width: 260px; }
  .sel-products__inner { grid-template-columns: 100%; }
  .sel-toc-wrap { display: none; }
  .docs-toc-aside { display: none; }
  .sel-section__cards { grid-template-columns: repeat(4, 1fr); }
  .sel-card--2col { grid-column: span 2; }
  .sel-card--3col { grid-column: span 2; }
}

@media (max-width: 768px) {
  .docs-layout { display: block; }
  .docs-toc-aside { display: none; }

  .docs-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    height: 100vh;
    z-index: 300;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
    transform: translateX(-100%);
    transition: transform .25s ease;
    background: #f8f9fa;
  }
  .docs-sidebar.is-mobile-open {
    display: block;
    transform: translateX(0);
  }

  .docs-mobile-nav-btn { display: flex; align-items: center; gap: 6px; }

  .docs-content__inner { padding: 20px 16px 60px; }

  .docs-nav { grid-template-columns: 1fr; }

  .sel-hero { padding: 0 16px; margin-bottom: 32px; }
  .sel-hero__inner { padding: 36px 0 32px; }
  .sel-hero__title { font-size: 30px; }
  .sel-hero__subtitle { font-size: 15px; }
  .sel-products { padding: 0 16px; }
  .sel-section { padding-bottom: 40px; }
  .sel-section + .sel-section { padding-top: 40px; }
  .sel-section__title { font-size: 22px; margin-bottom: 16px; }
  .sel-section__cards { grid-template-columns: 1fr; }
  .sel-card--2col,
  .sel-card--3col { grid-column: span 1; }
  .sel-card { padding: 20px; gap: 16px; }
  .sel-card__title { font-size: 15px; }
  .docs-index__tree { padding-top: 32px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { padding: 20px; }
}

@media (max-width: 480px) {
  .docs-content h1 { font-size: 22px; }
  .article-body h2 { font-size: 19px; }
  .article-body { font-size: 14.5px; }
  .sel-hero__title { font-size: 26px; }
  .sel-card__icon { width: 36px; height: 36px; border-radius: 8px; }
  .sel-card__icon svg { width: 18px; height: 18px; }
}

/* --- Article content: proper list styling --- */
.docs-content ol {
    list-style: decimal;
    padding-left: 2em;
    margin: 1em 0;
}
.docs-content ul {
    list-style: disc;
    padding-left: 2em;
    margin: 1em 0;
}
.docs-content ul ul,
.docs-content ol ul {
    list-style: circle;
}
.docs-content ul ul ul {
    list-style: square;
}
.docs-content ol ol {
    list-style: lower-alpha;
}
.docs-content li {
    margin: 0.3em 0;
    line-height: 1.6;
}
/* Override the global ul li:before checkmark icon inside articles */
.docs-content ul li:before {
    display: none;
}
.docs-content ol li:before {
    display: none;
}


/* Articles listing page - fix sticky TOC sidebar */
.content.common-content {
    overflow: visible !important;
}
.common-content .page-articles,
.common-content .sel-docs,
.common-content .sel-products,
.common-content .sel-products__inner {
    overflow: visible !important;
}
.sel-products__inner {
}

