
        :root {
      --bg-main: #f8fafc;
      --bg-surface: #ffffff;
      --bg-accent: #121314;
      --primary: #6366f1;
      --primary-hover: #4f46e5;
      --secondary: #06b6d4;
      --accent-coral: #ff5252;
      --accent-gold: #ffb703;
      --text-main: #0f172a;
      --text-muted: #0a0a0a;
      --text-light: #0e0f0f;
      --border: #e2e8f0;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
      --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
      --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
      --radius-sm: 6px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    }
    
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      background-color: var(--bg-main);
      color: var(--text-main);
      font-family: var(--font-sans);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1rem;
    }

    /* HEADER & NAV */
    .site-header {
      background: var(--bg-surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: var(--shadow-sm);
    }

    .header-wrapper {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 72px;
    }

    .logo {
      display: flex;
      align-items: center;
      text-decoration: none;
    }

    .logo img {
      width: 120px;
      height: 60px;
      object-fit: contain;
    }

    .nav-toggle {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      width: 30px;
      height: 24px;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0;
      z-index: 102;
    }

    .nav-toggle span {
      width: 100%;
      height: 3px;
      background-color: var(--text-main);
      border-radius: 2px;
      transition: all 0.3s ease-in-out;
    }

    .nav-toggle.active span:nth-child(1) {
      transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
      opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
      transform: translateY(-8px) rotate(-45deg);
    }

    .main-nav {
      position: fixed;
      top: 72px;
      left: 0;
      width: 100%;
      background: var(--bg-surface);
      border-bottom: 1px solid var(--border);
      padding: 1.5rem 1rem;
      transform: translateY(-150%);
      transition: transform 0.3s ease-in-out;
      box-shadow: var(--shadow-lg);
      z-index: 101;
    }

    .main-nav.active {
      transform: translateY(0);
    }

    .nav-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    .nav-link {
      color: var(--text-main);
      text-decoration: none;
      font-weight: 600;
      font-size: 1.05rem;
      transition: color 0.2s;
    }

    .nav-link:hover {
      color: var(--primary);
    }

    /* MAIN CONTENT & HERO */
    .hero-banner {
      background: #210576;
      padding: 1rem 1rem;
      border-radius: 7px;
      margin: 1.5rem 0;
      text-align: center;
      border: 1px solid var(--border);
    }

    .hero-banner h1 {
      font-size: 2rem;
      font-weight: 800;
      color: #ebedf4;
      margin-bottom: 0.75rem;
      line-height: 1.2;
    }

    .hero-banner p {
      font-size: 1.1rem;
      color: #ebedf4;
      margin: 0 auto;
    }

    .main-layout {
      display: flex;
      flex-direction: column;
      gap: 2rem;
      margin-bottom: 3rem;
    }

    /* ARTICLE SCOPED STYLES */
    .article {
      background: var(--bg-surface);
      padding: 1.5rem;
      border-radius: var(--radius-md);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-sm);
    }

    .article h1, .article h2, .article h3, .article h4 {
      color: var(--text-main);
      font-weight: 700;
      line-height: 1.3;
      margin-top: 2rem;
      margin-bottom: 1rem;
    }

    .article h1 { font-size: 1.85rem; }
    .article h2 { font-size: 1.5rem; border-bottom: 2px solid var(--bg-accent); padding-bottom: 0.5rem; }
    .article h3 { font-size: 1.25rem; color: #1145c0;}
    
    .article > *:first-child {
      margin-top: 0;
    }

    .article p {
      margin-bottom: 1.25rem;
      color: var(--text-muted);
      font-size: 1rem;
      line-height: 1.7;
    }

    .article img {
      border-radius: 5px;
      max-width: 100%;
      height: auto;
      margin: 1.5rem 0;
      display: block;
    }

    .article ul, 
.article ol {
  margin-bottom: 1.75rem;
  padding-left: 0; /* Прибираємо стандартний отступ */
  list-style: none; /* Відключаємо дефолтні маркери */
}

/* --- МАРКОВАНИЙ СПИСОК (UL) --- */
.article ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Кастомний стильний маркер (іконка-точка з акцентом) */
.article ul li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); /* М'яке світіння навколо точки */
}


/* --- НУМЕРОВАНИЙ СПИСОК (OL) --- */
.article ol {
  counter-reset: custom-counter; /* Вмикаємо кастомний лічильник */
}

.article ol li {
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  counter-increment: custom-counter;
}

/* Кастомна цифра у стильному плашки-кружечку */
.article ol li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 22px;
  height: 22px;
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

   .article table {
  display: block;
  overflow-x: auto;
  
  /* Таблиця займає ширину контенту, але не більше за батьківський блок */
  width: fit-content;
  max-width: 100%;
  
  border-collapse: collapse;
  margin: 1.5rem auto; /* Щоб мала таблиця була вирівняна по лівому краю (або '1.5rem auto' для центру) */
  background-color: var(--bg-surface);
  border-radius: 5px;
  border: 1px solid #898d8b;
  -webkit-overflow-scrolling: touch;
}

.article table th,
.article table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border: 1px solid #898d8b;
}

.article table th {
  background-color: var(--bg-secondary);
  color: var(--accent-emerald);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap; 
}

