.content-layout {
  display: flex;
  gap: 10px;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 10px;
}

.side-toc {
  min-width: 250px;
  max-width: 300px;
  position: sticky;
  top: 5px;
  align-self: flex-start;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(0,0,0,0.12);
  margin-top: 20px; 
}

.side-toc ol {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}


.side-toc a {
  text-decoration: none;
  color: var(--color-text);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.side-toc h2 {
  margin-top: 5px;
}

.side-toc a:hover {
  opacity: 1;
}

.top-toc {
  display: none;
  width: 100%;
}

.top-toc-table th,
.top-toc-table td{
  border: none;
  border-bottom: 1px solid var(--color-border);
}

.top-toc-table a {
  text-decoration: none;
  color: var(--color-text);
  display: block;
  width: 100%;
  opacity: 0.85;
}

.top-toc-table a:hover {
  opacity: 0.25;
}





.masters-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: num;
}

.masters-list li {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 14px 18px 14px 48px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.masters-list li::before {
  counter-increment: num;
  content: counter(num) ".";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  opacity: 0.7;
  color: var(--color-text);
}

.masters-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  border-color: var(--color-text);
}

.masters-list li a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  width: 100%;
}

.masters-list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--color-header), var(--color-text), var(--color-header));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.masters-list li a:hover::after {
  transform: scaleX(1);
}







@media (max-width: 1200px) {
  .side-toc {
    display: none;
  }

  .top-toc {
    display: block;
  }

  .content-layout {
    flex-direction: column;
    padding: 0 12px;
  }
}