body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8f9fb;
  color: #222;
  overflow: hidden;
  height: 100vh;
  display: flex;
}

li {
  margin-bottom: 0.5rem;
}

.layout {
  display: flex;
  min-height: 100vh;
  overflow: visible;
  position: relative;
  width: 100%;
}

.sidebar {
  background: #f0ebfc;
  padding: 1rem;
  width: 240px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  min-height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sidebar a.logo-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.sidebar a.logo-link:visited {
  text-decoration: none;
}

.sidebar .logo {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #6b4cc2;
}

.sidebar .title {
  vertical-align: top;
  margin-left: 0.5rem;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
}

.sidebar nav ul li {
  margin-bottom: 0.5rem;
}

.sidebar nav a {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
}

.sidebar nav a:hover {
  background-color: #e0d7fb;
}

.sidebar .section-title {
  display: block;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #6b4cc2;
}

.link-active {
  font-weight: 600;
  color: #6b4cc2;
}

.menu-toggle {
  display: none;
  background: #6b4cc2;
  color: white;
  border: none;
  padding: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
  margin-left: auto;
}

.content {
  flex: 1;
  flex-grow: 1;
  padding: 2rem;
  overflow-y: auto;
}

.collapsible-toggle {
  background: none;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  color: #6b4cc2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  text-align: left;
  width: 100%;
  margin-bottom: 0.5rem;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.collapsible.open .collapsible-content {
  max-height: 500px;
}

.collapsible-toggle .arrow {
  margin-right: 0.5rem;
  transition: transform 0.25s ease;
  transform: rotate(90deg);
}

.collapsible:not(.open) .arrow {
  transform: rotate(0deg); /* change ▼ to ▶ */
}

.step {
  margin-bottom: 2rem;
}

.step .collapsible {
  background: none;
  border: none;
  padding: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
}

.sub-steps {
  padding-left: 1.5rem;
}

.sub-steps li {
  font-size: 1rem;
  margin-top: 0.5rem;
}

.callout {
  max-width: 650px;
}

.callout.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  padding: 0.75rem;
  margin: 1rem 0;
}

pre {
  white-space: pre-wrap; /* or pre-line to wrap text */
  overflow-x: auto;      /* scroll only inside the <pre> */
  display: block;
  max-width: 100%;
}

pre.language-javascript {
  background: #eaeaea;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}

@media (max-width: 768px) {
  body {
    overflow: visible;
    height: auto;
    display: block;
  }

  .menu-toggle {
    display: block;
    position: relative;
    margin-left: auto;
    height: 40px;
    width: 40px;
  }

  .layout {
    display: block;
  }

  .sidebar {
    width: auto;
    min-height: initial;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .sidebar nav {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.25s ease-out;
    overflow: hidden;
    height: 0;
  }

  .sidebar .logo {
    margin-bottom: 0;
  }

  .sidebar.open nav {
    transform: scaleY(1);
    height: auto;
  }

  .collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
}