.article table td {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  
  /* Перенос слів тільки за пробілами */
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  
  /* Гнучка ширина комірок: 
     Задаємо бажану ширину у відсотках, але обмежуємо мінімальний поріг (ch = кількість символів) */
  width: 20%; 
  min-width: 12ch; /* Комірка не буде вужчою ніж ~12 літер, що захистить від занадто дрібного переносу */
}

.article table tr:last-child td {
  border-bottom: none;
}

.article table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}
/* 1. Якщо є <th> — стилізуємо його */
.article table th {
  background-color: var(--primary);
  color: #ffffff;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

/* 2. Якщо <th> немає — стилізуємо <td> першого рядка */
.article table:not(:has(th)) tbody tr:first-child td {
  background-color: var(--primary);
  color: #ffffff;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
    /* ASIDE */
    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .widget {
      background: var(--bg-surface);
      padding: 1.25rem;
      border-radius: var(--radius-md);
      border: 1px solid var(--border);
    }

    .widget-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 1rem;
      color: var(--text-main);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .top-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .top-list-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem;
      background: var(--bg-main);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
    }

    .top-list-item span {
      font-weight: 600;
      font-size: 0.95rem;
    }

    .btn-cta {
      background: linear-gradient(135deg, var(--primary), var(--primary-hover));
      color: white;
      text-decoration: none;
      padding: 0.4rem 0.8rem;
      border-radius: var(--radius-sm);
      font-size: 0.85rem;
      font-weight: 700;
      transition: opacity 0.2s;
    }

    .btn-cta:hover {
      opacity: 0.9;
    }

    /* AUTHOR BLOCK */
    .author-block {
      background: linear-gradient(to right, #f1f5f9, #e0e7ff);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 1.5rem;
      margin-bottom: 2rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 1rem;
    }

    .author-avatar {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid var(--bg-surface);
      box-shadow: var(--shadow-md);
    }

    .author-info {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .author-meta {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }

    .author-name {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--text-main);
    }

    .author-badge {
      background: var(--primary);
      color: white;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 0.2rem 0.5rem;
      border-radius: 20px;
      font-weight: 700;
    }

    .author-bio {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.5;
    }

    /* FOOTER */
    .site-footer {
      background: #252222;
      border-top: 1px solid var(--border);
      padding: 2.5rem 0 1.5rem 0;
    }

    .footer-top {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      align-items: center;
      margin-bottom: 2rem;
    }

    .footer-nav-list {
      list-style: none;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem 1.5rem;
    }

    .footer-nav-link {
      color: #e0e7ff;
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 500;
      transition: color 0.2s;
    }

    .footer-nav-link:hover {
      color: var(--primary);
    }

    .footer-badges {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      gap: 1rem;
      margin: 1.5rem 0;
      padding: 1rem 0;
      border-top: 1px solid var(--bg-accent);
      border-bottom: 1px solid var(--bg-accent);
    }

    .footer-badges a {
      display: inline-block;
      width: 100px;
      height: 40px;
    }

    .footer-badges img {
      width: 100px;
      height: 40px;
      object-fit: contain;
    }

    .footer-legal {
      text-align: center;
      color: #ffffff;
      font-size: 0.8rem;
      line-height: 1.6;
      max-width: 800px;
      margin: 0 auto;
    }

    .footer-legal p {
      margin-bottom: 0.5rem;
    }

    /* BACK TO TOP BUTTON */
    .back-to-top {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 44px;
      height: 44px;
      background: var(--primary);
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow-lg);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s, visibility 0.3s, background-color 0.2s;
      z-index: 99;
    }

    .back-to-top.visible {
      opacity: 1;
      visibility: visible;
    }

    .back-to-top:hover {
      background: var(--primary-hover);
    }

    /* DESKTOP RESPONSIVE (768px and up) */
    @media (min-width: 768px) {
      .nav-toggle {
        display: none;
      }

      .main-nav {
        position: static;
        transform: none;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        width: auto;
      }

      .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
      }

      .header-wrapper {
        gap: 3rem;
      }

      .hero-banner {
        padding: 3.5rem 2rem;
        text-align: left;
      }

      .hero-banner h1 {
        font-size: 2.75rem;
      }

      .main-layout {
        display: grid;
        align-items: start;
      }

      .article {
        padding: 2.5rem;
      }

      .author-block {
        flex-direction: row;
        text-align: left;
      }

      .author-meta {
        justify-content: flex-start;
      }

      .footer-top {
        flex-direction: row;
        justify-content: space-between;
      }
    }
    .logo-img {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #3401ec;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s ease;
  
  /* Захист від випадання за межі контейнера */
  white-space: nowrap;
}

.logo-img:hover {
  opacity: 0.7;
}

/* Мобільна версія (для екранів менше 768px) */
@media (max-width: 768px) {
  .logo-img {
    font-size: 18px;          /* Зменшуємо шрифт */
    letter-spacing: 0.5px;    /* Зменшуємо відступи між літерами */
    max-width: 200px;         /* Обмежуємо максимальну ширину (налаштуйте під свій макет) */
    overflow: hidden;         /* Ховаємо те, що не влазить */
    text-overflow: ellipsis;  /* Додаємо '...' в кінці, якщо текст не поміщається */
  }
}

/* Для зовсім маленьких екранів (менше 380px), якщо логотип дуже довгий */
@media (max-width: 380px) {
  .logo-img {
    font-size: 16px;
    max-width: 150px;
  }
}
