/* Оформление в духе темы Grav learn2 (цвета и шрифты из её scss). */
:root {
  --accent: #1694CA;
  --sidebar-bg: #38424D;
  --sidebar-link: #cccccc;
  --text: #555;
  --navbar-bg: #F6F6F6;
}

body, .wy-body-for-nav, .rst-content {
  font-family: "Mulish", "Muli", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
  color: var(--text);
  letter-spacing: -0.03rem;
}
.wy-nav-content-wrap, .wy-body-for-nav { background: #fff; }

/* --- контент --- */
.wy-nav-content { max-width: none; padding: 2.5rem 5rem 3rem; background: #fff; }
.rst-content { font-size: 1.05rem; line-height: 1.6; }
.rst-content p, .rst-content li { font-size: 1.05rem; }

.rst-content h1, .rst-content h2, .rst-content h3,
.rst-content h4, .rst-content h5, .rst-content h6 {
  font-family: "Montserrat", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
  font-weight: 400;
  line-height: 150%;
  color: #444;
}
.rst-content h1 { font-size: 3.25rem; text-align: center; letter-spacing: -3px; margin: .5rem 0 1.5rem; }
/* В исходниках подзаголовки — h4/h5 (####, #####); Sphinx нормализует уровни,
   и они становятся h2/h3. Размеры — как у h5/h4 в learn2. */
.rst-content h2 { font-size: 1.45rem; letter-spacing: 0; margin-top: 2rem; }
.rst-content h3 { font-size: 1.25rem; letter-spacing: 0; }
.rst-content h4, .rst-content h5, .rst-content h6 { font-size: 1.1rem; letter-spacing: 0; }
/* иконка-якорь у заголовков не нужна в постоянном виде */
.rst-content .headerlink { font-size: .6em; }

a, a:visited, .rst-content a { color: var(--accent); }
a:hover { color: #0f6f99; }

.rst-content img { max-width: 100%; height: auto; display: block; margin: 1rem auto; }
.rst-content iframe { max-width: 100%; }

/* --- «хлебные крошки» — серая плашка, как в learn2 --- */
.wy-breadcrumbs {
  background: var(--navbar-bg);
  padding: .7rem 1rem;
  border-radius: 2px;
  font-size: .9rem;
}
.rst-breadcrumbs-buttons { margin-top: .5rem; }
div[role="navigation"] > hr { display: none; }

/* --- левая колонка --- */
.wy-nav-side { background: var(--sidebar-bg); }
.wy-side-nav-search { background: var(--accent); padding: 1.5rem 1rem 1rem; margin-bottom: 0; }
.wy-side-nav-search > a {
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.6;
  letter-spacing: 0;
}
.wy-side-nav-search input[type="text"] {
  border-radius: 2px;
  border: 0;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  box-shadow: none;
}
.wy-side-nav-search input[type="text"]::placeholder { color: rgba(255, 255, 255, .8); }

.wy-menu-vertical { padding-top: 1rem; }
.wy-menu-vertical a {
  color: var(--sidebar-link);
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wy-menu-vertical a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.wy-menu-vertical li.toctree-l1 > a { font-size: 1rem; color: #fff; }
/* дерево всегда раскрыто, без светлой подложки и кнопок-«плюсиков» темы RTD */
.wy-menu-vertical li ul,
.wy-menu-vertical li.toctree-l1 ul { display: block !important; }
.wy-menu-vertical .toctree-expand { display: none !important; }
.wy-menu-vertical li,
.wy-menu-vertical li.current,
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.current li > a,
.wy-menu-vertical li[class*="toctree-l"] > a {
  background: transparent !important;
  border: 0 !important;
  color: var(--sidebar-link) !important;
}
.wy-menu-vertical li.toctree-l1 > a { color: #fff !important; padding-left: 1rem !important; }
.wy-menu-vertical li.toctree-l2 > a { padding-left: 1.8rem !important; }
.wy-menu-vertical li.toctree-l3 > a { padding-left: 2.6rem !important; }
.wy-menu-vertical li.toctree-l4 > a { padding-left: 3.4rem !important; }
.wy-menu-vertical li.toctree-l5 > a { padding-left: 4.2rem !important; }
.wy-menu-vertical li > a:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
/* текущая страница — белая плашка */
.wy-menu-vertical li > a.current,
.wy-menu-vertical li.current > a.current {
  background: #fff !important;
  color: #555 !important;
}

.wy-nav-top { background: var(--accent); }
footer { color: #999; }

/* нумерация разделов верхнего уровня в меню — «1. Раздел», как в learn2 */
.wy-menu-vertical > ul { counter-reset: section; }
.wy-menu-vertical > ul > li.toctree-l1 > a::before {
  counter-increment: section;
  content: counter(section) ". ";
  color: #889;
}
.wy-menu-vertical li.toctree-l1 { margin-bottom: .2rem; }
