:root {
  --bg-dark: #2b2b2f;
  --text-light: #ffffff;
  --text-gray: #cccccc;
  --accent-yellow: #ffcc00;
  --accent-blue: #0057b8;
  --card-bg: #3b3b3f;
  --card-border: #555;
  --font-main: 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-main);
  line-height: 1.6;
  padding: 0 2rem 0 2rem;
}

h2 {
  color: var(--accent-yellow);
  font-weight: 400;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: left;
  padding-top: 2rem;
  color: var(--accent-yellow);
  font-weight: 800;
}

h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
}

h3 {
  font-weight: bold;
  font-size: 1.125rem;
  margin: 0;
}

/* === УНІФІКОВАНИЙ СТИЛЬ ДЛЯ НОМЕРІВ, ТЕКСТУ, СПИСКІВ === */

.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 0 1rem;
  box-sizing: border-box;
  width: 100%;
}

.section-wrapper {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  border-top: 1px solid #444;
}

.section-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-wrapper.fade-init {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-wrapper.fade-init.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-wrapper p,
.section-wrapper ul li {
  font-size: 1.125rem;
  color: #fff;
  line-height: 1.6;

  word-break: break-word;
  white-space: normal;
}
.section-wrapper li{
    margin: 0 0 1em;
}

.section-wrapper h3{
    margin: 0 0 1em;
}

ul {
    margin: 0;
}
.inline-heading {
  display: flex;
  align-items: flex-start;
  margin: 1em 0;
  font-size: 1.125rem;
  color: #fff;
  line-height: 1.6;
  gap: 1em;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  white-space: normal;
}

.chapt-number {
  display: inline-block;
  width: 3em;
  min-width: 3em;
  max-width: 3em;
  font-weight: bold;
  font-size: 1.125rem;
  color: #fff;
  flex-shrink: 0;
}

.inline-heading .text {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}


.block-text {
  display: flex;
  padding-left: 4.5em;
  font-size: 1.125rem;
  color: #fff;
  line-height: 1.6;
  word-break: break-word;
  white-space: normal;
  box-sizing: border-box;
}

.section-wrapper ul {
  padding-left: 1em;
}

h2 > i.lucide {
  margin-right: 0.5em;
  vertical-align: middle;
  font-size: 1.75rem;
}

footer {
  background: #1d1d1f;
  color: #888;
  text-align: center;
  padding: 2rem 20rem;
  font-size: 0.9rem;
}


.section-wrapper.fade-init {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-wrapper.fade-init.visible {
  opacity: 1;
  transform: translateY(0);
}
.section-anchor {
  position: relative;
  top: -100px;
  height: 1px;
  width: 100%;
  visibility: hidden;
}


/* Десктоп */
.toc-progress {
  position: fixed;
  top: 20%;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1000;
  align-items: center;
}

/* Bullet */
.bullet {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #888;
  background: #222;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.4s, transform 0.3s, border-color 0.3s;
}
.bullet.active {
  width: 48px;
  height: 48px;
  font-size: 24px;
  background: #fecc00;
  border-color: #fecc00;
  color: #222;
  transform: scale(1.1);
}

/* Мобільна адаптація */


/* Контейнер тумблера */
.lang-toggle-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  padding: 4px;
}

/* Тумблер */
.switch {
  position: relative;
  display: inline-block;
  width: 97px;
  height: 35px;
}

/* Текст всередині */
.switch > span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  font-size: 12px;
  width: 50%;
  text-align: center;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

.switch > span.on {
  left: 0;
  color: #585d65;
}

.switch > span.off {
  right: 0;
  color: #fff;
}

input.check-toggle-round-flat:checked ~ .on {
  color: #fff;
}
input.check-toggle-round-flat:checked ~ .off {
  color: #585d65;
}

/* Ховаємо checkbox */
.check-toggle {
  position: absolute;
  left: -9999px;
}

/* Обгортка тумблера */
input.check-toggle-round-flat + label {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #fecc00;
  border-radius: 60px;
  padding: 2px;
  cursor: pointer;
  position: relative;
}

/* Смуга */
input.check-toggle-round-flat + label:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background-color: #fecc00;
  border-radius: 60px;
}

/* Коло */
input.check-toggle-round-flat + label:after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  width: 48px;
  background-color: #fff;
  border-radius: 52px;
  transition: margin 0.2s;
}

input.check-toggle-round-flat:checked + label:after {
  margin-left: 44px;
}

/* Мобільна адаптація */
@media screen and (max-width: 1201px) {
  .lang-toggle-wrapper {
    display: none;
  }

  .switch {
    transform: scale(0.9);
  }
}

/* Bullet для перемикача мови (у мобільному toc) */
.bullet.lang-bullet {
  font-size: 0.5rem;
  padding: 0 8px;
  width: auto;
  height: 32px;
  background: #000;
  color: #fecc00;
  border-color: #fecc00;
  border-radius: 16px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Адаптація: показується тільки на мобільних */
@media screen and (min-width: 1201px) {
  .bullet.lang-bullet {
    display: none !important;
  }
}